0s autopkgtest [15:41:28]: starting date and time: 2024-03-25 15:41:28+0000 0s autopkgtest [15:41:28]: git checkout: 4a1cd702 l/adt_testbed: don't blame the testbed for unsolvable build deps 0s autopkgtest [15:41:28]: host juju-7f2275-prod-proposed-migration-environment-4; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.jkpxtqwn/out --timeout-copy=6000 --setup-commands 'ln -s /dev/null /etc/systemd/system/bluetooth.service; printf "http_proxy=http://squid.internal:3128\nhttps_proxy=http://squid.internal:3128\nno_proxy=127.0.0.1,127.0.1.1,login.ubuntu.com,localhost,localdomain,novalocal,internal,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,10.24.0.0/24,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com\n" >> /etc/environment' --apt-pocket=proposed --apt-upgrade tmuxp --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 '--env=ADT_TEST_TRIGGERS=setuptools/68.1.2-2ubuntu1 python3-defaults/3.12.2-0ubuntu1' -- lxd -r lxd-armhf-10.44.124.162 lxd-armhf-10.44.124.162:autopkgtest/ubuntu/noble/armhf 50s autopkgtest [15:42:18]: testbed dpkg architecture: armhf 52s autopkgtest [15:42:20]: testbed apt version: 2.7.12 52s autopkgtest [15:42:20]: @@@@@@@@@@@@@@@@@@@@ test bed setup 55s Get:1 http://ftpmaster.internal/ubuntu noble-proposed InRelease [117 kB] 55s Get:2 http://ftpmaster.internal/ubuntu noble-proposed/restricted Sources [7608 B] 55s Get:3 http://ftpmaster.internal/ubuntu noble-proposed/main Sources [497 kB] 56s Get:4 http://ftpmaster.internal/ubuntu noble-proposed/multiverse Sources [56.8 kB] 56s Get:5 http://ftpmaster.internal/ubuntu noble-proposed/universe Sources [3992 kB] 57s Get:6 http://ftpmaster.internal/ubuntu noble-proposed/main armhf Packages [672 kB] 57s Get:7 http://ftpmaster.internal/ubuntu noble-proposed/main armhf c-n-f Metadata [2492 B] 57s Get:8 http://ftpmaster.internal/ubuntu noble-proposed/restricted armhf Packages [1372 B] 57s Get:9 http://ftpmaster.internal/ubuntu noble-proposed/restricted armhf c-n-f Metadata [116 B] 57s Get:10 http://ftpmaster.internal/ubuntu noble-proposed/universe armhf Packages [4120 kB] 58s Get:11 http://ftpmaster.internal/ubuntu noble-proposed/universe armhf c-n-f Metadata [7776 B] 58s Get:12 http://ftpmaster.internal/ubuntu noble-proposed/multiverse armhf Packages [49.6 kB] 58s Get:13 http://ftpmaster.internal/ubuntu noble-proposed/multiverse armhf c-n-f Metadata [116 B] 65s Fetched 9523 kB in 4s (2590 kB/s) 65s Reading package lists... 71s Get:1 http://ports.ubuntu.com/ubuntu-ports noble-proposed InRelease [117 kB] 72s Get:2 http://ports.ubuntu.com/ubuntu-ports noble-proposed/main armhf Packages [672 kB] 72s Get:3 http://ports.ubuntu.com/ubuntu-ports noble-proposed/main armhf c-n-f Metadata [2492 B] 72s Get:4 http://ports.ubuntu.com/ubuntu-ports noble-proposed/universe armhf Packages [4120 kB] 73s Get:5 http://ports.ubuntu.com/ubuntu-ports noble-proposed/universe armhf c-n-f Metadata [7776 B] 73s Get:6 http://ports.ubuntu.com/ubuntu-ports noble-proposed/restricted armhf Packages [1372 B] 73s Get:7 http://ports.ubuntu.com/ubuntu-ports noble-proposed/restricted armhf c-n-f Metadata [116 B] 73s Get:8 http://ports.ubuntu.com/ubuntu-ports noble-proposed/multiverse armhf Packages [49.6 kB] 73s Get:9 http://ports.ubuntu.com/ubuntu-ports noble-proposed/multiverse armhf c-n-f Metadata [116 B] 89s Fetched 4970 kB in 2s (2141 kB/s) 90s Reading package lists... 101s tee: /proc/self/fd/2: Permission denied 129s Hit:1 http://ports.ubuntu.com/ubuntu-ports noble-proposed InRelease 129s Hit:2 http://ftpmaster.internal/ubuntu noble InRelease 129s Hit:3 http://ports.ubuntu.com/ubuntu-ports noble InRelease 129s Hit:4 http://ftpmaster.internal/ubuntu noble-updates InRelease 129s Hit:5 http://ports.ubuntu.com/ubuntu-ports noble-updates InRelease 129s Hit:6 http://ftpmaster.internal/ubuntu noble-security InRelease 130s Hit:7 http://ports.ubuntu.com/ubuntu-ports noble-backports InRelease 130s Hit:8 http://ftpmaster.internal/ubuntu noble-proposed InRelease 130s Hit:9 http://ports.ubuntu.com/ubuntu-ports noble-security InRelease 134s Reading package lists... 134s Reading package lists... 135s Building dependency tree... 135s Reading state information... 137s Calculating upgrade... 138s The following packages were automatically installed and are no longer required: 138s linux-headers-6.8.0-11 python3-distutils python3-lib2to3 138s Use 'apt autoremove' to remove them. 140s The following packages will be REMOVED: 140s libapt-pkg6.0 libarchive13 libatm1 libcurl3-gnutls libcurl4 libdb5.3 libelf1 140s libext2fs2 libgdbm-compat4 libgdbm6 libglib2.0-0 libgnutls30 libgpgme11 140s libhogweed6 libmagic1 libnetplan0 libnettle8 libnpth0 libnvme1 libparted2 140s libpcap0.8 libperl5.38 libpng16-16 libpsl5 libreadline8 libreiserfscore0 140s libssl3 libtirpc3 libuv1 linux-headers-6.8.0-11-generic 140s The following NEW packages will be installed: 140s libapt-pkg6.0t64 libarchive13t64 libatm1t64 libcurl3t64-gnutls libcurl4t64 140s libdb5.3t64 libelf1t64 libext2fs2t64 libgdbm-compat4t64 libgdbm6t64 140s libglib2.0-0t64 libgnutls30t64 libgpgme11t64 libhogweed6t64 libmagic1t64 140s libnetplan1 libnettle8t64 libnpth0t64 libnvme1t64 libparted2t64 140s libpcap0.8t64 libperl5.38t64 libpng16-16t64 libpsl5t64 libreadline8t64 140s libreiserfscore0t64 libssl3t64 libtirpc3t64 libuv1t64 linux-headers-6.8.0-20 140s linux-headers-6.8.0-20-generic xdg-user-dirs 140s The following packages have been kept back: 140s multipath-tools 140s The following packages will be upgraded: 140s apparmor apt apt-utils bind9-dnsutils bind9-host bind9-libs binutils 140s binutils-arm-linux-gnueabihf binutils-common bolt bsdextrautils bsdutils 140s btrfs-progs cloud-init coreutils cryptsetup-bin curl dbus dbus-bin 140s dbus-daemon dbus-session-bus-common dbus-system-bus-common dbus-user-session 140s debianutils dhcpcd-base dirmngr dmsetup dpkg dpkg-dev e2fsprogs 140s e2fsprogs-l10n eject fdisk file fonts-ubuntu-console ftp fwupd gawk 140s gcc-13-base gcc-14-base gir1.2-girepository-2.0 gir1.2-glib-2.0 gnupg 140s gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpgconf gpgsm gpgv 140s groff-base ibverbs-providers inetutils-telnet info initramfs-tools 140s initramfs-tools-bin initramfs-tools-core install-info iproute2 jq keyboxd 140s kmod kpartx krb5-locales libapparmor1 libaudit-common libaudit1 libbinutils 140s libblkid1 libblockdev-crypto3 libblockdev-fs3 libblockdev-loop3 140s libblockdev-mdraid3 libblockdev-nvme3 libblockdev-part3 libblockdev-swap3 140s libblockdev-utils3 libblockdev3 libbpf1 libbrotli1 libbsd0 libc-bin libc6 140s libcap-ng0 libcom-err2 libcryptsetup12 libctf-nobfd0 libctf0 libdbus-1-3 140s libdebconfclient0 libdevmapper1.02.1 libdpkg-perl libevent-core-2.1-7 140s libexpat1 libfdisk1 libfido2-1 libftdi1-2 libfwupd2 libgcc-s1 140s libgirepository-1.0-1 libglib2.0-data libgssapi-krb5-2 libgudev-1.0-0 140s libgusb2 libibverbs1 libjcat1 libjq1 libjson-glib-1.0-0 140s libjson-glib-1.0-common libk5crypto3 libkmod2 libkrb5-3 libkrb5support0 140s libldap-common libldap2 liblocale-gettext-perl liblzma5 libmagic-mgc 140s libmbim-glib4 libmbim-proxy libmm-glib0 libmount1 libnghttp2-14 libnsl2 140s libnss-systemd libpam-modules libpam-modules-bin libpam-runtime 140s libpam-systemd libpam0g libplymouth5 libpolkit-agent-1-0 140s libpolkit-gobject-1-0 libproc2-0 libprotobuf-c1 libpython3-stdlib 140s libpython3.11-minimal libpython3.11-stdlib libpython3.12-minimal 140s libpython3.12-stdlib libqmi-glib5 libqmi-proxy libqrtr-glib0 librtmp1 140s libsasl2-2 libsasl2-modules libsasl2-modules-db libseccomp2 libselinux1 140s libsemanage-common libsemanage2 libsframe1 libslang2 libsmartcols1 140s libsqlite3-0 libss2 libssh-4 libstdc++6 libsystemd-shared libsystemd0 140s libtext-charwidth-perl libtext-iconv-perl libtirpc-common libudev1 140s libudisks2-0 libusb-1.0-0 libuuid1 libvolume-key1 libxml2 libxmlb2 libxmuu1 140s linux-headers-generic locales logsave lshw lsof man-db mount mtr-tiny 140s netplan-generator netplan.io openssh-client openssh-server 140s openssh-sftp-server openssl parted perl perl-base perl-modules-5.38 140s pinentry-curses plymouth plymouth-theme-ubuntu-text procps psmisc 140s python-apt-common python3 python3-apt python3-cryptography python3-dbus 140s python3-distutils python3-gdbm python3-gi python3-lib2to3 python3-markupsafe 140s python3-minimal python3-netplan python3-pkg-resources python3-pyrsistent 140s python3-setuptools python3-typing-extensions python3-yaml python3.11 140s python3.11-minimal python3.12 python3.12-minimal readline-common rsync 140s rsyslog shared-mime-info sudo systemd systemd-dev systemd-resolved 140s systemd-sysv systemd-timesyncd tcpdump telnet tnftp ubuntu-minimal 140s ubuntu-pro-client ubuntu-pro-client-l10n ubuntu-standard udev udisks2 140s usb.ids util-linux uuid-runtime vim-common vim-tiny wget xxd xz-utils zlib1g 140s 244 upgraded, 32 newly installed, 30 to remove and 1 not upgraded. 140s Need to get 108 MB of archives. 140s After this operation, 85.0 MB of additional disk space will be used. 140s Get:1 http://ftpmaster.internal/ubuntu noble-proposed/main armhf bsdutils armhf 1:2.39.3-9ubuntu2 [102 kB] 141s Get:2 http://ftpmaster.internal/ubuntu noble-proposed/main armhf gcc-14-base armhf 14-20240315-1ubuntu1 [47.0 kB] 141s Get:3 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libgcc-s1 armhf 14-20240315-1ubuntu1 [41.5 kB] 141s Get:4 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libstdc++6 armhf 14-20240315-1ubuntu1 [714 kB] 141s Get:5 http://ftpmaster.internal/ubuntu noble/main armhf libc6 armhf 2.39-0ubuntu6 [2827 kB] 141s Get:6 http://ftpmaster.internal/ubuntu noble-proposed/main armhf openssl armhf 3.0.13-0ubuntu2 [975 kB] 141s Get:7 http://ftpmaster.internal/ubuntu noble-proposed/main armhf zlib1g armhf 1:1.3.dfsg-3.1ubuntu1 [49.2 kB] 141s Get:8 http://ftpmaster.internal/ubuntu noble-proposed/main armhf librtmp1 armhf 2.4+20151223.gitfa8646d.1-2build6 [51.3 kB] 141s Get:9 http://ftpmaster.internal/ubuntu noble-proposed/main armhf python3.12 armhf 3.12.2-4build3 [645 kB] 142s Get:10 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libexpat1 armhf 2.6.1-2 [65.9 kB] 142s Get:11 http://ftpmaster.internal/ubuntu noble-proposed/main armhf python3.12-minimal armhf 3.12.2-4build3 [1942 kB] 142s Get:12 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libpython3.12-stdlib armhf 3.12.2-4build3 [1906 kB] 142s Get:13 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libpython3.12-minimal armhf 3.12.2-4build3 [816 kB] 142s Get:14 http://ftpmaster.internal/ubuntu noble-proposed/main armhf parted armhf 3.6-3.1build2 [39.4 kB] 142s Get:15 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libblkid1 armhf 2.39.3-9ubuntu2 [160 kB] 142s Get:16 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libselinux1 armhf 3.5-2ubuntu1 [70.9 kB] 142s Get:17 http://ftpmaster.internal/ubuntu noble-proposed/main armhf systemd-dev all 255.4-1ubuntu5 [103 kB] 142s Get:18 http://ftpmaster.internal/ubuntu noble-proposed/main armhf systemd-timesyncd armhf 255.4-1ubuntu5 [36.0 kB] 142s Get:19 http://ftpmaster.internal/ubuntu noble-proposed/main armhf dbus-session-bus-common all 1.14.10-4ubuntu2 [80.3 kB] 142s Get:20 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libaudit-common all 1:3.1.2-2.1 [5674 B] 142s Get:21 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libcap-ng0 armhf 0.8.4-2build1 [13.5 kB] 142s Get:22 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libaudit1 armhf 1:3.1.2-2.1 [44.3 kB] 142s Get:23 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libpam0g armhf 1.5.3-5ubuntu3 [62.0 kB] 142s Get:24 http://ftpmaster.internal/ubuntu noble-proposed/main armhf liblzma5 armhf 5.6.0-0.2 [117 kB] 142s Get:25 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libldap2 armhf 2.6.7+dfsg-1~exp1ubuntu6 [172 kB] 142s Get:26 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libudisks2-0 armhf 2.10.1-6 [143 kB] 142s Get:27 http://ftpmaster.internal/ubuntu noble-proposed/main armhf udisks2 armhf 2.10.1-6 [276 kB] 142s Get:28 http://ftpmaster.internal/ubuntu noble-proposed/main armhf shared-mime-info armhf 2.4-1build1 [470 kB] 142s Get:29 http://ftpmaster.internal/ubuntu noble-proposed/main armhf gir1.2-girepository-2.0 armhf 1.79.1-1ubuntu6 [24.8 kB] 143s Get:30 http://ftpmaster.internal/ubuntu noble-proposed/main armhf gir1.2-glib-2.0 armhf 2.79.3-3ubuntu5 [182 kB] 143s Get:31 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libgirepository-1.0-1 armhf 1.79.1-1ubuntu6 [106 kB] 143s Get:32 http://ftpmaster.internal/ubuntu noble-proposed/main armhf python3-gi armhf 3.47.0-3build1 [219 kB] 143s Get:33 http://ftpmaster.internal/ubuntu noble-proposed/main armhf python3-dbus armhf 1.3.2-5build2 [94.7 kB] 143s Get:34 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libgpgme11t64 armhf 1.18.0-4.1ubuntu3 [120 kB] 143s Get:35 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libvolume-key1 armhf 0.3.12-7build1 [38.4 kB] 143s Get:36 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libnetplan1 armhf 1.0-1 [113 kB] 143s Get:37 http://ftpmaster.internal/ubuntu noble-proposed/main armhf python3-netplan armhf 1.0-1 [22.5 kB] 143s Get:38 http://ftpmaster.internal/ubuntu noble-proposed/main armhf netplan-generator armhf 1.0-1 [58.7 kB] 143s Get:39 http://ftpmaster.internal/ubuntu noble-proposed/main armhf initramfs-tools-bin armhf 0.142ubuntu23 [20.3 kB] 143s Get:40 http://ftpmaster.internal/ubuntu noble-proposed/main armhf initramfs-tools-core all 0.142ubuntu23 [50.1 kB] 143s Get:41 http://ftpmaster.internal/ubuntu noble/main armhf ubuntu-minimal armhf 1.536build1 [10.7 kB] 143s Get:42 http://ftpmaster.internal/ubuntu noble-proposed/main armhf initramfs-tools all 0.142ubuntu23 [9058 B] 143s Get:43 http://ftpmaster.internal/ubuntu noble-proposed/main armhf netplan.io armhf 1.0-1 [64.3 kB] 143s Get:44 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libxmlb2 armhf 0.3.15-1build1 [57.0 kB] 143s Get:45 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libqrtr-glib0 armhf 1.2.2-1ubuntu3 [15.4 kB] 143s Get:46 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libqmi-glib5 armhf 1.35.2-0ubuntu1 [908 kB] 143s Get:47 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libqmi-proxy armhf 1.35.2-0ubuntu1 [5732 B] 143s Get:48 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libpolkit-agent-1-0 armhf 124-1ubuntu1 [15.3 kB] 143s Get:49 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libpolkit-gobject-1-0 armhf 124-1ubuntu1 [44.1 kB] 143s Get:50 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libglib2.0-0t64 armhf 2.79.3-3ubuntu5 [1414 kB] 143s Get:51 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libjcat1 armhf 0.2.0-2build2 [30.4 kB] 143s Get:52 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libarchive13t64 armhf 3.7.2-1.1ubuntu2 [330 kB] 143s Get:53 http://ftpmaster.internal/ubuntu noble-proposed/main armhf fwupd armhf 1.9.15-2 [4350 kB] 144s Get:54 http://ftpmaster.internal/ubuntu noble-proposed/main armhf ubuntu-pro-client-l10n armhf 31.2.2 [19.4 kB] 144s Get:55 http://ftpmaster.internal/ubuntu noble-proposed/main armhf ubuntu-pro-client armhf 31.2.2 [216 kB] 144s Get:56 http://ftpmaster.internal/ubuntu noble-proposed/main armhf python3.11 armhf 3.11.8-1build4 [589 kB] 144s Get:57 http://ftpmaster.internal/ubuntu noble-proposed/main armhf python3.11-minimal armhf 3.11.8-1build4 [1795 kB] 145s Get:58 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libpython3.11-minimal armhf 3.11.8-1build4 [826 kB] 145s Get:59 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libsasl2-modules-db armhf 2.1.28+dfsg1-5ubuntu1 [19.0 kB] 145s Get:60 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libtext-iconv-perl armhf 1.7-8build2 [12.7 kB] 145s Get:61 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libtext-charwidth-perl armhf 0.04-11build2 [8962 B] 145s Get:62 http://ftpmaster.internal/ubuntu noble-proposed/main armhf perl-base armhf 5.38.2-3.2 [1671 kB] 145s Get:63 http://ftpmaster.internal/ubuntu noble-proposed/main armhf liblocale-gettext-perl armhf 1.07-6ubuntu4 [15.0 kB] 145s Get:64 http://ftpmaster.internal/ubuntu noble-proposed/main armhf perl-modules-5.38 all 5.38.2-3.2 [3110 kB] 146s Get:65 http://ftpmaster.internal/ubuntu noble-proposed/main armhf python3-gdbm armhf 3.12.2-3ubuntu1.1 [17.1 kB] 146s Get:66 http://ftpmaster.internal/ubuntu noble-proposed/main armhf man-db armhf 2.12.0-3build4 [1196 kB] 146s Get:67 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libgdbm6t64 armhf 1.23-5.1 [30.3 kB] 146s Get:68 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libgdbm-compat4t64 armhf 1.23-5.1 [6208 B] 146s Get:69 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libperl5.38t64 armhf 5.38.2-3.2 [4101 kB] 147s Get:70 http://ftpmaster.internal/ubuntu noble-proposed/main armhf perl armhf 5.38.2-3.2 [231 kB] 148s Get:71 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libdb5.3t64 armhf 5.3.28+dfsg2-6 [661 kB] 148s Get:72 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libpython3.11-stdlib armhf 3.11.8-1build4 [1810 kB] 148s Get:73 http://ftpmaster.internal/ubuntu noble-proposed/main armhf keyboxd armhf 2.4.4-2ubuntu15 [111 kB] 148s Get:74 http://ftpmaster.internal/ubuntu noble/main armhf libnpth0t64 armhf 1.6-3.1 [6940 B] 148s Get:75 http://ftpmaster.internal/ubuntu noble-proposed/main armhf gpgv armhf 2.4.4-2ubuntu15 [224 kB] 148s Get:76 http://ftpmaster.internal/ubuntu noble-proposed/main armhf gpg armhf 2.4.4-2ubuntu15 [524 kB] 149s Get:77 http://ftpmaster.internal/ubuntu noble-proposed/main armhf gpg-wks-client armhf 2.4.4-2ubuntu15 [87.4 kB] 149s Get:78 http://ftpmaster.internal/ubuntu noble-proposed/main armhf gnupg-utils armhf 2.4.4-2ubuntu15 [158 kB] 149s Get:79 http://ftpmaster.internal/ubuntu noble-proposed/main armhf gpg-agent armhf 2.4.4-2ubuntu15 [235 kB] 149s Get:80 http://ftpmaster.internal/ubuntu noble-proposed/main armhf gpgsm armhf 2.4.4-2ubuntu15 [241 kB] 149s Get:81 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libreadline8t64 armhf 8.2-4 [129 kB] 149s Get:82 http://ftpmaster.internal/ubuntu noble-proposed/main armhf gawk armhf 1:5.2.1-2build2 [415 kB] 149s Get:83 http://ftpmaster.internal/ubuntu noble-proposed/main armhf fdisk armhf 2.39.3-9ubuntu2 [135 kB] 149s Get:84 http://ftpmaster.internal/ubuntu noble-proposed/main armhf gpgconf armhf 2.4.4-2ubuntu15 [115 kB] 149s Get:85 http://ftpmaster.internal/ubuntu noble-proposed/main armhf dirmngr armhf 2.4.4-2ubuntu15 [346 kB] 149s Get:86 http://ftpmaster.internal/ubuntu noble-proposed/main armhf gnupg all 2.4.4-2ubuntu15 [359 kB] 149s Get:87 http://ftpmaster.internal/ubuntu noble-proposed/main armhf python3-apt armhf 2.7.7 [162 kB] 149s Get:88 http://ftpmaster.internal/ubuntu noble-proposed/main armhf apt-utils armhf 2.7.14 [210 kB] 150s Get:89 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libapt-pkg6.0t64 armhf 2.7.14 [986 kB] 150s Get:90 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libnettle8t64 armhf 3.9.1-2.2 [187 kB] 150s Get:91 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libhogweed6t64 armhf 3.9.1-2.2 [187 kB] 150s Get:92 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libgnutls30t64 armhf 3.8.3-1.1ubuntu2 [1046 kB] 150s Get:93 http://ftpmaster.internal/ubuntu noble-proposed/main armhf apt armhf 2.7.14 [1368 kB] 151s Get:94 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libcurl3t64-gnutls armhf 8.5.0-2ubuntu8 [290 kB] 151s Get:95 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libfwupd2 armhf 1.9.15-2 [123 kB] 151s Get:96 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libpsl5t64 armhf 0.21.2-1.1 [55.7 kB] 151s Get:97 http://ftpmaster.internal/ubuntu noble-proposed/main armhf wget armhf 1.21.4-1ubuntu2 [317 kB] 152s Get:98 http://ftpmaster.internal/ubuntu noble-proposed/main armhf tnftp armhf 20230507-2build1 [98.6 kB] 152s Get:99 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libpcap0.8t64 armhf 1.10.4-4.1ubuntu2 [137 kB] 152s Get:100 http://ftpmaster.internal/ubuntu noble-proposed/main armhf tcpdump armhf 4.99.4-3ubuntu2 [425 kB] 152s Get:101 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libsystemd-shared armhf 255.4-1ubuntu5 [2009 kB] 153s Get:102 http://ftpmaster.internal/ubuntu noble-proposed/main armhf systemd-resolved armhf 255.4-1ubuntu5 [289 kB] 154s Get:103 http://ftpmaster.internal/ubuntu noble-proposed/main armhf sudo armhf 1.9.15p5-3ubuntu3 [936 kB] 155s Get:104 http://ftpmaster.internal/ubuntu noble-proposed/main armhf rsync armhf 3.2.7-1build1 [413 kB] 156s Get:105 http://ftpmaster.internal/ubuntu noble-proposed/main armhf python3-cryptography armhf 41.0.7-4build2 [788 kB] 157s Get:106 http://ftpmaster.internal/ubuntu noble-proposed/main armhf openssh-sftp-server armhf 1:9.6p1-3ubuntu11 [35.5 kB] 157s Get:107 http://ftpmaster.internal/ubuntu noble-proposed/main armhf openssh-client armhf 1:9.6p1-3ubuntu11 [890 kB] 158s Get:108 http://ftpmaster.internal/ubuntu noble-proposed/main armhf openssh-server armhf 1:9.6p1-3ubuntu11 [503 kB] 159s Get:109 http://ftpmaster.internal/ubuntu noble-proposed/main armhf linux-headers-6.8.0-20 all 6.8.0-20.20 [13.6 MB] 172s Get:110 http://ftpmaster.internal/ubuntu noble-proposed/main armhf linux-headers-6.8.0-20-generic armhf 6.8.0-20.20 [1287 kB] 173s Get:111 http://ftpmaster.internal/ubuntu noble-proposed/main armhf linux-headers-generic armhf 6.8.0-20.20+1 [9610 B] 173s Get:112 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libssl3t64 armhf 3.0.13-0ubuntu2 [1558 kB] 173s Get:113 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libudev1 armhf 255.4-1ubuntu5 [166 kB] 173s Get:114 http://ftpmaster.internal/ubuntu noble-proposed/main armhf systemd armhf 255.4-1ubuntu5 [3502 kB] 175s Get:115 http://ftpmaster.internal/ubuntu noble-proposed/main armhf udev armhf 255.4-1ubuntu5 [1852 kB] 176s Get:116 http://ftpmaster.internal/ubuntu noble-proposed/main armhf systemd-sysv armhf 255.4-1ubuntu5 [11.9 kB] 176s Get:117 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libnss-systemd armhf 255.4-1ubuntu5 [148 kB] 176s Get:118 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libpam-systemd armhf 255.4-1ubuntu5 [216 kB] 176s Get:119 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libsystemd0 armhf 255.4-1ubuntu5 [410 kB] 177s Get:120 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libpam-modules-bin armhf 1.5.3-5ubuntu3 [47.0 kB] 177s Get:121 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libpam-modules armhf 1.5.3-5ubuntu3 [261 kB] 177s Get:122 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libpam-runtime all 1.5.3-5ubuntu3 [40.8 kB] 177s Get:123 http://ftpmaster.internal/ubuntu noble-proposed/main armhf dbus-user-session armhf 1.14.10-4ubuntu2 [9962 B] 177s Get:124 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libapparmor1 armhf 4.0.0-beta3-0ubuntu2 [45.0 kB] 177s Get:125 http://ftpmaster.internal/ubuntu noble-proposed/main armhf dbus-bin armhf 1.14.10-4ubuntu2 [37.1 kB] 177s Get:126 http://ftpmaster.internal/ubuntu noble-proposed/main armhf dbus-system-bus-common all 1.14.10-4ubuntu2 [81.5 kB] 177s Get:127 http://ftpmaster.internal/ubuntu noble-proposed/main armhf dbus armhf 1.14.10-4ubuntu2 [28.1 kB] 177s Get:128 http://ftpmaster.internal/ubuntu noble-proposed/main armhf dbus-daemon armhf 1.14.10-4ubuntu2 [109 kB] 177s Get:129 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libdbus-1-3 armhf 1.14.10-4ubuntu2 [190 kB] 177s Get:130 http://ftpmaster.internal/ubuntu noble-proposed/main armhf kmod armhf 31+20240202-2ubuntu4 [91.8 kB] 177s Get:131 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libkmod2 armhf 31+20240202-2ubuntu4 [44.9 kB] 177s Get:132 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libmount1 armhf 2.39.3-9ubuntu2 [171 kB] 177s Get:133 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libseccomp2 armhf 2.5.5-1ubuntu2 [49.5 kB] 177s Get:134 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libuuid1 armhf 2.39.3-9ubuntu2 [34.4 kB] 177s Get:135 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libcryptsetup12 armhf 2:2.7.0-1ubuntu2 [238 kB] 177s Get:136 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libfdisk1 armhf 2.39.3-9ubuntu2 [196 kB] 177s Get:137 http://ftpmaster.internal/ubuntu noble-proposed/main armhf mount armhf 2.39.3-9ubuntu2 [134 kB] 178s Get:138 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libdevmapper1.02.1 armhf 2:1.02.185-3ubuntu2 [135 kB] 178s Get:139 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libparted2t64 armhf 3.6-3.1build2 [143 kB] 178s Get:140 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libsqlite3-0 armhf 3.45.1-1ubuntu1 [599 kB] 178s Get:141 http://ftpmaster.internal/ubuntu noble-proposed/main armhf pinentry-curses armhf 1.2.1-3ubuntu4 [36.7 kB] 178s Get:142 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libsmartcols1 armhf 2.39.3-9ubuntu2 [117 kB] 178s Get:143 http://ftpmaster.internal/ubuntu noble-proposed/main armhf readline-common all 8.2-4 [56.4 kB] 178s Get:144 http://ftpmaster.internal/ubuntu noble-proposed/main armhf python3-yaml armhf 6.0.1-2build1 [117 kB] 178s Get:145 http://ftpmaster.internal/ubuntu noble-proposed/main armhf python-apt-common all 2.7.7 [19.8 kB] 178s Get:146 http://ftpmaster.internal/ubuntu noble-proposed/main armhf python3-setuptools all 68.1.2-2ubuntu1 [396 kB] 178s Get:147 http://ftpmaster.internal/ubuntu noble-proposed/main armhf python3-pkg-resources all 68.1.2-2ubuntu1 [168 kB] 178s Get:148 http://ftpmaster.internal/ubuntu noble-proposed/main armhf dpkg armhf 1.22.6ubuntu4 [1229 kB] 179s Get:149 http://ftpmaster.internal/ubuntu noble-proposed/main armhf python3-minimal armhf 3.12.2-0ubuntu1 [27.1 kB] 179s Get:150 http://ftpmaster.internal/ubuntu noble-proposed/main armhf python3 armhf 3.12.2-0ubuntu1 [24.1 kB] 179s Get:151 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libpython3-stdlib armhf 3.12.2-0ubuntu1 [9802 B] 179s Get:152 http://ftpmaster.internal/ubuntu noble-proposed/main armhf bsdextrautils armhf 2.39.3-9ubuntu2 [78.7 kB] 179s Get:153 http://ftpmaster.internal/ubuntu noble-proposed/main armhf groff-base armhf 1.23.0-3build1 [946 kB] 179s Get:154 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libsasl2-2 armhf 2.1.28+dfsg1-5ubuntu1 [49.7 kB] 179s Get:155 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libblockdev-utils3 armhf 3.1.0-1build1 [16.9 kB] 179s Get:156 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libblockdev-crypto3 armhf 3.1.0-1build1 [20.3 kB] 180s Get:157 http://ftpmaster.internal/ubuntu noble-proposed/main armhf logsave armhf 1.47.0-2.4~exp1ubuntu2 [21.9 kB] 180s Get:158 http://ftpmaster.internal/ubuntu noble-proposed/main armhf dhcpcd-base armhf 1:10.0.6-1ubuntu2 [186 kB] 180s Get:159 http://ftpmaster.internal/ubuntu noble-proposed/main armhf eject armhf 2.39.3-9ubuntu2 [43.2 kB] 180s Get:160 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libbpf1 armhf 1:1.3.0-2build1 [146 kB] 180s Get:161 http://ftpmaster.internal/ubuntu noble-proposed/main armhf iproute2 armhf 6.1.0-1ubuntu5 [1060 kB] 180s Get:162 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libelf1t64 armhf 0.190-1.1build2 [49.9 kB] 180s Get:163 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libtirpc-common all 1.3.4+ds-1.1 [8018 B] 180s Get:164 http://ftpmaster.internal/ubuntu noble-proposed/main armhf lsof armhf 4.95.0-1build2 [248 kB] 180s Get:165 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libnsl2 armhf 1.3.0-3build2 [36.5 kB] 180s Get:166 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libgssapi-krb5-2 armhf 1.20.1-6ubuntu1 [119 kB] 181s Get:167 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libkrb5-3 armhf 1.20.1-6ubuntu1 [320 kB] 181s Get:168 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libkrb5support0 armhf 1.20.1-6ubuntu1 [31.5 kB] 181s Get:169 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libk5crypto3 armhf 1.20.1-6ubuntu1 [78.6 kB] 181s Get:170 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libcom-err2 armhf 1.47.0-2.4~exp1ubuntu2 [21.9 kB] 181s Get:171 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libtirpc3t64 armhf 1.3.4+ds-1.1 [73.2 kB] 181s Get:172 http://ftpmaster.internal/ubuntu noble/main armhf libc-bin armhf 2.39-0ubuntu6 [530 kB] 181s Get:173 http://ftpmaster.internal/ubuntu noble/main armhf locales all 2.39-0ubuntu6 [4232 kB] 184s Get:174 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libproc2-0 armhf 2:4.0.4-4ubuntu2 [49.0 kB] 184s Get:175 http://ftpmaster.internal/ubuntu noble-proposed/main armhf procps armhf 2:4.0.4-4ubuntu2 [700 kB] 184s Get:176 http://ftpmaster.internal/ubuntu noble-proposed/main armhf vim-tiny armhf 2:9.1.0016-1ubuntu6 [665 kB] 185s Get:177 http://ftpmaster.internal/ubuntu noble-proposed/main armhf vim-common all 2:9.1.0016-1ubuntu6 [385 kB] 185s Get:178 http://ftpmaster.internal/ubuntu noble-proposed/main armhf e2fsprogs-l10n all 1.47.0-2.4~exp1ubuntu2 [5996 B] 185s Get:179 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libblockdev-fs3 armhf 3.1.0-1build1 [34.4 kB] 185s Get:180 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libreiserfscore0t64 armhf 1:3.6.27-7.1 [66.2 kB] 185s Get:181 http://ftpmaster.internal/ubuntu noble-proposed/main armhf btrfs-progs armhf 6.6.3-1.1build1 [852 kB] 186s Get:182 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libext2fs2t64 armhf 1.47.0-2.4~exp1ubuntu2 [201 kB] 186s Get:183 http://ftpmaster.internal/ubuntu noble-proposed/main armhf e2fsprogs armhf 1.47.0-2.4~exp1ubuntu2 [571 kB] 186s Get:184 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libblockdev-loop3 armhf 3.1.0-1build1 [6502 B] 186s Get:185 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libblockdev-mdraid3 armhf 3.1.0-1build1 [13.3 kB] 186s Get:186 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libblockdev-nvme3 armhf 3.1.0-1build1 [17.5 kB] 186s Get:187 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libnvme1t64 armhf 1.8-3 [67.5 kB] 186s Get:188 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libblockdev-part3 armhf 3.1.0-1build1 [16.4 kB] 186s Get:189 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libblockdev-swap3 armhf 3.1.0-1build1 [8894 B] 186s Get:190 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libblockdev3 armhf 3.1.0-1build1 [42.9 kB] 186s Get:191 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libgudev-1.0-0 armhf 1:238-3ubuntu2 [13.6 kB] 186s Get:192 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libxml2 armhf 2.9.14+dfsg-1.3ubuntu2 [595 kB] 187s Get:193 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libmbim-proxy armhf 1.31.2-0ubuntu2 [5748 B] 187s Get:194 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libmbim-glib4 armhf 1.31.2-0ubuntu2 [216 kB] 187s Get:195 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libjson-glib-1.0-common all 1.8.0-2build1 [4210 B] 187s Get:196 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libjson-glib-1.0-0 armhf 1.8.0-2build1 [61.2 kB] 187s Get:197 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libusb-1.0-0 armhf 2:1.0.27-1 [48.7 kB] 187s Get:198 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libgusb2 armhf 0.4.8-1build1 [34.6 kB] 187s Get:199 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libmm-glib0 armhf 1.23.4-0ubuntu1 [214 kB] 187s Get:200 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libprotobuf-c1 armhf 1.4.1-1ubuntu3 [17.7 kB] 187s Get:201 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libbrotli1 armhf 1.1.0-2build1 [319 kB] 187s Get:202 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libnghttp2-14 armhf 1.59.0-1build1 [68.1 kB] 187s Get:203 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libssh-4 armhf 0.10.6-2build1 [169 kB] 188s Get:204 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libibverbs1 armhf 50.0-2build1 [57.9 kB] 188s Get:205 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libfido2-1 armhf 1.14.0-1build1 [75.8 kB] 188s Get:206 http://ftpmaster.internal/ubuntu noble-proposed/main armhf coreutils armhf 9.4-3ubuntu3 [1280 kB] 189s Get:207 http://ftpmaster.internal/ubuntu noble/main armhf debianutils armhf 5.17 [88.9 kB] 189s Get:208 http://ftpmaster.internal/ubuntu noble-proposed/main armhf util-linux armhf 2.39.3-9ubuntu2 [1216 kB] 189s Get:209 http://ftpmaster.internal/ubuntu noble-proposed/main armhf curl armhf 8.5.0-2ubuntu8 [219 kB] 189s Get:210 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libcurl4t64 armhf 8.5.0-2ubuntu8 [296 kB] 189s Get:211 http://ftpmaster.internal/ubuntu noble-proposed/main armhf file armhf 1:5.45-3 [21.1 kB] 189s Get:212 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libmagic-mgc armhf 1:5.45-3 [307 kB] 189s Get:213 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libmagic1t64 armhf 1:5.45-3 [81.4 kB] 189s Get:214 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libplymouth5 armhf 24.004.60-1ubuntu6 [140 kB] 189s Get:215 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libpng16-16t64 armhf 1.6.43-3 [166 kB] 189s Get:216 http://ftpmaster.internal/ubuntu noble-proposed/main armhf bind9-host armhf 1:9.18.24-0ubuntu3 [47.4 kB] 189s Get:217 http://ftpmaster.internal/ubuntu noble-proposed/main armhf bind9-dnsutils armhf 1:9.18.24-0ubuntu3 [149 kB] 190s Get:218 http://ftpmaster.internal/ubuntu noble-proposed/main armhf bind9-libs armhf 1:9.18.24-0ubuntu3 [1148 kB] 190s Get:219 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libuv1t64 armhf 1.48.0-1.1 [82.9 kB] 190s Get:220 http://ftpmaster.internal/ubuntu noble-proposed/main armhf uuid-runtime armhf 2.39.3-9ubuntu2 [41.7 kB] 190s Get:221 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libdebconfclient0 armhf 0.271ubuntu2 [10.8 kB] 190s Get:222 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libsemanage-common all 3.5-1build4 [10.1 kB] 190s Get:223 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libsemanage2 armhf 3.5-1build4 [84.5 kB] 190s Get:224 http://ftpmaster.internal/ubuntu noble-proposed/main armhf install-info armhf 7.1-3build1 [60.5 kB] 190s Get:225 http://ftpmaster.internal/ubuntu noble-proposed/main armhf gcc-13-base armhf 13.2.0-21ubuntu1 [48.3 kB] 190s Get:226 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libss2 armhf 1.47.0-2.4~exp1ubuntu2 [14.7 kB] 190s Get:227 http://ftpmaster.internal/ubuntu noble-proposed/main armhf dmsetup armhf 2:1.02.185-3ubuntu2 [81.1 kB] 190s Get:228 http://ftpmaster.internal/ubuntu noble-proposed/main armhf krb5-locales all 1.20.1-6ubuntu1 [13.8 kB] 190s Get:229 http://ftpmaster.internal/ubuntu noble/main armhf libbsd0 armhf 0.12.1-1 [36.6 kB] 190s Get:230 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libglib2.0-data all 2.79.3-3ubuntu5 [46.6 kB] 190s Get:231 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libslang2 armhf 2.3.3-3build1 [478 kB] 190s Get:232 http://ftpmaster.internal/ubuntu noble-proposed/main armhf rsyslog armhf 8.2312.0-3ubuntu7 [460 kB] 190s Get:233 http://ftpmaster.internal/ubuntu noble/main armhf xdg-user-dirs armhf 0.18-1 [17.3 kB] 190s Get:234 http://ftpmaster.internal/ubuntu noble-proposed/main armhf xxd armhf 2:9.1.0016-1ubuntu6 [62.5 kB] 190s Get:235 http://ftpmaster.internal/ubuntu noble-proposed/main armhf apparmor armhf 4.0.0-beta3-0ubuntu2 [562 kB] 190s Get:236 http://ftpmaster.internal/ubuntu noble-proposed/main armhf ftp all 20230507-2build1 [4724 B] 190s Get:237 http://ftpmaster.internal/ubuntu noble-proposed/main armhf inetutils-telnet armhf 2:2.5-3ubuntu3 [90.7 kB] 190s Get:238 http://ftpmaster.internal/ubuntu noble-proposed/main armhf info armhf 7.1-3build1 [127 kB] 190s Get:239 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libxmuu1 armhf 2:1.1.3-3build1 [8004 B] 190s Get:240 http://ftpmaster.internal/ubuntu noble-proposed/main armhf lshw armhf 02.19.git.2021.06.19.996aaad9c7-2build2 [310 kB] 190s Get:241 http://ftpmaster.internal/ubuntu noble-proposed/main armhf mtr-tiny armhf 0.95-1.1build1 [51.7 kB] 190s Get:242 http://ftpmaster.internal/ubuntu noble-proposed/main armhf plymouth-theme-ubuntu-text armhf 24.004.60-1ubuntu6 [9818 B] 190s Get:243 http://ftpmaster.internal/ubuntu noble-proposed/main armhf plymouth armhf 24.004.60-1ubuntu6 [142 kB] 190s Get:244 http://ftpmaster.internal/ubuntu noble-proposed/main armhf psmisc armhf 23.7-1 [176 kB] 190s Get:245 http://ftpmaster.internal/ubuntu noble-proposed/main armhf telnet all 0.17+2.5-3ubuntu3 [3682 B] 190s Get:246 http://ftpmaster.internal/ubuntu noble-proposed/main armhf xz-utils armhf 5.6.0-0.2 [271 kB] 190s Get:247 http://ftpmaster.internal/ubuntu noble/main armhf ubuntu-standard armhf 1.536build1 [10.7 kB] 190s Get:248 http://ftpmaster.internal/ubuntu noble-proposed/main armhf usb.ids all 2024.03.18-1 [223 kB] 190s Get:249 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libctf-nobfd0 armhf 2.42-4ubuntu1 [88.0 kB] 190s Get:250 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libctf0 armhf 2.42-4ubuntu1 [87.7 kB] 191s Get:251 http://ftpmaster.internal/ubuntu noble-proposed/main armhf binutils-arm-linux-gnueabihf armhf 2.42-4ubuntu1 [2925 kB] 191s Get:252 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libbinutils armhf 2.42-4ubuntu1 [464 kB] 191s Get:253 http://ftpmaster.internal/ubuntu noble-proposed/main armhf binutils armhf 2.42-4ubuntu1 [3078 B] 191s Get:254 http://ftpmaster.internal/ubuntu noble-proposed/main armhf binutils-common armhf 2.42-4ubuntu1 [217 kB] 191s Get:255 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libsframe1 armhf 2.42-4ubuntu1 [13.1 kB] 191s Get:256 http://ftpmaster.internal/ubuntu noble-proposed/main armhf bolt armhf 0.9.6-2build1 [138 kB] 191s Get:257 http://ftpmaster.internal/ubuntu noble-proposed/main armhf cryptsetup-bin armhf 2:2.7.0-1ubuntu2 [214 kB] 191s Get:258 http://ftpmaster.internal/ubuntu noble-proposed/main armhf dpkg-dev all 1.22.6ubuntu4 [1074 kB] 191s Get:259 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libdpkg-perl all 1.22.6ubuntu4 [268 kB] 191s Get:260 http://ftpmaster.internal/ubuntu noble/main armhf fonts-ubuntu-console all 0.869+git20240321-0ubuntu1 [18.7 kB] 191s Get:261 http://ftpmaster.internal/ubuntu noble-proposed/main armhf gnupg-l10n all 2.4.4-2ubuntu15 [65.8 kB] 191s Get:262 http://ftpmaster.internal/ubuntu noble-proposed/main armhf ibverbs-providers armhf 50.0-2build1 [27.4 kB] 191s Get:263 http://ftpmaster.internal/ubuntu noble-proposed/main armhf jq armhf 1.7.1-3 [65.2 kB] 191s Get:264 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libjq1 armhf 1.7.1-3 [156 kB] 191s Get:265 http://ftpmaster.internal/ubuntu noble/main armhf libatm1t64 armhf 1:2.5.1-5.1 [20.0 kB] 191s Get:266 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libevent-core-2.1-7 armhf 2.1.12-stable-9build1 [82.3 kB] 191s Get:267 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libftdi1-2 armhf 1.5-6build4 [25.7 kB] 191s Get:268 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libldap-common all 2.6.7+dfsg-1~exp1ubuntu6 [31.3 kB] 191s Get:269 http://ftpmaster.internal/ubuntu noble-proposed/main armhf libsasl2-modules armhf 2.1.28+dfsg1-5ubuntu1 [61.3 kB] 191s Get:270 http://ftpmaster.internal/ubuntu noble-proposed/main armhf python3-distutils all 3.12.2-3ubuntu1.1 [133 kB] 191s Get:271 http://ftpmaster.internal/ubuntu noble-proposed/main armhf python3-lib2to3 all 3.12.2-3ubuntu1.1 [79.1 kB] 191s Get:272 http://ftpmaster.internal/ubuntu noble/main armhf python3-markupsafe armhf 2.1.5-1build1 [12.1 kB] 191s Get:273 http://ftpmaster.internal/ubuntu noble-proposed/main armhf python3-pyrsistent armhf 0.20.0-1build1 [53.0 kB] 191s Get:274 http://ftpmaster.internal/ubuntu noble-proposed/main armhf python3-typing-extensions all 4.10.0-1 [60.7 kB] 191s Get:275 http://ftpmaster.internal/ubuntu noble/main armhf cloud-init all 24.1.2-0ubuntu1 [597 kB] 191s Get:276 http://ftpmaster.internal/ubuntu noble-proposed/main armhf kpartx armhf 0.9.4-5ubuntu6 [31.5 kB] 206s Preconfiguring packages ... 206s Fetched 108 MB in 51s (2106 kB/s) 206s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58620 files and directories currently installed.) 206s Preparing to unpack .../bsdutils_1%3a2.39.3-9ubuntu2_armhf.deb ... 206s Unpacking bsdutils (1:2.39.3-9ubuntu2) over (1:2.39.3-6ubuntu2) ... 207s Setting up bsdutils (1:2.39.3-9ubuntu2) ... 207s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58620 files and directories currently installed.) 207s Preparing to unpack .../gcc-14-base_14-20240315-1ubuntu1_armhf.deb ... 207s Unpacking gcc-14-base:armhf (14-20240315-1ubuntu1) over (14-20240303-1ubuntu1) ... 207s Setting up gcc-14-base:armhf (14-20240315-1ubuntu1) ... 207s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58620 files and directories currently installed.) 207s Preparing to unpack .../libgcc-s1_14-20240315-1ubuntu1_armhf.deb ... 207s Unpacking libgcc-s1:armhf (14-20240315-1ubuntu1) over (14-20240303-1ubuntu1) ... 207s Setting up libgcc-s1:armhf (14-20240315-1ubuntu1) ... 207s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58620 files and directories currently installed.) 207s Preparing to unpack .../libstdc++6_14-20240315-1ubuntu1_armhf.deb ... 207s Unpacking libstdc++6:armhf (14-20240315-1ubuntu1) over (14-20240303-1ubuntu1) ... 207s Setting up libstdc++6:armhf (14-20240315-1ubuntu1) ... 207s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58620 files and directories currently installed.) 207s Preparing to unpack .../libc6_2.39-0ubuntu6_armhf.deb ... 207s Unpacking libc6:armhf (2.39-0ubuntu6) over (2.39-0ubuntu2) ... 208s Setting up libc6:armhf (2.39-0ubuntu6) ... 209s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58620 files and directories currently installed.) 209s Preparing to unpack .../openssl_3.0.13-0ubuntu2_armhf.deb ... 209s Unpacking openssl (3.0.13-0ubuntu2) over (3.0.10-1ubuntu4) ... 209s Preparing to unpack .../zlib1g_1%3a1.3.dfsg-3.1ubuntu1_armhf.deb ... 209s Unpacking zlib1g:armhf (1:1.3.dfsg-3.1ubuntu1) over (1:1.3.dfsg-3ubuntu1) ... 209s Setting up zlib1g:armhf (1:1.3.dfsg-3.1ubuntu1) ... 209s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58620 files and directories currently installed.) 209s Preparing to unpack .../0-librtmp1_2.4+20151223.gitfa8646d.1-2build6_armhf.deb ... 209s Unpacking librtmp1:armhf (2.4+20151223.gitfa8646d.1-2build6) over (2.4+20151223.gitfa8646d.1-2build4) ... 209s Preparing to unpack .../1-python3.12_3.12.2-4build3_armhf.deb ... 209s Unpacking python3.12 (3.12.2-4build3) over (3.12.2-1) ... 209s Preparing to unpack .../2-libexpat1_2.6.1-2_armhf.deb ... 209s Unpacking libexpat1:armhf (2.6.1-2) over (2.6.0-1) ... 209s Preparing to unpack .../3-python3.12-minimal_3.12.2-4build3_armhf.deb ... 209s Unpacking python3.12-minimal (3.12.2-4build3) over (3.12.2-1) ... 210s Preparing to unpack .../4-libpython3.12-stdlib_3.12.2-4build3_armhf.deb ... 210s Unpacking libpython3.12-stdlib:armhf (3.12.2-4build3) over (3.12.2-1) ... 210s Preparing to unpack .../5-libpython3.12-minimal_3.12.2-4build3_armhf.deb ... 210s Unpacking libpython3.12-minimal:armhf (3.12.2-4build3) over (3.12.2-1) ... 210s Preparing to unpack .../6-parted_3.6-3.1build2_armhf.deb ... 233s Unpacking parted (3.6-3.1build2) over (3.6-3) ... 234s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58618 files and directories currently installed.) 234s Removing libparted2:armhf (3.6-3) ... 234s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58612 files and directories currently installed.) 234s Preparing to unpack .../libblkid1_2.39.3-9ubuntu2_armhf.deb ... 234s Unpacking libblkid1:armhf (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 234s Setting up libblkid1:armhf (2.39.3-9ubuntu2) ... 234s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58612 files and directories currently installed.) 234s Preparing to unpack .../libselinux1_3.5-2ubuntu1_armhf.deb ... 234s Unpacking libselinux1:armhf (3.5-2ubuntu1) over (3.5-2build1) ... 234s Setting up libselinux1:armhf (3.5-2ubuntu1) ... 234s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58612 files and directories currently installed.) 234s Preparing to unpack .../systemd-dev_255.4-1ubuntu5_all.deb ... 234s Unpacking systemd-dev (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 234s Preparing to unpack .../systemd-timesyncd_255.4-1ubuntu5_armhf.deb ... 234s Unpacking systemd-timesyncd (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 234s Preparing to unpack .../dbus-session-bus-common_1.14.10-4ubuntu2_all.deb ... 234s Unpacking dbus-session-bus-common (1.14.10-4ubuntu2) over (1.14.10-4ubuntu1) ... 234s Preparing to unpack .../libaudit-common_1%3a3.1.2-2.1_all.deb ... 234s Unpacking libaudit-common (1:3.1.2-2.1) over (1:3.1.2-2) ... 234s Setting up libaudit-common (1:3.1.2-2.1) ... 234s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58612 files and directories currently installed.) 235s Preparing to unpack .../libcap-ng0_0.8.4-2build1_armhf.deb ... 235s Unpacking libcap-ng0:armhf (0.8.4-2build1) over (0.8.4-2) ... 235s Setting up libcap-ng0:armhf (0.8.4-2build1) ... 235s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58612 files and directories currently installed.) 235s Preparing to unpack .../libaudit1_1%3a3.1.2-2.1_armhf.deb ... 235s Unpacking libaudit1:armhf (1:3.1.2-2.1) over (1:3.1.2-2) ... 235s Setting up libaudit1:armhf (1:3.1.2-2.1) ... 235s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58612 files and directories currently installed.) 235s Preparing to unpack .../libpam0g_1.5.3-5ubuntu3_armhf.deb ... 235s Unpacking libpam0g:armhf (1.5.3-5ubuntu3) over (1.5.2-9.1ubuntu3) ... 235s Setting up libpam0g:armhf (1.5.3-5ubuntu3) ... 235s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58612 files and directories currently installed.) 235s Preparing to unpack .../liblzma5_5.6.0-0.2_armhf.deb ... 235s Unpacking liblzma5:armhf (5.6.0-0.2) over (5.4.5-0.3) ... 235s Setting up liblzma5:armhf (5.6.0-0.2) ... 235s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58612 files and directories currently installed.) 235s Preparing to unpack .../0-libldap2_2.6.7+dfsg-1~exp1ubuntu6_armhf.deb ... 235s Unpacking libldap2:armhf (2.6.7+dfsg-1~exp1ubuntu6) over (2.6.7+dfsg-1~exp1ubuntu1) ... 236s Preparing to unpack .../1-libudisks2-0_2.10.1-6_armhf.deb ... 236s Unpacking libudisks2-0:armhf (2.10.1-6) over (2.10.1-1ubuntu2) ... 236s Preparing to unpack .../2-udisks2_2.10.1-6_armhf.deb ... 236s Unpacking udisks2 (2.10.1-6) over (2.10.1-1ubuntu2) ... 236s Preparing to unpack .../3-shared-mime-info_2.4-1build1_armhf.deb ... 236s Unpacking shared-mime-info (2.4-1build1) over (2.4-1) ... 236s Preparing to unpack .../4-gir1.2-girepository-2.0_1.79.1-1ubuntu6_armhf.deb ... 236s Unpacking gir1.2-girepository-2.0:armhf (1.79.1-1ubuntu6) over (1.79.1-1) ... 236s Preparing to unpack .../5-gir1.2-glib-2.0_2.79.3-3ubuntu5_armhf.deb ... 236s Unpacking gir1.2-glib-2.0:armhf (2.79.3-3ubuntu5) over (2.79.2-1~ubuntu1) ... 236s Preparing to unpack .../6-libgirepository-1.0-1_1.79.1-1ubuntu6_armhf.deb ... 236s Unpacking libgirepository-1.0-1:armhf (1.79.1-1ubuntu6) over (1.79.1-1) ... 236s Preparing to unpack .../7-python3-gi_3.47.0-3build1_armhf.deb ... 237s Unpacking python3-gi (3.47.0-3build1) over (3.47.0-3) ... 237s Preparing to unpack .../8-python3-dbus_1.3.2-5build2_armhf.deb ... 237s Unpacking python3-dbus (1.3.2-5build2) over (1.3.2-5build1) ... 237s dpkg: libgpgme11:armhf: dependency problems, but removing anyway as you requested: 237s libvolume-key1:armhf depends on libgpgme11 (>= 1.4.1). 237s libjcat1:armhf depends on libgpgme11 (>= 1.2.0). 237s 237s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58609 files and directories currently installed.) 237s Removing libgpgme11:armhf (1.18.0-4ubuntu1) ... 237s Selecting previously unselected package libgpgme11t64:armhf. 237s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58603 files and directories currently installed.) 237s Preparing to unpack .../00-libgpgme11t64_1.18.0-4.1ubuntu3_armhf.deb ... 237s Unpacking libgpgme11t64:armhf (1.18.0-4.1ubuntu3) ... 237s Preparing to unpack .../01-libvolume-key1_0.3.12-7build1_armhf.deb ... 237s Unpacking libvolume-key1:armhf (0.3.12-7build1) over (0.3.12-5build2) ... 237s Selecting previously unselected package libnetplan1:armhf. 237s Preparing to unpack .../02-libnetplan1_1.0-1_armhf.deb ... 237s Unpacking libnetplan1:armhf (1.0-1) ... 237s Preparing to unpack .../03-python3-netplan_1.0-1_armhf.deb ... 237s Unpacking python3-netplan (1.0-1) over (0.107.1-3) ... 238s Preparing to unpack .../04-netplan-generator_1.0-1_armhf.deb ... 238s Adding 'diversion of /lib/systemd/system-generators/netplan to /lib/systemd/system-generators/netplan.usr-is-merged by netplan-generator' 238s Unpacking netplan-generator (1.0-1) over (0.107.1-3) ... 238s Preparing to unpack .../05-initramfs-tools-bin_0.142ubuntu23_armhf.deb ... 238s Unpacking initramfs-tools-bin (0.142ubuntu23) over (0.142ubuntu20) ... 238s Preparing to unpack .../06-initramfs-tools-core_0.142ubuntu23_all.deb ... 238s Unpacking initramfs-tools-core (0.142ubuntu23) over (0.142ubuntu20) ... 238s Preparing to unpack .../07-ubuntu-minimal_1.536build1_armhf.deb ... 238s Unpacking ubuntu-minimal (1.536build1) over (1.536) ... 238s Preparing to unpack .../08-initramfs-tools_0.142ubuntu23_all.deb ... 238s Unpacking initramfs-tools (0.142ubuntu23) over (0.142ubuntu20) ... 238s Preparing to unpack .../09-netplan.io_1.0-1_armhf.deb ... 238s Unpacking netplan.io (1.0-1) over (0.107.1-3) ... 238s Preparing to unpack .../10-libxmlb2_0.3.15-1build1_armhf.deb ... 238s Unpacking libxmlb2:armhf (0.3.15-1build1) over (0.3.15-1) ... 238s Preparing to unpack .../11-libqrtr-glib0_1.2.2-1ubuntu3_armhf.deb ... 238s Unpacking libqrtr-glib0:armhf (1.2.2-1ubuntu3) over (1.2.2-1ubuntu2) ... 238s Preparing to unpack .../12-libqmi-glib5_1.35.2-0ubuntu1_armhf.deb ... 238s Unpacking libqmi-glib5:armhf (1.35.2-0ubuntu1) over (1.34.0-2) ... 238s Preparing to unpack .../13-libqmi-proxy_1.35.2-0ubuntu1_armhf.deb ... 238s Unpacking libqmi-proxy (1.35.2-0ubuntu1) over (1.34.0-2) ... 238s Preparing to unpack .../14-libpolkit-agent-1-0_124-1ubuntu1_armhf.deb ... 238s Unpacking libpolkit-agent-1-0:armhf (124-1ubuntu1) over (124-1) ... 238s Preparing to unpack .../15-libpolkit-gobject-1-0_124-1ubuntu1_armhf.deb ... 238s Unpacking libpolkit-gobject-1-0:armhf (124-1ubuntu1) over (124-1) ... 239s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58617 files and directories currently installed.) 239s Removing libnetplan0:armhf (0.107.1-3) ... 239s dpkg: libglib2.0-0:armhf: dependency problems, but removing anyway as you requested: 239s libmm-glib0:armhf depends on libglib2.0-0 (>= 2.62.0). 239s libmbim-proxy depends on libglib2.0-0 (>= 2.56). 239s libmbim-glib4:armhf depends on libglib2.0-0 (>= 2.56). 239s libjson-glib-1.0-0:armhf depends on libglib2.0-0 (>= 2.75.3). 239s libjcat1:armhf depends on libglib2.0-0 (>= 2.75.3). 239s libgusb2:armhf depends on libglib2.0-0 (>= 2.75.3). 239s libgudev-1.0-0:armhf depends on libglib2.0-0 (>= 2.38.0). 239s libfwupd2:armhf depends on libglib2.0-0 (>= 2.79.0). 239s libblockdev3:armhf depends on libglib2.0-0 (>= 2.42.2). 239s libblockdev-utils3:armhf depends on libglib2.0-0 (>= 2.75.3). 239s libblockdev-swap3:armhf depends on libglib2.0-0 (>= 2.42.2). 239s libblockdev-part3:armhf depends on libglib2.0-0 (>= 2.42.2). 239s libblockdev-nvme3:armhf depends on libglib2.0-0 (>= 2.42.2). 239s libblockdev-mdraid3:armhf depends on libglib2.0-0 (>= 2.42.2). 239s libblockdev-loop3:armhf depends on libglib2.0-0 (>= 2.42.2). 239s libblockdev-fs3:armhf depends on libglib2.0-0 (>= 2.42.2). 239s libblockdev-crypto3:armhf depends on libglib2.0-0 (>= 2.42.2). 239s fwupd depends on libglib2.0-0 (>= 2.79.0). 239s bolt depends on libglib2.0-0 (>= 2.56.0). 239s 239s Removing libglib2.0-0:armhf (2.79.2-1~ubuntu1) ... 239s Selecting previously unselected package libglib2.0-0t64:armhf. 239s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58588 files and directories currently installed.) 239s Preparing to unpack .../libglib2.0-0t64_2.79.3-3ubuntu5_armhf.deb ... 239s libglib2.0-0t64.preinst: Removing /var/lib/dpkg/info/libglib2.0-0:armhf.postrm to avoid loss of /usr/share/glib-2.0/schemas/gschemas.compiled... 239s removed '/var/lib/dpkg/info/libglib2.0-0:armhf.postrm' 239s Unpacking libglib2.0-0t64:armhf (2.79.3-3ubuntu5) ... 239s Preparing to unpack .../libjcat1_0.2.0-2build2_armhf.deb ... 239s Unpacking libjcat1:armhf (0.2.0-2build2) over (0.2.0-2) ... 239s dpkg: libarchive13:armhf: dependency problems, but removing anyway as you requested: 239s fwupd depends on libarchive13 (>= 3.2.1). 239s 239s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58613 files and directories currently installed.) 239s Removing libarchive13:armhf (3.7.2-1ubuntu2) ... 239s Selecting previously unselected package libarchive13t64:armhf. 239s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58607 files and directories currently installed.) 239s Preparing to unpack .../00-libarchive13t64_3.7.2-1.1ubuntu2_armhf.deb ... 239s Unpacking libarchive13t64:armhf (3.7.2-1.1ubuntu2) ... 239s Preparing to unpack .../01-fwupd_1.9.15-2_armhf.deb ... 239s Unpacking fwupd (1.9.15-2) over (1.9.14-1) ... 240s Preparing to unpack .../02-ubuntu-pro-client-l10n_31.2.2_armhf.deb ... 240s Unpacking ubuntu-pro-client-l10n (31.2.2) over (31.1) ... 240s Preparing to unpack .../03-ubuntu-pro-client_31.2.2_armhf.deb ... 240s Unpacking ubuntu-pro-client (31.2.2) over (31.1) ... 240s Preparing to unpack .../04-python3.11_3.11.8-1build4_armhf.deb ... 241s Unpacking python3.11 (3.11.8-1build4) over (3.11.8-1) ... 241s Preparing to unpack .../05-python3.11-minimal_3.11.8-1build4_armhf.deb ... 241s Unpacking python3.11-minimal (3.11.8-1build4) over (3.11.8-1) ... 241s Preparing to unpack .../06-libpython3.11-minimal_3.11.8-1build4_armhf.deb ... 241s Unpacking libpython3.11-minimal:armhf (3.11.8-1build4) over (3.11.8-1) ... 241s Preparing to unpack .../07-libsasl2-modules-db_2.1.28+dfsg1-5ubuntu1_armhf.deb ... 241s Unpacking libsasl2-modules-db:armhf (2.1.28+dfsg1-5ubuntu1) over (2.1.28+dfsg1-4) ... 241s Preparing to unpack .../08-libtext-iconv-perl_1.7-8build2_armhf.deb ... 241s Unpacking libtext-iconv-perl:armhf (1.7-8build2) over (1.7-8build1) ... 241s Preparing to unpack .../09-libtext-charwidth-perl_0.04-11build2_armhf.deb ... 241s Unpacking libtext-charwidth-perl:armhf (0.04-11build2) over (0.04-11build1) ... 241s Preparing to unpack .../10-perl-base_5.38.2-3.2_armhf.deb ... 241s Unpacking perl-base (5.38.2-3.2) over (5.38.2-3) ... 242s Setting up perl-base (5.38.2-3.2) ... 242s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58614 files and directories currently installed.) 242s Preparing to unpack .../liblocale-gettext-perl_1.07-6ubuntu4_armhf.deb ... 242s Unpacking liblocale-gettext-perl (1.07-6ubuntu4) over (1.07-6build1) ... 242s Preparing to unpack .../perl-modules-5.38_5.38.2-3.2_all.deb ... 242s Unpacking perl-modules-5.38 (5.38.2-3.2) over (5.38.2-3) ... 243s Preparing to unpack .../python3-gdbm_3.12.2-3ubuntu1.1_armhf.deb ... 243s Unpacking python3-gdbm:armhf (3.12.2-3ubuntu1.1) over (3.11.5-1) ... 243s Preparing to unpack .../man-db_2.12.0-3build4_armhf.deb ... 243s Unpacking man-db (2.12.0-3build4) over (2.12.0-3) ... 243s dpkg: libgdbm-compat4:armhf: dependency problems, but removing anyway as you requested: 243s libperl5.38:armhf depends on libgdbm-compat4 (>= 1.18-3). 243s 243s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58614 files and directories currently installed.) 243s Removing libgdbm-compat4:armhf (1.23-5) ... 243s dpkg: libgdbm6:armhf: dependency problems, but removing anyway as you requested: 243s libperl5.38:armhf depends on libgdbm6 (>= 1.21). 243s 243s Removing libgdbm6:armhf (1.23-5) ... 243s Selecting previously unselected package libgdbm6t64:armhf. 243s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58604 files and directories currently installed.) 243s Preparing to unpack .../libgdbm6t64_1.23-5.1_armhf.deb ... 243s Unpacking libgdbm6t64:armhf (1.23-5.1) ... 243s Selecting previously unselected package libgdbm-compat4t64:armhf. 243s Preparing to unpack .../libgdbm-compat4t64_1.23-5.1_armhf.deb ... 243s Unpacking libgdbm-compat4t64:armhf (1.23-5.1) ... 243s dpkg: libperl5.38:armhf: dependency problems, but removing anyway as you requested: 243s perl depends on libperl5.38 (= 5.38.2-3). 243s 244s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58616 files and directories currently installed.) 244s Removing libperl5.38:armhf (5.38.2-3) ... 244s Selecting previously unselected package libperl5.38t64:armhf. 244s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58097 files and directories currently installed.) 244s Preparing to unpack .../libperl5.38t64_5.38.2-3.2_armhf.deb ... 244s Unpacking libperl5.38t64:armhf (5.38.2-3.2) ... 244s Preparing to unpack .../perl_5.38.2-3.2_armhf.deb ... 244s Unpacking perl (5.38.2-3.2) over (5.38.2-3) ... 244s dpkg: libdb5.3:armhf: dependency problems, but removing anyway as you requested: 244s libpython3.11-stdlib:armhf depends on libdb5.3. 244s libpam-modules:armhf depends on libdb5.3. 244s iproute2 depends on libdb5.3. 244s apt-utils depends on libdb5.3. 244s 244s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58616 files and directories currently installed.) 244s Removing libdb5.3:armhf (5.3.28+dfsg2-4) ... 244s Selecting previously unselected package libdb5.3t64:armhf. 244s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58610 files and directories currently installed.) 244s Preparing to unpack .../libdb5.3t64_5.3.28+dfsg2-6_armhf.deb ... 244s Unpacking libdb5.3t64:armhf (5.3.28+dfsg2-6) ... 245s Preparing to unpack .../libpython3.11-stdlib_3.11.8-1build4_armhf.deb ... 245s Unpacking libpython3.11-stdlib:armhf (3.11.8-1build4) over (3.11.8-1) ... 245s Preparing to unpack .../keyboxd_2.4.4-2ubuntu15_armhf.deb ... 245s Unpacking keyboxd (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 245s dpkg: libnpth0:armhf: dependency problems, but removing anyway as you requested: 245s gpgv depends on libnpth0 (>= 0.90). 245s gpgsm depends on libnpth0 (>= 0.90). 245s gpg-agent depends on libnpth0 (>= 0.90). 245s gpg depends on libnpth0 (>= 0.90). 245s dirmngr depends on libnpth0 (>= 0.90). 245s 245s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58614 files and directories currently installed.) 245s Removing libnpth0:armhf (1.6-3build2) ... 245s Selecting previously unselected package libnpth0t64:armhf. 245s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58609 files and directories currently installed.) 245s Preparing to unpack .../libnpth0t64_1.6-3.1_armhf.deb ... 245s Unpacking libnpth0t64:armhf (1.6-3.1) ... 245s Setting up libnpth0t64:armhf (1.6-3.1) ... 245s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58615 files and directories currently installed.) 245s Preparing to unpack .../gpgv_2.4.4-2ubuntu15_armhf.deb ... 245s Unpacking gpgv (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 246s Setting up gpgv (2.4.4-2ubuntu15) ... 246s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58615 files and directories currently installed.) 246s Preparing to unpack .../gpg_2.4.4-2ubuntu15_armhf.deb ... 246s Unpacking gpg (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 246s Preparing to unpack .../gpg-wks-client_2.4.4-2ubuntu15_armhf.deb ... 246s Unpacking gpg-wks-client (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 246s Preparing to unpack .../gnupg-utils_2.4.4-2ubuntu15_armhf.deb ... 246s Unpacking gnupg-utils (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 246s Preparing to unpack .../gpg-agent_2.4.4-2ubuntu15_armhf.deb ... 246s Unpacking gpg-agent (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 246s Preparing to unpack .../gpgsm_2.4.4-2ubuntu15_armhf.deb ... 246s Unpacking gpgsm (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 246s dpkg: libreadline8:armhf: dependency problems, but removing anyway as you requested: 246s gpgconf depends on libreadline8 (>= 6.0). 246s gawk depends on libreadline8 (>= 6.0). 246s fdisk depends on libreadline8 (>= 6.0). 246s 246s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58615 files and directories currently installed.) 246s Removing libreadline8:armhf (8.2-3) ... 246s Selecting previously unselected package libreadline8t64:armhf. 246s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58603 files and directories currently installed.) 246s Preparing to unpack .../libreadline8t64_8.2-4_armhf.deb ... 246s Adding 'diversion of /lib/arm-linux-gnueabihf/libhistory.so.8 to /lib/arm-linux-gnueabihf/libhistory.so.8.usr-is-merged by libreadline8t64' 246s Adding 'diversion of /lib/arm-linux-gnueabihf/libhistory.so.8.2 to /lib/arm-linux-gnueabihf/libhistory.so.8.2.usr-is-merged by libreadline8t64' 246s Adding 'diversion of /lib/arm-linux-gnueabihf/libreadline.so.8 to /lib/arm-linux-gnueabihf/libreadline.so.8.usr-is-merged by libreadline8t64' 246s Adding 'diversion of /lib/arm-linux-gnueabihf/libreadline.so.8.2 to /lib/arm-linux-gnueabihf/libreadline.so.8.2.usr-is-merged by libreadline8t64' 246s Unpacking libreadline8t64:armhf (8.2-4) ... 246s Setting up libreadline8t64:armhf (8.2-4) ... 246s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58623 files and directories currently installed.) 246s Preparing to unpack .../0-gawk_1%3a5.2.1-2build2_armhf.deb ... 246s Unpacking gawk (1:5.2.1-2build2) over (1:5.2.1-2) ... 247s Preparing to unpack .../1-fdisk_2.39.3-9ubuntu2_armhf.deb ... 247s Unpacking fdisk (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 247s Preparing to unpack .../2-gpgconf_2.4.4-2ubuntu15_armhf.deb ... 247s Unpacking gpgconf (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 247s Preparing to unpack .../3-dirmngr_2.4.4-2ubuntu15_armhf.deb ... 247s Unpacking dirmngr (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 247s Preparing to unpack .../4-gnupg_2.4.4-2ubuntu15_all.deb ... 247s Unpacking gnupg (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 247s Preparing to unpack .../5-python3-apt_2.7.7_armhf.deb ... 247s Unpacking python3-apt (2.7.7) over (2.7.6) ... 247s Preparing to unpack .../6-apt-utils_2.7.14_armhf.deb ... 247s Unpacking apt-utils (2.7.14) over (2.7.12) ... 247s dpkg: libapt-pkg6.0:armhf: dependency problems, but removing anyway as you requested: 247s apt depends on libapt-pkg6.0 (>= 2.7.12). 247s 247s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58621 files and directories currently installed.) 247s Removing libapt-pkg6.0:armhf (2.7.12) ... 247s dpkg: libnettle8:armhf: dependency problems, but removing anyway as you requested: 247s libhogweed6:armhf depends on libnettle8. 247s libgnutls30:armhf depends on libnettle8 (>= 3.9~). 247s libcurl3-gnutls:armhf depends on libnettle8. 247s 247s Removing libnettle8:armhf (3.9.1-2) ... 248s Selecting previously unselected package libapt-pkg6.0t64:armhf. 248s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58565 files and directories currently installed.) 248s Preparing to unpack .../libapt-pkg6.0t64_2.7.14_armhf.deb ... 248s Unpacking libapt-pkg6.0t64:armhf (2.7.14) ... 248s Setting up libapt-pkg6.0t64:armhf (2.7.14) ... 248s Selecting previously unselected package libnettle8t64:armhf. 248s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58615 files and directories currently installed.) 248s Preparing to unpack .../libnettle8t64_3.9.1-2.2_armhf.deb ... 248s Unpacking libnettle8t64:armhf (3.9.1-2.2) ... 248s Setting up libnettle8t64:armhf (3.9.1-2.2) ... 248s dpkg: libhogweed6:armhf: dependency problems, but removing anyway as you requested: 248s libgnutls30:armhf depends on libhogweed6 (>= 3.6). 248s 248s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58623 files and directories currently installed.) 248s Removing libhogweed6:armhf (3.9.1-2) ... 248s Selecting previously unselected package libhogweed6t64:armhf. 248s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58618 files and directories currently installed.) 248s Preparing to unpack .../libhogweed6t64_3.9.1-2.2_armhf.deb ... 248s Unpacking libhogweed6t64:armhf (3.9.1-2.2) ... 248s Setting up libhogweed6t64:armhf (3.9.1-2.2) ... 248s dpkg: libgnutls30:armhf: dependency problems, but removing anyway as you requested: 248s libcurl3-gnutls:armhf depends on libgnutls30 (>= 3.8.2). 248s apt depends on libgnutls30 (>= 3.8.1). 248s 248s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58624 files and directories currently installed.) 248s Removing libgnutls30:armhf (3.8.3-1ubuntu1) ... 248s Selecting previously unselected package libgnutls30t64:armhf. 248s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58615 files and directories currently installed.) 248s Preparing to unpack .../libgnutls30t64_3.8.3-1.1ubuntu2_armhf.deb ... 248s Unpacking libgnutls30t64:armhf (3.8.3-1.1ubuntu2) ... 249s Setting up libgnutls30t64:armhf (3.8.3-1.1ubuntu2) ... 249s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58643 files and directories currently installed.) 249s Preparing to unpack .../archives/apt_2.7.14_armhf.deb ... 249s Unpacking apt (2.7.14) over (2.7.12) ... 249s Setting up apt (2.7.14) ... 250s dpkg: libcurl3-gnutls:armhf: dependency problems, but removing anyway as you requested: 250s libfwupd2:armhf depends on libcurl3-gnutls (>= 7.63.0). 250s 250s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58643 files and directories currently installed.) 250s Removing libcurl3-gnutls:armhf (8.5.0-2ubuntu2) ... 250s Selecting previously unselected package libcurl3t64-gnutls:armhf. 250s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58636 files and directories currently installed.) 250s Preparing to unpack .../libcurl3t64-gnutls_8.5.0-2ubuntu8_armhf.deb ... 250s Unpacking libcurl3t64-gnutls:armhf (8.5.0-2ubuntu8) ... 250s Preparing to unpack .../libfwupd2_1.9.15-2_armhf.deb ... 250s Unpacking libfwupd2:armhf (1.9.15-2) over (1.9.14-1) ... 251s dpkg: libpsl5:armhf: dependency problems, but removing anyway as you requested: 251s wget depends on libpsl5 (>= 0.16.0). 251s libcurl4:armhf depends on libpsl5 (>= 0.16.0). 251s 251s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58643 files and directories currently installed.) 251s Removing libpsl5:armhf (0.21.2-1build1) ... 251s Selecting previously unselected package libpsl5t64:armhf. 251s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58638 files and directories currently installed.) 251s Preparing to unpack .../libpsl5t64_0.21.2-1.1_armhf.deb ... 251s Unpacking libpsl5t64:armhf (0.21.2-1.1) ... 251s Preparing to unpack .../wget_1.21.4-1ubuntu2_armhf.deb ... 251s Unpacking wget (1.21.4-1ubuntu2) over (1.21.4-1ubuntu1) ... 251s Preparing to unpack .../tnftp_20230507-2build1_armhf.deb ... 251s Unpacking tnftp (20230507-2build1) over (20230507-2) ... 251s dpkg: libpcap0.8:armhf: dependency problems, but removing anyway as you requested: 251s tcpdump depends on libpcap0.8 (>= 1.9.1). 251s 251s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58644 files and directories currently installed.) 251s Removing libpcap0.8:armhf (1.10.4-4ubuntu3) ... 251s Selecting previously unselected package libpcap0.8t64:armhf. 251s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58633 files and directories currently installed.) 251s Preparing to unpack .../00-libpcap0.8t64_1.10.4-4.1ubuntu2_armhf.deb ... 251s Unpacking libpcap0.8t64:armhf (1.10.4-4.1ubuntu2) ... 251s Preparing to unpack .../01-tcpdump_4.99.4-3ubuntu2_armhf.deb ... 251s Unpacking tcpdump (4.99.4-3ubuntu2) over (4.99.4-3ubuntu1) ... 251s Preparing to unpack .../02-libsystemd-shared_255.4-1ubuntu5_armhf.deb ... 251s Unpacking libsystemd-shared:armhf (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 252s Preparing to unpack .../03-systemd-resolved_255.4-1ubuntu5_armhf.deb ... 252s Unpacking systemd-resolved (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 252s Preparing to unpack .../04-sudo_1.9.15p5-3ubuntu3_armhf.deb ... 252s Unpacking sudo (1.9.15p5-3ubuntu3) over (1.9.15p5-3ubuntu1) ... 252s Preparing to unpack .../05-rsync_3.2.7-1build1_armhf.deb ... 252s Unpacking rsync (3.2.7-1build1) over (3.2.7-1) ... 252s Preparing to unpack .../06-python3-cryptography_41.0.7-4build2_armhf.deb ... 252s Unpacking python3-cryptography (41.0.7-4build2) over (41.0.7-3) ... 252s Preparing to unpack .../07-openssh-sftp-server_1%3a9.6p1-3ubuntu11_armhf.deb ... 252s Unpacking openssh-sftp-server (1:9.6p1-3ubuntu11) over (1:9.6p1-3ubuntu2) ... 252s Preparing to unpack .../08-openssh-client_1%3a9.6p1-3ubuntu11_armhf.deb ... 252s Unpacking openssh-client (1:9.6p1-3ubuntu11) over (1:9.6p1-3ubuntu2) ... 253s Preparing to unpack .../09-openssh-server_1%3a9.6p1-3ubuntu11_armhf.deb ... 253s Unpacking openssh-server (1:9.6p1-3ubuntu11) over (1:9.6p1-3ubuntu2) ... 253s Selecting previously unselected package linux-headers-6.8.0-20. 253s Preparing to unpack .../10-linux-headers-6.8.0-20_6.8.0-20.20_all.deb ... 253s Unpacking linux-headers-6.8.0-20 (6.8.0-20.20) ... 263s Selecting previously unselected package linux-headers-6.8.0-20-generic. 264s Preparing to unpack .../11-linux-headers-6.8.0-20-generic_6.8.0-20.20_armhf.deb ... 264s Unpacking linux-headers-6.8.0-20-generic (6.8.0-20.20) ... 267s Preparing to unpack .../12-linux-headers-generic_6.8.0-20.20+1_armhf.deb ... 267s Unpacking linux-headers-generic (6.8.0-20.20+1) over (6.8.0-11.11+1) ... 268s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 89796 files and directories currently installed.) 268s Removing linux-headers-6.8.0-11-generic (6.8.0-11.11) ... 270s dpkg: libssl3:armhf: dependency problems, but removing anyway as you requested: 270s systemd depends on libssl3 (>= 3.0.0). 270s libssh-4:armhf depends on libssl3 (>= 3.0.0). 270s libsasl2-modules:armhf depends on libssl3 (>= 3.0.0). 270s libsasl2-2:armhf depends on libssl3 (>= 3.0.0). 270s libnvme1 depends on libssl3 (>= 3.0.0). 270s libkrb5-3:armhf depends on libssl3 (>= 3.0.0). 270s libkmod2:armhf depends on libssl3 (>= 3.0.0). 270s libfido2-1:armhf depends on libssl3 (>= 3.0.0). 270s libcurl4:armhf depends on libssl3 (>= 3.0.0). 270s libcryptsetup12:armhf depends on libssl3 (>= 3.0.0). 270s kmod depends on libssl3 (>= 3.0.0). 270s dhcpcd-base depends on libssl3 (>= 3.0.0). 270s bind9-libs:armhf depends on libssl3 (>= 3.0.0). 270s 270s Removing libssl3:armhf (3.0.10-1ubuntu4) ... 270s Selecting previously unselected package libssl3t64:armhf. 270s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78646 files and directories currently installed.) 270s Preparing to unpack .../libssl3t64_3.0.13-0ubuntu2_armhf.deb ... 270s Unpacking libssl3t64:armhf (3.0.13-0ubuntu2) ... 270s Setting up libssl3t64:armhf (3.0.13-0ubuntu2) ... 270s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78659 files and directories currently installed.) 270s Preparing to unpack .../libudev1_255.4-1ubuntu5_armhf.deb ... 270s Unpacking libudev1:armhf (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 270s Setting up libudev1:armhf (255.4-1ubuntu5) ... 270s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78659 files and directories currently installed.) 270s Preparing to unpack .../systemd_255.4-1ubuntu5_armhf.deb ... 270s Unpacking systemd (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 271s Preparing to unpack .../udev_255.4-1ubuntu5_armhf.deb ... 271s Unpacking udev (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 271s Preparing to unpack .../libsystemd0_255.4-1ubuntu5_armhf.deb ... 271s Unpacking libsystemd0:armhf (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 271s Setting up libsystemd0:armhf (255.4-1ubuntu5) ... 271s Setting up libsystemd-shared:armhf (255.4-1ubuntu5) ... 271s Setting up systemd-dev (255.4-1ubuntu5) ... 271s Setting up systemd (255.4-1ubuntu5) ... 273s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78659 files and directories currently installed.) 273s Preparing to unpack .../systemd-sysv_255.4-1ubuntu5_armhf.deb ... 273s Unpacking systemd-sysv (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 273s Preparing to unpack .../libnss-systemd_255.4-1ubuntu5_armhf.deb ... 273s Unpacking libnss-systemd:armhf (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 273s Preparing to unpack .../libpam-systemd_255.4-1ubuntu5_armhf.deb ... 273s Unpacking libpam-systemd:armhf (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 273s Preparing to unpack .../libpam-modules-bin_1.5.3-5ubuntu3_armhf.deb ... 273s Unpacking libpam-modules-bin (1.5.3-5ubuntu3) over (1.5.2-9.1ubuntu3) ... 273s Setting up libpam-modules-bin (1.5.3-5ubuntu3) ... 273s pam_namespace.service is a disabled or a static unit not running, not starting it. 274s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78659 files and directories currently installed.) 274s Preparing to unpack .../libpam-modules_1.5.3-5ubuntu3_armhf.deb ... 274s Unpacking libpam-modules:armhf (1.5.3-5ubuntu3) over (1.5.2-9.1ubuntu3) ... 274s Setting up libpam-modules:armhf (1.5.3-5ubuntu3) ... 274s Installing new version of config file /etc/security/namespace.init ... 274s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78657 files and directories currently installed.) 274s Preparing to unpack .../libpam-runtime_1.5.3-5ubuntu3_all.deb ... 274s Unpacking libpam-runtime (1.5.3-5ubuntu3) over (1.5.2-9.1ubuntu3) ... 274s Setting up libpam-runtime (1.5.3-5ubuntu3) ... 275s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78657 files and directories currently installed.) 275s Preparing to unpack .../0-dbus-user-session_1.14.10-4ubuntu2_armhf.deb ... 275s Unpacking dbus-user-session (1.14.10-4ubuntu2) over (1.14.10-4ubuntu1) ... 275s Preparing to unpack .../1-libapparmor1_4.0.0-beta3-0ubuntu2_armhf.deb ... 275s Unpacking libapparmor1:armhf (4.0.0-beta3-0ubuntu2) over (4.0.0~alpha4-0ubuntu1) ... 275s Preparing to unpack .../2-dbus-bin_1.14.10-4ubuntu2_armhf.deb ... 275s Unpacking dbus-bin (1.14.10-4ubuntu2) over (1.14.10-4ubuntu1) ... 275s Preparing to unpack .../3-dbus-system-bus-common_1.14.10-4ubuntu2_all.deb ... 275s Unpacking dbus-system-bus-common (1.14.10-4ubuntu2) over (1.14.10-4ubuntu1) ... 275s Preparing to unpack .../4-dbus_1.14.10-4ubuntu2_armhf.deb ... 275s Unpacking dbus (1.14.10-4ubuntu2) over (1.14.10-4ubuntu1) ... 275s Preparing to unpack .../5-dbus-daemon_1.14.10-4ubuntu2_armhf.deb ... 275s Unpacking dbus-daemon (1.14.10-4ubuntu2) over (1.14.10-4ubuntu1) ... 275s Preparing to unpack .../6-libdbus-1-3_1.14.10-4ubuntu2_armhf.deb ... 275s Unpacking libdbus-1-3:armhf (1.14.10-4ubuntu2) over (1.14.10-4ubuntu1) ... 275s Preparing to unpack .../7-kmod_31+20240202-2ubuntu4_armhf.deb ... 275s Unpacking kmod (31+20240202-2ubuntu4) over (30+20230601-2ubuntu1) ... 275s dpkg: warning: unable to delete old directory '/lib/modprobe.d': Directory not empty 275s Preparing to unpack .../8-libkmod2_31+20240202-2ubuntu4_armhf.deb ... 275s Unpacking libkmod2:armhf (31+20240202-2ubuntu4) over (30+20230601-2ubuntu1) ... 275s Preparing to unpack .../9-libmount1_2.39.3-9ubuntu2_armhf.deb ... 275s Unpacking libmount1:armhf (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 275s Setting up libmount1:armhf (2.39.3-9ubuntu2) ... 275s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78656 files and directories currently installed.) 275s Preparing to unpack .../libseccomp2_2.5.5-1ubuntu2_armhf.deb ... 275s Unpacking libseccomp2:armhf (2.5.5-1ubuntu2) over (2.5.5-1ubuntu1) ... 275s Setting up libseccomp2:armhf (2.5.5-1ubuntu2) ... 276s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78656 files and directories currently installed.) 276s Preparing to unpack .../libuuid1_2.39.3-9ubuntu2_armhf.deb ... 276s Unpacking libuuid1:armhf (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 276s Setting up libuuid1:armhf (2.39.3-9ubuntu2) ... 276s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78656 files and directories currently installed.) 276s Preparing to unpack .../0-libcryptsetup12_2%3a2.7.0-1ubuntu2_armhf.deb ... 276s Unpacking libcryptsetup12:armhf (2:2.7.0-1ubuntu2) over (2:2.7.0-1ubuntu1) ... 276s Preparing to unpack .../1-libfdisk1_2.39.3-9ubuntu2_armhf.deb ... 276s Unpacking libfdisk1:armhf (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 276s Preparing to unpack .../2-mount_2.39.3-9ubuntu2_armhf.deb ... 276s Unpacking mount (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 276s Preparing to unpack .../3-libdevmapper1.02.1_2%3a1.02.185-3ubuntu2_armhf.deb ... 276s Unpacking libdevmapper1.02.1:armhf (2:1.02.185-3ubuntu2) over (2:1.02.185-3ubuntu1) ... 276s Selecting previously unselected package libparted2t64:armhf. 276s Preparing to unpack .../4-libparted2t64_3.6-3.1build2_armhf.deb ... 276s Unpacking libparted2t64:armhf (3.6-3.1build2) ... 276s Preparing to unpack .../5-libsqlite3-0_3.45.1-1ubuntu1_armhf.deb ... 276s Unpacking libsqlite3-0:armhf (3.45.1-1ubuntu1) over (3.45.1-1) ... 276s Preparing to unpack .../6-pinentry-curses_1.2.1-3ubuntu4_armhf.deb ... 276s Unpacking pinentry-curses (1.2.1-3ubuntu4) over (1.2.1-3ubuntu1) ... 276s Preparing to unpack .../7-libsmartcols1_2.39.3-9ubuntu2_armhf.deb ... 276s Unpacking libsmartcols1:armhf (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 276s Setting up libsmartcols1:armhf (2.39.3-9ubuntu2) ... 276s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78663 files and directories currently installed.) 277s Preparing to unpack .../0-readline-common_8.2-4_all.deb ... 277s Unpacking readline-common (8.2-4) over (8.2-3) ... 277s Preparing to unpack .../1-python3-yaml_6.0.1-2build1_armhf.deb ... 277s Unpacking python3-yaml (6.0.1-2build1) over (6.0.1-2) ... 277s Preparing to unpack .../2-python-apt-common_2.7.7_all.deb ... 277s Unpacking python-apt-common (2.7.7) over (2.7.6) ... 277s Preparing to unpack .../3-python3-setuptools_68.1.2-2ubuntu1_all.deb ... 277s Unpacking python3-setuptools (68.1.2-2ubuntu1) over (68.1.2-2) ... 277s Preparing to unpack .../4-python3-pkg-resources_68.1.2-2ubuntu1_all.deb ... 278s Unpacking python3-pkg-resources (68.1.2-2ubuntu1) over (68.1.2-2) ... 278s Preparing to unpack .../5-dpkg_1.22.6ubuntu4_armhf.deb ... 278s Unpacking dpkg (1.22.6ubuntu4) over (1.22.4ubuntu5) ... 278s Setting up dpkg (1.22.6ubuntu4) ... 279s Setting up libpython3.12-minimal:armhf (3.12.2-4build3) ... 279s Setting up libexpat1:armhf (2.6.1-2) ... 279s Setting up python3.12-minimal (3.12.2-4build3) ... 281s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78662 files and directories currently installed.) 281s Preparing to unpack .../python3-minimal_3.12.2-0ubuntu1_armhf.deb ... 281s Unpacking python3-minimal (3.12.2-0ubuntu1) over (3.12.1-0ubuntu2) ... 281s Setting up python3-minimal (3.12.2-0ubuntu1) ... 282s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78662 files and directories currently installed.) 282s Preparing to unpack .../00-python3_3.12.2-0ubuntu1_armhf.deb ... 282s Unpacking python3 (3.12.2-0ubuntu1) over (3.12.1-0ubuntu2) ... 282s Preparing to unpack .../01-libpython3-stdlib_3.12.2-0ubuntu1_armhf.deb ... 282s Unpacking libpython3-stdlib:armhf (3.12.2-0ubuntu1) over (3.12.1-0ubuntu2) ... 282s Preparing to unpack .../02-bsdextrautils_2.39.3-9ubuntu2_armhf.deb ... 282s Unpacking bsdextrautils (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 282s Preparing to unpack .../03-groff-base_1.23.0-3build1_armhf.deb ... 282s Unpacking groff-base (1.23.0-3build1) over (1.23.0-3) ... 282s Preparing to unpack .../04-libsasl2-2_2.1.28+dfsg1-5ubuntu1_armhf.deb ... 282s Unpacking libsasl2-2:armhf (2.1.28+dfsg1-5ubuntu1) over (2.1.28+dfsg1-4) ... 282s Preparing to unpack .../05-libblockdev-utils3_3.1.0-1build1_armhf.deb ... 282s Unpacking libblockdev-utils3:armhf (3.1.0-1build1) over (3.1.0-1) ... 283s Preparing to unpack .../06-libblockdev-crypto3_3.1.0-1build1_armhf.deb ... 283s Unpacking libblockdev-crypto3:armhf (3.1.0-1build1) over (3.1.0-1) ... 283s Preparing to unpack .../07-logsave_1.47.0-2.4~exp1ubuntu2_armhf.deb ... 283s Unpacking logsave (1.47.0-2.4~exp1ubuntu2) over (1.47.0-2ubuntu1) ... 283s Preparing to unpack .../08-dhcpcd-base_1%3a10.0.6-1ubuntu2_armhf.deb ... 283s Unpacking dhcpcd-base (1:10.0.6-1ubuntu2) over (1:10.0.6-1ubuntu1) ... 283s Preparing to unpack .../09-eject_2.39.3-9ubuntu2_armhf.deb ... 283s Unpacking eject (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 283s Preparing to unpack .../10-libbpf1_1%3a1.3.0-2build1_armhf.deb ... 283s Unpacking libbpf1:armhf (1:1.3.0-2build1) over (1:1.3.0-2) ... 283s Preparing to unpack .../11-iproute2_6.1.0-1ubuntu5_armhf.deb ... 283s Unpacking iproute2 (6.1.0-1ubuntu5) over (6.1.0-1ubuntu2) ... 283s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78662 files and directories currently installed.) 283s Removing libelf1:armhf (0.190-1) ... 283s Selecting previously unselected package libelf1t64:armhf. 283s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78657 files and directories currently installed.) 283s Preparing to unpack .../libelf1t64_0.190-1.1build2_armhf.deb ... 283s Unpacking libelf1t64:armhf (0.190-1.1build2) ... 283s Preparing to unpack .../libtirpc-common_1.3.4+ds-1.1_all.deb ... 283s Unpacking libtirpc-common (1.3.4+ds-1.1) over (1.3.4+ds-1build1) ... 284s Preparing to unpack .../lsof_4.95.0-1build2_armhf.deb ... 284s Unpacking lsof (4.95.0-1build2) over (4.95.0-1build1) ... 284s Preparing to unpack .../libnsl2_1.3.0-3build2_armhf.deb ... 284s Unpacking libnsl2:armhf (1.3.0-3build2) over (1.3.0-3) ... 284s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78662 files and directories currently installed.) 284s Removing libtirpc3:armhf (1.3.4+ds-1build1) ... 284s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78656 files and directories currently installed.) 284s Preparing to unpack .../0-libgssapi-krb5-2_1.20.1-6ubuntu1_armhf.deb ... 284s Unpacking libgssapi-krb5-2:armhf (1.20.1-6ubuntu1) over (1.20.1-5build1) ... 284s Preparing to unpack .../1-libkrb5-3_1.20.1-6ubuntu1_armhf.deb ... 284s Unpacking libkrb5-3:armhf (1.20.1-6ubuntu1) over (1.20.1-5build1) ... 284s Preparing to unpack .../2-libkrb5support0_1.20.1-6ubuntu1_armhf.deb ... 284s Unpacking libkrb5support0:armhf (1.20.1-6ubuntu1) over (1.20.1-5build1) ... 284s Preparing to unpack .../3-libk5crypto3_1.20.1-6ubuntu1_armhf.deb ... 284s Unpacking libk5crypto3:armhf (1.20.1-6ubuntu1) over (1.20.1-5build1) ... 284s Preparing to unpack .../4-libcom-err2_1.47.0-2.4~exp1ubuntu2_armhf.deb ... 284s Unpacking libcom-err2:armhf (1.47.0-2.4~exp1ubuntu2) over (1.47.0-2ubuntu1) ... 284s Selecting previously unselected package libtirpc3t64:armhf. 284s Preparing to unpack .../5-libtirpc3t64_1.3.4+ds-1.1_armhf.deb ... 284s Adding 'diversion of /lib/arm-linux-gnueabihf/libtirpc.so.3 to /lib/arm-linux-gnueabihf/libtirpc.so.3.usr-is-merged by libtirpc3t64' 284s Adding 'diversion of /lib/arm-linux-gnueabihf/libtirpc.so.3.0.0 to /lib/arm-linux-gnueabihf/libtirpc.so.3.0.0.usr-is-merged by libtirpc3t64' 284s Unpacking libtirpc3t64:armhf (1.3.4+ds-1.1) ... 284s Preparing to unpack .../6-libc-bin_2.39-0ubuntu6_armhf.deb ... 284s Unpacking libc-bin (2.39-0ubuntu6) over (2.39-0ubuntu2) ... 284s Setting up libc-bin (2.39-0ubuntu6) ... 285s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78667 files and directories currently installed.) 285s Preparing to unpack .../0-locales_2.39-0ubuntu6_all.deb ... 285s Unpacking locales (2.39-0ubuntu6) over (2.39-0ubuntu2) ... 285s Preparing to unpack .../1-libproc2-0_2%3a4.0.4-4ubuntu2_armhf.deb ... 285s Unpacking libproc2-0:armhf (2:4.0.4-4ubuntu2) over (2:4.0.4-4ubuntu1) ... 285s Preparing to unpack .../2-procps_2%3a4.0.4-4ubuntu2_armhf.deb ... 286s Unpacking procps (2:4.0.4-4ubuntu2) over (2:4.0.4-4ubuntu1) ... 286s Preparing to unpack .../3-vim-tiny_2%3a9.1.0016-1ubuntu6_armhf.deb ... 286s Unpacking vim-tiny (2:9.1.0016-1ubuntu6) over (2:9.1.0016-1ubuntu2) ... 286s Preparing to unpack .../4-vim-common_2%3a9.1.0016-1ubuntu6_all.deb ... 286s Unpacking vim-common (2:9.1.0016-1ubuntu6) over (2:9.1.0016-1ubuntu2) ... 286s Preparing to unpack .../5-e2fsprogs-l10n_1.47.0-2.4~exp1ubuntu2_all.deb ... 286s Unpacking e2fsprogs-l10n (1.47.0-2.4~exp1ubuntu2) over (1.47.0-2ubuntu1) ... 286s Preparing to unpack .../6-libblockdev-fs3_3.1.0-1build1_armhf.deb ... 286s Unpacking libblockdev-fs3:armhf (3.1.0-1build1) over (3.1.0-1) ... 286s dpkg: libreiserfscore0: dependency problems, but removing anyway as you requested: 286s btrfs-progs depends on libreiserfscore0 (>= 1:3.6.27). 286s 286s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78668 files and directories currently installed.) 286s Removing libreiserfscore0 (1:3.6.27-7) ... 286s Selecting previously unselected package libreiserfscore0t64. 286s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78663 files and directories currently installed.) 286s Preparing to unpack .../libreiserfscore0t64_1%3a3.6.27-7.1_armhf.deb ... 286s Unpacking libreiserfscore0t64 (1:3.6.27-7.1) ... 286s Preparing to unpack .../btrfs-progs_6.6.3-1.1build1_armhf.deb ... 286s Unpacking btrfs-progs (6.6.3-1.1build1) over (6.6.3-1.1) ... 286s dpkg: libext2fs2:armhf: dependency problems, but removing anyway as you requested: 286s e2fsprogs depends on libext2fs2 (= 1.47.0-2ubuntu1). 286s 286s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78669 files and directories currently installed.) 286s Removing libext2fs2:armhf (1.47.0-2ubuntu1) ... 287s Selecting previously unselected package libext2fs2t64:armhf. 287s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78662 files and directories currently installed.) 287s Preparing to unpack .../libext2fs2t64_1.47.0-2.4~exp1ubuntu2_armhf.deb ... 287s Adding 'diversion of /lib/arm-linux-gnueabihf/libe2p.so.2 to /lib/arm-linux-gnueabihf/libe2p.so.2.usr-is-merged by libext2fs2t64' 287s Adding 'diversion of /lib/arm-linux-gnueabihf/libe2p.so.2.3 to /lib/arm-linux-gnueabihf/libe2p.so.2.3.usr-is-merged by libext2fs2t64' 287s Adding 'diversion of /lib/arm-linux-gnueabihf/libext2fs.so.2 to /lib/arm-linux-gnueabihf/libext2fs.so.2.usr-is-merged by libext2fs2t64' 287s Adding 'diversion of /lib/arm-linux-gnueabihf/libext2fs.so.2.4 to /lib/arm-linux-gnueabihf/libext2fs.so.2.4.usr-is-merged by libext2fs2t64' 287s Unpacking libext2fs2t64:armhf (1.47.0-2.4~exp1ubuntu2) ... 287s Setting up libcom-err2:armhf (1.47.0-2.4~exp1ubuntu2) ... 287s Setting up libext2fs2t64:armhf (1.47.0-2.4~exp1ubuntu2) ... 287s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78678 files and directories currently installed.) 287s Preparing to unpack .../e2fsprogs_1.47.0-2.4~exp1ubuntu2_armhf.deb ... 287s Unpacking e2fsprogs (1.47.0-2.4~exp1ubuntu2) over (1.47.0-2ubuntu1) ... 287s Preparing to unpack .../libblockdev-loop3_3.1.0-1build1_armhf.deb ... 287s Unpacking libblockdev-loop3:armhf (3.1.0-1build1) over (3.1.0-1) ... 287s Preparing to unpack .../libblockdev-mdraid3_3.1.0-1build1_armhf.deb ... 287s Unpacking libblockdev-mdraid3:armhf (3.1.0-1build1) over (3.1.0-1) ... 287s Preparing to unpack .../libblockdev-nvme3_3.1.0-1build1_armhf.deb ... 287s Unpacking libblockdev-nvme3:armhf (3.1.0-1build1) over (3.1.0-1) ... 287s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78678 files and directories currently installed.) 287s Removing libnvme1 (1.8-2) ... 287s Selecting previously unselected package libnvme1t64. 287s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78671 files and directories currently installed.) 287s Preparing to unpack .../00-libnvme1t64_1.8-3_armhf.deb ... 287s Unpacking libnvme1t64 (1.8-3) ... 287s Preparing to unpack .../01-libblockdev-part3_3.1.0-1build1_armhf.deb ... 287s Unpacking libblockdev-part3:armhf (3.1.0-1build1) over (3.1.0-1) ... 288s Preparing to unpack .../02-libblockdev-swap3_3.1.0-1build1_armhf.deb ... 288s Unpacking libblockdev-swap3:armhf (3.1.0-1build1) over (3.1.0-1) ... 288s Preparing to unpack .../03-libblockdev3_3.1.0-1build1_armhf.deb ... 288s Unpacking libblockdev3:armhf (3.1.0-1build1) over (3.1.0-1) ... 288s Preparing to unpack .../04-libgudev-1.0-0_1%3a238-3ubuntu2_armhf.deb ... 288s Unpacking libgudev-1.0-0:armhf (1:238-3ubuntu2) over (1:238-3) ... 288s Preparing to unpack .../05-libxml2_2.9.14+dfsg-1.3ubuntu2_armhf.deb ... 288s Unpacking libxml2:armhf (2.9.14+dfsg-1.3ubuntu2) over (2.9.14+dfsg-1.3ubuntu1) ... 288s Preparing to unpack .../06-libmbim-proxy_1.31.2-0ubuntu2_armhf.deb ... 288s Unpacking libmbim-proxy (1.31.2-0ubuntu2) over (1.30.0-1) ... 288s Preparing to unpack .../07-libmbim-glib4_1.31.2-0ubuntu2_armhf.deb ... 288s Unpacking libmbim-glib4:armhf (1.31.2-0ubuntu2) over (1.30.0-1) ... 288s Preparing to unpack .../08-libjson-glib-1.0-common_1.8.0-2build1_all.deb ... 288s Unpacking libjson-glib-1.0-common (1.8.0-2build1) over (1.8.0-2) ... 288s Preparing to unpack .../09-libjson-glib-1.0-0_1.8.0-2build1_armhf.deb ... 288s Unpacking libjson-glib-1.0-0:armhf (1.8.0-2build1) over (1.8.0-2) ... 288s Preparing to unpack .../10-libusb-1.0-0_2%3a1.0.27-1_armhf.deb ... 288s Unpacking libusb-1.0-0:armhf (2:1.0.27-1) over (2:1.0.26-1) ... 288s Preparing to unpack .../11-libgusb2_0.4.8-1build1_armhf.deb ... 288s Unpacking libgusb2:armhf (0.4.8-1build1) over (0.4.8-1) ... 288s Preparing to unpack .../12-libmm-glib0_1.23.4-0ubuntu1_armhf.deb ... 288s Unpacking libmm-glib0:armhf (1.23.4-0ubuntu1) over (1.22.0-3) ... 288s Preparing to unpack .../13-libprotobuf-c1_1.4.1-1ubuntu3_armhf.deb ... 288s Unpacking libprotobuf-c1:armhf (1.4.1-1ubuntu3) over (1.4.1-1ubuntu2) ... 288s Preparing to unpack .../14-libbrotli1_1.1.0-2build1_armhf.deb ... 288s Unpacking libbrotli1:armhf (1.1.0-2build1) over (1.1.0-2) ... 288s Preparing to unpack .../15-libnghttp2-14_1.59.0-1build1_armhf.deb ... 288s Unpacking libnghttp2-14:armhf (1.59.0-1build1) over (1.59.0-1) ... 288s Preparing to unpack .../16-libssh-4_0.10.6-2build1_armhf.deb ... 288s Unpacking libssh-4:armhf (0.10.6-2build1) over (0.10.6-2) ... 289s Preparing to unpack .../17-libibverbs1_50.0-2build1_armhf.deb ... 289s Unpacking libibverbs1:armhf (50.0-2build1) over (50.0-2) ... 289s Preparing to unpack .../18-libfido2-1_1.14.0-1build1_armhf.deb ... 289s Unpacking libfido2-1:armhf (1.14.0-1build1) over (1.14.0-1) ... 289s Preparing to unpack .../19-coreutils_9.4-3ubuntu3_armhf.deb ... 289s Unpacking coreutils (9.4-3ubuntu3) over (9.4-2ubuntu4) ... 289s Setting up coreutils (9.4-3ubuntu3) ... 289s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78679 files and directories currently installed.) 289s Preparing to unpack .../debianutils_5.17_armhf.deb ... 289s Unpacking debianutils (5.17) over (5.16) ... 289s Setting up debianutils (5.17) ... 289s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78679 files and directories currently installed.) 289s Preparing to unpack .../util-linux_2.39.3-9ubuntu2_armhf.deb ... 289s Unpacking util-linux (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 290s Setting up util-linux (2.39.3-9ubuntu2) ... 291s fstrim.service is a disabled or a static unit not running, not starting it. 291s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78679 files and directories currently installed.) 291s Removing libatm1:armhf (1:2.5.1-5) ... 291s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78674 files and directories currently installed.) 291s Preparing to unpack .../curl_8.5.0-2ubuntu8_armhf.deb ... 291s Unpacking curl (8.5.0-2ubuntu8) over (8.5.0-2ubuntu2) ... 291s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78674 files and directories currently installed.) 291s Removing libcurl4:armhf (8.5.0-2ubuntu2) ... 291s Selecting previously unselected package libcurl4t64:armhf. 292s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78669 files and directories currently installed.) 292s Preparing to unpack .../libcurl4t64_8.5.0-2ubuntu8_armhf.deb ... 292s Unpacking libcurl4t64:armhf (8.5.0-2ubuntu8) ... 292s Preparing to unpack .../file_1%3a5.45-3_armhf.deb ... 292s Unpacking file (1:5.45-3) over (1:5.45-2) ... 292s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78675 files and directories currently installed.) 292s Removing libmagic1:armhf (1:5.45-2) ... 292s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78665 files and directories currently installed.) 292s Preparing to unpack .../libmagic-mgc_1%3a5.45-3_armhf.deb ... 292s Unpacking libmagic-mgc (1:5.45-3) over (1:5.45-2) ... 292s Selecting previously unselected package libmagic1t64:armhf. 292s Preparing to unpack .../libmagic1t64_1%3a5.45-3_armhf.deb ... 292s Unpacking libmagic1t64:armhf (1:5.45-3) ... 292s Preparing to unpack .../libplymouth5_24.004.60-1ubuntu6_armhf.deb ... 292s Unpacking libplymouth5:armhf (24.004.60-1ubuntu6) over (24.004.60-1ubuntu3) ... 292s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78676 files and directories currently installed.) 292s Removing libpng16-16:armhf (1.6.43-1) ... 292s Selecting previously unselected package libpng16-16t64:armhf. 292s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78666 files and directories currently installed.) 292s Preparing to unpack .../libpng16-16t64_1.6.43-3_armhf.deb ... 292s Unpacking libpng16-16t64:armhf (1.6.43-3) ... 293s Preparing to unpack .../bind9-host_1%3a9.18.24-0ubuntu3_armhf.deb ... 293s Unpacking bind9-host (1:9.18.24-0ubuntu3) over (1:9.18.21-0ubuntu1) ... 293s Preparing to unpack .../bind9-dnsutils_1%3a9.18.24-0ubuntu3_armhf.deb ... 293s Unpacking bind9-dnsutils (1:9.18.24-0ubuntu3) over (1:9.18.21-0ubuntu1) ... 293s Preparing to unpack .../bind9-libs_1%3a9.18.24-0ubuntu3_armhf.deb ... 293s Unpacking bind9-libs:armhf (1:9.18.24-0ubuntu3) over (1:9.18.21-0ubuntu1) ... 293s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78677 files and directories currently installed.) 293s Removing libuv1:armhf (1.48.0-1) ... 293s Selecting previously unselected package libuv1t64:armhf. 293s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78672 files and directories currently installed.) 293s Preparing to unpack .../libuv1t64_1.48.0-1.1_armhf.deb ... 293s Unpacking libuv1t64:armhf (1.48.0-1.1) ... 293s Preparing to unpack .../uuid-runtime_2.39.3-9ubuntu2_armhf.deb ... 293s Unpacking uuid-runtime (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 293s Preparing to unpack .../libdebconfclient0_0.271ubuntu2_armhf.deb ... 293s Unpacking libdebconfclient0:armhf (0.271ubuntu2) over (0.271ubuntu1) ... 293s Setting up libdebconfclient0:armhf (0.271ubuntu2) ... 293s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78678 files and directories currently installed.) 293s Preparing to unpack .../libsemanage-common_3.5-1build4_all.deb ... 293s Unpacking libsemanage-common (3.5-1build4) over (3.5-1build2) ... 293s Setting up libsemanage-common (3.5-1build4) ... 293s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78678 files and directories currently installed.) 293s Preparing to unpack .../libsemanage2_3.5-1build4_armhf.deb ... 293s Unpacking libsemanage2:armhf (3.5-1build4) over (3.5-1build2) ... 294s Setting up libsemanage2:armhf (3.5-1build4) ... 294s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78678 files and directories currently installed.) 294s Preparing to unpack .../install-info_7.1-3build1_armhf.deb ... 294s Unpacking install-info (7.1-3build1) over (7.1-3) ... 294s Setting up install-info (7.1-3build1) ... 294s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78678 files and directories currently installed.) 294s Preparing to unpack .../00-gcc-13-base_13.2.0-21ubuntu1_armhf.deb ... 294s Unpacking gcc-13-base:armhf (13.2.0-21ubuntu1) over (13.2.0-17ubuntu2) ... 294s Preparing to unpack .../01-libss2_1.47.0-2.4~exp1ubuntu2_armhf.deb ... 294s Unpacking libss2:armhf (1.47.0-2.4~exp1ubuntu2) over (1.47.0-2ubuntu1) ... 294s Preparing to unpack .../02-dmsetup_2%3a1.02.185-3ubuntu2_armhf.deb ... 294s Unpacking dmsetup (2:1.02.185-3ubuntu2) over (2:1.02.185-3ubuntu1) ... 294s Preparing to unpack .../03-krb5-locales_1.20.1-6ubuntu1_all.deb ... 294s Unpacking krb5-locales (1.20.1-6ubuntu1) over (1.20.1-5build1) ... 294s Preparing to unpack .../04-libbsd0_0.12.1-1_armhf.deb ... 294s Unpacking libbsd0:armhf (0.12.1-1) over (0.11.8-1) ... 294s Preparing to unpack .../05-libglib2.0-data_2.79.3-3ubuntu5_all.deb ... 294s Unpacking libglib2.0-data (2.79.3-3ubuntu5) over (2.79.2-1~ubuntu1) ... 294s Preparing to unpack .../06-libslang2_2.3.3-3build1_armhf.deb ... 294s Unpacking libslang2:armhf (2.3.3-3build1) over (2.3.3-3) ... 294s Preparing to unpack .../07-rsyslog_8.2312.0-3ubuntu7_armhf.deb ... 294s Unpacking rsyslog (8.2312.0-3ubuntu7) over (8.2312.0-3ubuntu3) ... 295s Selecting previously unselected package xdg-user-dirs. 295s Preparing to unpack .../08-xdg-user-dirs_0.18-1_armhf.deb ... 295s Unpacking xdg-user-dirs (0.18-1) ... 295s Preparing to unpack .../09-xxd_2%3a9.1.0016-1ubuntu6_armhf.deb ... 295s Unpacking xxd (2:9.1.0016-1ubuntu6) over (2:9.1.0016-1ubuntu2) ... 295s Preparing to unpack .../10-apparmor_4.0.0-beta3-0ubuntu2_armhf.deb ... 296s Unpacking apparmor (4.0.0-beta3-0ubuntu2) over (4.0.0~alpha4-0ubuntu1) ... 297s Preparing to unpack .../11-ftp_20230507-2build1_all.deb ... 297s Unpacking ftp (20230507-2build1) over (20230507-2) ... 297s Preparing to unpack .../12-inetutils-telnet_2%3a2.5-3ubuntu3_armhf.deb ... 297s Unpacking inetutils-telnet (2:2.5-3ubuntu3) over (2:2.5-3ubuntu1) ... 297s Preparing to unpack .../13-info_7.1-3build1_armhf.deb ... 297s Unpacking info (7.1-3build1) over (7.1-3) ... 297s Preparing to unpack .../14-libxmuu1_2%3a1.1.3-3build1_armhf.deb ... 297s Unpacking libxmuu1:armhf (2:1.1.3-3build1) over (2:1.1.3-3) ... 297s Preparing to unpack .../15-lshw_02.19.git.2021.06.19.996aaad9c7-2build2_armhf.deb ... 297s Unpacking lshw (02.19.git.2021.06.19.996aaad9c7-2build2) over (02.19.git.2021.06.19.996aaad9c7-2build1) ... 297s Preparing to unpack .../16-mtr-tiny_0.95-1.1build1_armhf.deb ... 297s Unpacking mtr-tiny (0.95-1.1build1) over (0.95-1.1) ... 297s Preparing to unpack .../17-plymouth-theme-ubuntu-text_24.004.60-1ubuntu6_armhf.deb ... 297s Unpacking plymouth-theme-ubuntu-text (24.004.60-1ubuntu6) over (24.004.60-1ubuntu3) ... 297s Preparing to unpack .../18-plymouth_24.004.60-1ubuntu6_armhf.deb ... 297s Unpacking plymouth (24.004.60-1ubuntu6) over (24.004.60-1ubuntu3) ... 297s Preparing to unpack .../19-psmisc_23.7-1_armhf.deb ... 297s Unpacking psmisc (23.7-1) over (23.6-2) ... 297s Preparing to unpack .../20-telnet_0.17+2.5-3ubuntu3_all.deb ... 298s Unpacking telnet (0.17+2.5-3ubuntu3) over (0.17+2.5-3ubuntu1) ... 298s Preparing to unpack .../21-xz-utils_5.6.0-0.2_armhf.deb ... 298s Unpacking xz-utils (5.6.0-0.2) over (5.4.5-0.3) ... 298s Preparing to unpack .../22-ubuntu-standard_1.536build1_armhf.deb ... 298s Unpacking ubuntu-standard (1.536build1) over (1.536) ... 298s Preparing to unpack .../23-usb.ids_2024.03.18-1_all.deb ... 298s Unpacking usb.ids (2024.03.18-1) over (2024.01.30-1) ... 298s Preparing to unpack .../24-libctf-nobfd0_2.42-4ubuntu1_armhf.deb ... 298s Unpacking libctf-nobfd0:armhf (2.42-4ubuntu1) over (2.42-3ubuntu1) ... 298s Preparing to unpack .../25-libctf0_2.42-4ubuntu1_armhf.deb ... 298s Unpacking libctf0:armhf (2.42-4ubuntu1) over (2.42-3ubuntu1) ... 298s Preparing to unpack .../26-binutils-arm-linux-gnueabihf_2.42-4ubuntu1_armhf.deb ... 298s Unpacking binutils-arm-linux-gnueabihf (2.42-4ubuntu1) over (2.42-3ubuntu1) ... 298s Preparing to unpack .../27-libbinutils_2.42-4ubuntu1_armhf.deb ... 298s Unpacking libbinutils:armhf (2.42-4ubuntu1) over (2.42-3ubuntu1) ... 298s Preparing to unpack .../28-binutils_2.42-4ubuntu1_armhf.deb ... 298s Unpacking binutils (2.42-4ubuntu1) over (2.42-3ubuntu1) ... 298s Preparing to unpack .../29-binutils-common_2.42-4ubuntu1_armhf.deb ... 298s Unpacking binutils-common:armhf (2.42-4ubuntu1) over (2.42-3ubuntu1) ... 298s Preparing to unpack .../30-libsframe1_2.42-4ubuntu1_armhf.deb ... 298s Unpacking libsframe1:armhf (2.42-4ubuntu1) over (2.42-3ubuntu1) ... 298s Preparing to unpack .../31-bolt_0.9.6-2build1_armhf.deb ... 298s Unpacking bolt (0.9.6-2build1) over (0.9.6-2) ... 299s Preparing to unpack .../32-cryptsetup-bin_2%3a2.7.0-1ubuntu2_armhf.deb ... 299s Unpacking cryptsetup-bin (2:2.7.0-1ubuntu2) over (2:2.7.0-1ubuntu1) ... 299s Preparing to unpack .../33-dpkg-dev_1.22.6ubuntu4_all.deb ... 299s Unpacking dpkg-dev (1.22.6ubuntu4) over (1.22.4ubuntu5) ... 299s Preparing to unpack .../34-libdpkg-perl_1.22.6ubuntu4_all.deb ... 299s Unpacking libdpkg-perl (1.22.6ubuntu4) over (1.22.4ubuntu5) ... 299s Preparing to unpack .../35-fonts-ubuntu-console_0.869+git20240321-0ubuntu1_all.deb ... 299s Unpacking fonts-ubuntu-console (0.869+git20240321-0ubuntu1) over (0.869-0ubuntu1) ... 299s Preparing to unpack .../36-gnupg-l10n_2.4.4-2ubuntu15_all.deb ... 299s Unpacking gnupg-l10n (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 299s Preparing to unpack .../37-ibverbs-providers_50.0-2build1_armhf.deb ... 299s Unpacking ibverbs-providers:armhf (50.0-2build1) over (50.0-2) ... 299s Preparing to unpack .../38-jq_1.7.1-3_armhf.deb ... 299s Unpacking jq (1.7.1-3) over (1.7.1-2) ... 299s Preparing to unpack .../39-libjq1_1.7.1-3_armhf.deb ... 299s Unpacking libjq1:armhf (1.7.1-3) over (1.7.1-2) ... 299s Selecting previously unselected package libatm1t64:armhf. 299s Preparing to unpack .../40-libatm1t64_1%3a2.5.1-5.1_armhf.deb ... 299s Unpacking libatm1t64:armhf (1:2.5.1-5.1) ... 299s Preparing to unpack .../41-libevent-core-2.1-7_2.1.12-stable-9build1_armhf.deb ... 299s Unpacking libevent-core-2.1-7:armhf (2.1.12-stable-9build1) over (2.1.12-stable-9) ... 300s Preparing to unpack .../42-libftdi1-2_1.5-6build4_armhf.deb ... 300s Unpacking libftdi1-2:armhf (1.5-6build4) over (1.5-6build3) ... 300s Preparing to unpack .../43-libldap-common_2.6.7+dfsg-1~exp1ubuntu6_all.deb ... 300s Unpacking libldap-common (2.6.7+dfsg-1~exp1ubuntu6) over (2.6.7+dfsg-1~exp1ubuntu1) ... 300s Preparing to unpack .../44-libsasl2-modules_2.1.28+dfsg1-5ubuntu1_armhf.deb ... 300s Unpacking libsasl2-modules:armhf (2.1.28+dfsg1-5ubuntu1) over (2.1.28+dfsg1-4) ... 300s Preparing to unpack .../45-python3-distutils_3.12.2-3ubuntu1.1_all.deb ... 300s Unpacking python3-distutils (3.12.2-3ubuntu1.1) over (3.11.5-1) ... 300s Preparing to unpack .../46-python3-lib2to3_3.12.2-3ubuntu1.1_all.deb ... 300s Unpacking python3-lib2to3 (3.12.2-3ubuntu1.1) over (3.11.5-1) ... 300s Preparing to unpack .../47-python3-markupsafe_2.1.5-1build1_armhf.deb ... 300s Unpacking python3-markupsafe (2.1.5-1build1) over (2.1.5-1) ... 300s Preparing to unpack .../48-python3-pyrsistent_0.20.0-1build1_armhf.deb ... 301s Unpacking python3-pyrsistent:armhf (0.20.0-1build1) over (0.20.0-1) ... 301s Preparing to unpack .../49-python3-typing-extensions_4.10.0-1_all.deb ... 301s Unpacking python3-typing-extensions (4.10.0-1) over (4.9.0-1) ... 301s Preparing to unpack .../50-cloud-init_24.1.2-0ubuntu1_all.deb ... 301s Unpacking cloud-init (24.1.2-0ubuntu1) over (24.1.1-0ubuntu1) ... 313s Preparing to unpack .../51-kpartx_0.9.4-5ubuntu6_armhf.deb ... 313s Unpacking kpartx (0.9.4-5ubuntu6) over (0.9.4-5ubuntu3) ... 313s Setting up fonts-ubuntu-console (0.869+git20240321-0ubuntu1) ... 313s Setting up pinentry-curses (1.2.1-3ubuntu4) ... 313s Setting up libtext-iconv-perl:armhf (1.7-8build2) ... 313s Setting up libtext-charwidth-perl:armhf (0.04-11build2) ... 313s Setting up libibverbs1:armhf (50.0-2build1) ... 313s Setting up systemd-sysv (255.4-1ubuntu5) ... 314s Setting up libapparmor1:armhf (4.0.0-beta3-0ubuntu2) ... 314s Setting up libatm1t64:armhf (1:2.5.1-5.1) ... 314s Setting up libgdbm6t64:armhf (1.23-5.1) ... 314s Setting up bsdextrautils (2.39.3-9ubuntu2) ... 314s Setting up libgdbm-compat4t64:armhf (1.23-5.1) ... 314s Setting up xdg-user-dirs (0.18-1) ... 314s Setting up ibverbs-providers:armhf (50.0-2build1) ... 314s Setting up linux-headers-6.8.0-20 (6.8.0-20.20) ... 314s Setting up libmagic-mgc (1:5.45-3) ... 314s Setting up gawk (1:5.2.1-2build2) ... 314s Setting up psmisc (23.7-1) ... 314s Setting up libjq1:armhf (1.7.1-3) ... 314s Setting up libtirpc-common (1.3.4+ds-1.1) ... 314s Setting up libbrotli1:armhf (1.1.0-2build1) ... 314s Setting up libsqlite3-0:armhf (3.45.1-1ubuntu1) ... 314s Setting up libsasl2-modules:armhf (2.1.28+dfsg1-5ubuntu1) ... 314s Setting up libuv1t64:armhf (1.48.0-1.1) ... 314s Setting up libmagic1t64:armhf (1:5.45-3) ... 315s Setting up rsyslog (8.2312.0-3ubuntu7) ... 315s info: The user `syslog' is already a member of `adm'. 315s apparmor_parser: Unable to replace "rsyslogd". apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 315s 317s Setting up binutils-common:armhf (2.42-4ubuntu1) ... 317s Setting up libpsl5t64:armhf (0.21.2-1.1) ... 317s Setting up libnghttp2-14:armhf (1.59.0-1build1) ... 317s Setting up libreiserfscore0t64 (1:3.6.27-7.1) ... 317s Setting up libctf-nobfd0:armhf (2.42-4ubuntu1) ... 317s Setting up libnss-systemd:armhf (255.4-1ubuntu5) ... 317s Setting up krb5-locales (1.20.1-6ubuntu1) ... 317s Setting up file (1:5.45-3) ... 317s Setting up lshw (02.19.git.2021.06.19.996aaad9c7-2build2) ... 317s Setting up locales (2.39-0ubuntu6) ... 319s Generating locales (this might take a while)... 324s en_US.UTF-8... done 324s Generation complete. 324s Setting up libldap-common (2.6.7+dfsg-1~exp1ubuntu6) ... 324s Setting up libprotobuf-c1:armhf (1.4.1-1ubuntu3) ... 324s Setting up xxd (2:9.1.0016-1ubuntu6) ... 324s Setting up libsframe1:armhf (2.42-4ubuntu1) ... 324s Setting up libelf1t64:armhf (0.190-1.1build2) ... 324s Setting up libkrb5support0:armhf (1.20.1-6ubuntu1) ... 324s Setting up linux-headers-6.8.0-20-generic (6.8.0-20.20) ... 324s Setting up eject (2.39.3-9ubuntu2) ... 324s Setting up apparmor (4.0.0-beta3-0ubuntu2) ... 324s Installing new version of config file /etc/apparmor.d/abstractions/authentication ... 324s Installing new version of config file /etc/apparmor.d/abstractions/crypto ... 324s Installing new version of config file /etc/apparmor.d/abstractions/kde-open5 ... 324s Installing new version of config file /etc/apparmor.d/abstractions/openssl ... 325s Installing new version of config file /etc/apparmor.d/code ... 325s Installing new version of config file /etc/apparmor.d/firefox ... 325s apparmor_parser: Unable to replace "lsb_release". apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 325s 325s apparmor_parser: Unable to replace "kmod". apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 325s 325s apparmor_parser: Unable to replace "nvidia_modprobe". apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 325s 327s sysctl: cannot stat /proc/sys/kernel/apparmor_restrict_unprivileged_userns: No such file or directory 327s Reloading AppArmor profiles 327s /sbin/apparmor_parser: Unable to replace "1password". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "Discord". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "MongoDB Compass". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "QtWebEngineProcess". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "brave". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "buildah". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "busybox". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "cam". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "ch-checkns". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "ch-run". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "chrome". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "vscode". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "crun". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "devhelp". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "element-desktop". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "epiphany". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "evolution". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "firefox". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "flatpak". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "geary". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "github-desktop". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "goldendict". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "ipa_verify". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "kchmviewer". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "keybase". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "lc-compliance". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "libcamerify". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "linux-sandbox". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "loupe". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "lxc-attach". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "lxc-create". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "lxc-destroy". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "lxc-execute". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "lxc-stop". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "lxc-unshare". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "lxc-usernsexec". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "msedge". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "nautilus". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "notepadqq". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "mmdebstrap". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "opam". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "opera". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "pageedit". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "podman". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "polypane". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "qcam". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "privacybrowser". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "rootlesskit". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "qutebrowser". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "rpm". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "rssguard". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "runc". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "sbuild". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "sbuild-adduser". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "sbuild-abort". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "obsidian". /sbin/apparmor_parser: Unable to replace "sbuild-apt". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "sbuild-checkpackages". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "sbuild-createchroot". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "qmapshack". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "sbuild-clean". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "sbuild-distupgrade". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "sbuild-unhold". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "sbuild-shell". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "sbuild-update". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "sbuild-upgrade". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "sbuild-destroychroot". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "QtWebEngineProcess". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "plasmashell". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "scide". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "slack". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "signal-desktop". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "steam". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "stress-ng". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "slirp4netns". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "thunderbird". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "systemd-coredump". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "toybox". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "trinity". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "sbuild-hold". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "surfshark". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "tup". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "tuxedo-control-center". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "userbindmount". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "unprivileged_userns". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "uwsgi-core". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "vdens". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "virtiofsd". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "vivaldi-bin". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "vpnns". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "lsb_release". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "wpcom". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "kmod". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "nvidia_modprobe". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "unix-chkpwd". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "/usr/bin/man". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "rsyslogd". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "ubuntu_pro_apt_news". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s /sbin/apparmor_parser: Unable to replace "tcpdump". /sbin/apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 327s 327s Error: At least one profile failed to load 327s Setting up libglib2.0-0t64:armhf (2.79.3-3ubuntu5) ... 327s No schema files found: doing nothing. 327s Setting up libglib2.0-data (2.79.3-3ubuntu5) ... 327s Setting up vim-common (2:9.1.0016-1ubuntu6) ... 344s Setting up gcc-13-base:armhf (13.2.0-21ubuntu1) ... 344s Setting up libqrtr-glib0:armhf (1.2.2-1ubuntu3) ... 344s Setting up libslang2:armhf (2.3.3-3build1) ... 344s Setting up libnvme1t64 (1.8-3) ... 344s Setting up mtr-tiny (0.95-1.1build1) ... 344s Setting up gnupg-l10n (2.4.4-2ubuntu15) ... 344s Setting up librtmp1:armhf (2.4+20151223.gitfa8646d.1-2build6) ... 344s Setting up libdbus-1-3:armhf (1.14.10-4ubuntu2) ... 344s Setting up xz-utils (5.6.0-0.2) ... 344s Setting up perl-modules-5.38 (5.38.2-3.2) ... 344s Setting up libproc2-0:armhf (2:4.0.4-4ubuntu2) ... 344s Setting up libpng16-16t64:armhf (1.6.43-3) ... 344s Setting up systemd-timesyncd (255.4-1ubuntu5) ... 344s Setting up libevent-core-2.1-7:armhf (2.1.12-stable-9build1) ... 344s Setting up libss2:armhf (1.47.0-2.4~exp1ubuntu2) ... 344s Setting up usb.ids (2024.03.18-1) ... 344s Setting up sudo (1.9.15p5-3ubuntu3) ... 344s Setting up dhcpcd-base (1:10.0.6-1ubuntu2) ... 344s Setting up gir1.2-glib-2.0:armhf (2.79.3-3ubuntu5) ... 344s Setting up libk5crypto3:armhf (1.20.1-6ubuntu1) ... 344s Setting up logsave (1.47.0-2.4~exp1ubuntu2) ... 344s Setting up libfdisk1:armhf (2.39.3-9ubuntu2) ... 344s Setting up libdb5.3t64:armhf (5.3.28+dfsg2-6) ... 345s Setting up libdevmapper1.02.1:armhf (2:1.02.185-3ubuntu2) ... 345s Setting up python-apt-common (2.7.7) ... 345s Setting up mount (2.39.3-9ubuntu2) ... 345s Setting up dmsetup (2:1.02.185-3ubuntu2) ... 345s Setting up uuid-runtime (2.39.3-9ubuntu2) ... 346s uuidd.service is a disabled or a static unit not running, not starting it. 346s Setting up libmm-glib0:armhf (1.23.4-0ubuntu1) ... 346s Setting up groff-base (1.23.0-3build1) ... 346s Setting up libplymouth5:armhf (24.004.60-1ubuntu6) ... 346s Setting up dbus-session-bus-common (1.14.10-4ubuntu2) ... 346s Setting up jq (1.7.1-3) ... 346s Setting up procps (2:4.0.4-4ubuntu2) ... 347s Setting up gpgconf (2.4.4-2ubuntu15) ... 347s Setting up libpcap0.8t64:armhf (1.10.4-4.1ubuntu2) ... 347s Setting up libcryptsetup12:armhf (2:2.7.0-1ubuntu2) ... 347s Setting up libgirepository-1.0-1:armhf (1.79.1-1ubuntu6) ... 347s Setting up libjson-glib-1.0-common (1.8.0-2build1) ... 347s Setting up libkrb5-3:armhf (1.20.1-6ubuntu1) ... 347s Setting up libpython3.11-minimal:armhf (3.11.8-1build4) ... 347s Setting up libusb-1.0-0:armhf (2:1.0.27-1) ... 347s Setting up libperl5.38t64:armhf (5.38.2-3.2) ... 347s Setting up tnftp (20230507-2build1) ... 347s Setting up libbinutils:armhf (2.42-4ubuntu1) ... 347s Setting up dbus-system-bus-common (1.14.10-4ubuntu2) ... 347s Setting up libfido2-1:armhf (1.14.0-1build1) ... 347s Setting up openssl (3.0.13-0ubuntu2) ... 347s Setting up libbsd0:armhf (0.12.1-1) ... 347s Setting up readline-common (8.2-4) ... 347s Setting up libxml2:armhf (2.9.14+dfsg-1.3ubuntu2) ... 347s Setting up libxmuu1:armhf (2:1.1.3-3build1) ... 347s Setting up dbus-bin (1.14.10-4ubuntu2) ... 347s Setting up info (7.1-3build1) ... 347s Setting up liblocale-gettext-perl (1.07-6ubuntu4) ... 347s Setting up gpg (2.4.4-2ubuntu15) ... 347s Setting up libgudev-1.0-0:armhf (1:238-3ubuntu2) ... 347s Setting up libpolkit-gobject-1-0:armhf (124-1ubuntu1) ... 347s Setting up libbpf1:armhf (1:1.3.0-2build1) ... 347s Setting up libmbim-glib4:armhf (1.31.2-0ubuntu2) ... 347s Setting up rsync (3.2.7-1build1) ... 349s rsync.service is a disabled or a static unit not running, not starting it. 349s Setting up libudisks2-0:armhf (2.10.1-6) ... 349s Setting up libkmod2:armhf (31+20240202-2ubuntu4) ... 349s Setting up bolt (0.9.6-2build1) ... 349s bolt.service is a disabled or a static unit not running, not starting it. 349s Setting up gnupg-utils (2.4.4-2ubuntu15) ... 349s Setting up initramfs-tools-bin (0.142ubuntu23) ... 349s Setting up libctf0:armhf (2.42-4ubuntu1) ... 349s Setting up cryptsetup-bin (2:2.7.0-1ubuntu2) ... 349s Setting up python3.11-minimal (3.11.8-1build4) ... 352s Setting up tcpdump (4.99.4-3ubuntu2) ... 352s apparmor_parser: Unable to replace "tcpdump". apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 352s 352s Setting up apt-utils (2.7.14) ... 352s Setting up gpg-agent (2.4.4-2ubuntu15) ... 353s Setting up libpython3.12-stdlib:armhf (3.12.2-4build3) ... 353s Setting up wget (1.21.4-1ubuntu2) ... 353s Setting up libxmlb2:armhf (0.3.15-1build1) ... 353s Setting up btrfs-progs (6.6.3-1.1build1) ... 353s Setting up libpython3.11-stdlib:armhf (3.11.8-1build4) ... 353s Setting up python3.12 (3.12.2-4build3) ... 356s Setting up gpgsm (2.4.4-2ubuntu15) ... 356s Setting up inetutils-telnet (2:2.5-3ubuntu3) ... 356s Setting up e2fsprogs (1.47.0-2.4~exp1ubuntu2) ... 356s update-initramfs: deferring update (trigger activated) 357s e2scrub_all.service is a disabled or a static unit not running, not starting it. 357s Setting up libparted2t64:armhf (3.6-3.1build2) ... 357s Setting up linux-headers-generic (6.8.0-20.20+1) ... 357s Setting up dbus-daemon (1.14.10-4ubuntu2) ... 358s Setting up libmbim-proxy (1.31.2-0ubuntu2) ... 358s Setting up vim-tiny (2:9.1.0016-1ubuntu6) ... 358s Setting up kmod (31+20240202-2ubuntu4) ... 358s Setting up libnetplan1:armhf (1.0-1) ... 358s Setting up man-db (2.12.0-3build4) ... 358s Updating database of manual pages ... 361s apparmor_parser: Unable to replace "/usr/bin/man". apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 361s 361s man-db.service is a disabled or a static unit not running, not starting it. 362s Setting up fdisk (2.39.3-9ubuntu2) ... 362s Setting up libjson-glib-1.0-0:armhf (1.8.0-2build1) ... 362s Setting up libsasl2-modules-db:armhf (2.1.28+dfsg1-5ubuntu1) ... 362s Setting up libftdi1-2:armhf (1.5-6build4) ... 362s Setting up perl (5.38.2-3.2) ... 362s Setting up gir1.2-girepository-2.0:armhf (1.79.1-1ubuntu6) ... 362s Setting up dbus (1.14.10-4ubuntu2) ... 362s A reboot is required to replace the running dbus-daemon. 362s Please reboot the system when convenient. 362s Setting up shared-mime-info (2.4-1build1) ... 363s Setting up libblockdev-utils3:armhf (3.1.0-1build1) ... 363s Setting up libgssapi-krb5-2:armhf (1.20.1-6ubuntu1) ... 364s Setting up udev (255.4-1ubuntu5) ... 365s Setting up ftp (20230507-2build1) ... 365s Setting up keyboxd (2.4.4-2ubuntu15) ... 366s Setting up libdpkg-perl (1.22.6ubuntu4) ... 366s Setting up libsasl2-2:armhf (2.1.28+dfsg1-5ubuntu1) ... 366s Setting up libssh-4:armhf (0.10.6-2build1) ... 366s Setting up libblockdev-nvme3:armhf (3.1.0-1build1) ... 366s Setting up libblockdev-fs3:armhf (3.1.0-1build1) ... 366s Setting up kpartx (0.9.4-5ubuntu6) ... 366s Setting up libpam-systemd:armhf (255.4-1ubuntu5) ... 366s Setting up libpolkit-agent-1-0:armhf (124-1ubuntu1) ... 366s Setting up libgpgme11t64:armhf (1.18.0-4.1ubuntu3) ... 366s Setting up netplan-generator (1.0-1) ... 366s Removing 'diversion of /lib/systemd/system-generators/netplan to /lib/systemd/system-generators/netplan.usr-is-merged by netplan-generator' 366s Setting up initramfs-tools-core (0.142ubuntu23) ... 366s Setting up binutils-arm-linux-gnueabihf (2.42-4ubuntu1) ... 366s Setting up libarchive13t64:armhf (3.7.2-1.1ubuntu2) ... 366s Setting up libldap2:armhf (2.6.7+dfsg-1~exp1ubuntu6) ... 366s Setting up libpython3-stdlib:armhf (3.12.2-0ubuntu1) ... 366s Setting up systemd-resolved (255.4-1ubuntu5) ... 367s Setting up python3.11 (3.11.8-1build4) ... 369s Setting up telnet (0.17+2.5-3ubuntu3) ... 369s Setting up initramfs-tools (0.142ubuntu23) ... 369s update-initramfs: deferring update (trigger activated) 370s Setting up libblockdev-mdraid3:armhf (3.1.0-1build1) ... 370s Setting up libcurl4t64:armhf (8.5.0-2ubuntu8) ... 370s Setting up bind9-libs:armhf (1:9.18.24-0ubuntu3) ... 370s Setting up libtirpc3t64:armhf (1.3.4+ds-1.1) ... 370s Setting up e2fsprogs-l10n (1.47.0-2.4~exp1ubuntu2) ... 370s Setting up libblockdev-swap3:armhf (3.1.0-1build1) ... 370s Setting up plymouth (24.004.60-1ubuntu6) ... 370s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 370s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 371s Setting up iproute2 (6.1.0-1ubuntu5) ... 371s Setting up openssh-client (1:9.6p1-3ubuntu11) ... 371s Setting up libgusb2:armhf (0.4.8-1build1) ... 371s Setting up libblockdev-loop3:armhf (3.1.0-1build1) ... 371s Setting up libcurl3t64-gnutls:armhf (8.5.0-2ubuntu8) ... 371s Setting up parted (3.6-3.1build2) ... 371s Setting up libqmi-glib5:armhf (1.35.2-0ubuntu1) ... 371s Setting up python3 (3.12.2-0ubuntu1) ... 378s Setting up binutils (2.42-4ubuntu1) ... 378s Setting up python3-markupsafe (2.1.5-1build1) ... 378s Setting up libblockdev3:armhf (3.1.0-1build1) ... 378s Setting up libjcat1:armhf (0.2.0-2build2) ... 378s Setting up dpkg-dev (1.22.6ubuntu4) ... 378s Setting up libblockdev-part3:armhf (3.1.0-1build1) ... 378s Setting up dirmngr (2.4.4-2ubuntu15) ... 378s Setting up dbus-user-session (1.14.10-4ubuntu2) ... 378s Setting up plymouth-theme-ubuntu-text (24.004.60-1ubuntu6) ... 378s update-initramfs: deferring update (trigger activated) 378s Setting up python3-cryptography (41.0.7-4build2) ... 378s Setting up python3-gi (3.47.0-3build1) ... 378s Setting up python3-typing-extensions (4.10.0-1) ... 378s Setting up lsof (4.95.0-1build2) ... 378s Setting up python3-pyrsistent:armhf (0.20.0-1build1) ... 379s Setting up libnsl2:armhf (1.3.0-3build2) ... 379s Setting up gnupg (2.4.4-2ubuntu15) ... 379s Setting up python3-netplan (1.0-1) ... 379s Setting up curl (8.5.0-2ubuntu8) ... 379s Setting up libvolume-key1:armhf (0.3.12-7build1) ... 379s Setting up bind9-host (1:9.18.24-0ubuntu3) ... 379s Setting up python3-lib2to3 (3.12.2-3ubuntu1.1) ... 379s Setting up python3-pkg-resources (68.1.2-2ubuntu1) ... 380s Setting up python3-distutils (3.12.2-3ubuntu1.1) ... 380s python3.12: can't get files for byte-compilation 380s Setting up openssh-sftp-server (1:9.6p1-3ubuntu11) ... 380s Setting up python3-dbus (1.3.2-5build2) ... 381s Setting up python3-setuptools (68.1.2-2ubuntu1) ... 382s Setting up gpg-wks-client (2.4.4-2ubuntu15) ... 382s Setting up openssh-server (1:9.6p1-3ubuntu11) ... 383s Replacing config file /etc/ssh/sshd_config with new version 385s Created symlink /etc/systemd/system/ssh.service.requires/ssh.socket → /usr/lib/systemd/system/ssh.socket. 388s Setting up libblockdev-crypto3:armhf (3.1.0-1build1) ... 388s Setting up python3-gdbm:armhf (3.12.2-3ubuntu1.1) ... 388s Setting up python3-apt (2.7.7) ... 388s Setting up libfwupd2:armhf (1.9.15-2) ... 388s Setting up python3-yaml (6.0.1-2build1) ... 388s Setting up libqmi-proxy (1.35.2-0ubuntu1) ... 388s Setting up netplan.io (1.0-1) ... 388s Setting up bind9-dnsutils (1:9.18.24-0ubuntu3) ... 388s Setting up ubuntu-pro-client (31.2.2) ... 389s apparmor_parser: Unable to replace "ubuntu_pro_apt_news". apparmor_parser: Access denied. You need policy admin privileges to manage profiles. 389s 392s Setting up fwupd (1.9.15-2) ... 393s fwupd-offline-update.service is a disabled or a static unit not running, not starting it. 393s fwupd-refresh.service is a disabled or a static unit not running, not starting it. 393s fwupd.service is a disabled or a static unit not running, not starting it. 393s Setting up ubuntu-pro-client-l10n (31.2.2) ... 393s Setting up udisks2 (2.10.1-6) ... 393s sda: Failed to write 'change' to '/sys/devices/platform/LNRO0005:1f/virtio2/host0/target0:0:0/0:0:0:0/block/sda/uevent': Permission denied 393s sda1: Failed to write 'change' to '/sys/devices/platform/LNRO0005:1f/virtio2/host0/target0:0:0/0:0:0:0/block/sda/sda1/uevent': Permission denied 393s sda15: Failed to write 'change' to '/sys/devices/platform/LNRO0005:1f/virtio2/host0/target0:0:0/0:0:0:0/block/sda/sda15/uevent': Permission denied 393s sda2: Failed to write 'change' to '/sys/devices/platform/LNRO0005:1f/virtio2/host0/target0:0:0/0:0:0:0/block/sda/sda2/uevent': Permission denied 393s loop0: Failed to write 'change' to '/sys/devices/virtual/block/loop0/uevent': Permission denied 393s loop1: Failed to write 'change' to '/sys/devices/virtual/block/loop1/uevent': Permission denied 393s loop2: Failed to write 'change' to '/sys/devices/virtual/block/loop2/uevent': Permission denied 393s loop3: Failed to write 'change' to '/sys/devices/virtual/block/loop3/uevent': Permission denied 393s loop4: Failed to write 'change' to '/sys/devices/virtual/block/loop4/uevent': Permission denied 393s loop5: Failed to write 'change' to '/sys/devices/virtual/block/loop5/uevent': Permission denied 393s loop6: Failed to write 'change' to '/sys/devices/virtual/block/loop6/uevent': Permission denied 393s loop7: Failed to write 'change' to '/sys/devices/virtual/block/loop7/uevent': Permission denied 393s loop8: Failed to write 'change' to '/sys/devices/virtual/block/loop8/uevent': Permission denied 393s loop9: Failed to write 'change' to '/sys/devices/virtual/block/loop9/uevent': Permission denied 394s Setting up cloud-init (24.1.2-0ubuntu1) ... 397s Setting up ubuntu-minimal (1.536build1) ... 397s Setting up ubuntu-standard (1.536build1) ... 397s Processing triggers for libc-bin (2.39-0ubuntu6) ... 397s Processing triggers for ufw (0.36.2-5) ... 397s Processing triggers for install-info (7.1-3build1) ... 398s Processing triggers for initramfs-tools (0.142ubuntu23) ... 402s Reading package lists... 402s Building dependency tree... 402s Reading state information... 403s The following packages will be REMOVED: 403s linux-headers-6.8.0-11* python3-distutils* python3-lib2to3* 404s 0 upgraded, 0 newly installed, 3 to remove and 1 not upgraded. 404s After this operation, 86.5 MB disk space will be freed. 404s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78647 files and directories currently installed.) 404s Removing linux-headers-6.8.0-11 (6.8.0-11.11) ... 406s Removing python3-distutils (3.12.2-3ubuntu1.1) ... 406s Removing python3-lib2to3 (3.12.2-3ubuntu1.1) ... 420s autopkgtest [15:48:28]: rebooting testbed after setup commands that affected boot 504s autopkgtest [15:49:52]: testbed running kernel: Linux 5.4.0-170-generic #188-Ubuntu SMP Wed Jan 10 09:51:10 UTC 2024 605s autopkgtest [15:51:33]: @@@@@@@@@@@@@@@@@@@@ apt-source tmuxp 623s Get:1 http://ftpmaster.internal/ubuntu noble/universe tmuxp 1.38.0-1ubuntu1 (dsc) [2305 B] 623s Get:2 http://ftpmaster.internal/ubuntu noble/universe tmuxp 1.38.0-1ubuntu1 (tar) [765 kB] 623s Get:3 http://ftpmaster.internal/ubuntu noble/universe tmuxp 1.38.0-1ubuntu1 (diff) [4668 B] 623s gpgv: Signature made Tue Feb 27 14:46:04 2024 UTC 623s gpgv: using RSA key 25E3FF2D7F469DBE7D0D4E50AFCFEC8E669CE1C2 623s gpgv: Can't check signature: No public key 623s dpkg-source: warning: cannot verify inline signature for ./tmuxp_1.38.0-1ubuntu1.dsc: no acceptable signature found 623s autopkgtest [15:51:51]: testing package tmuxp version 1.38.0-1ubuntu1 625s autopkgtest [15:51:53]: build not needed 630s autopkgtest [15:51:58]: test pytest: preparing testbed 640s Reading package lists... 641s Building dependency tree... 641s Reading state information... 642s Starting pkgProblemResolver with broken count: 0 642s Starting 2 pkgProblemResolver with broken count: 0 642s Done 644s The following additional packages will be installed: 644s python3-all python3-colorama python3-dateutil python3-hypothesis 644s python3-iniconfig python3-libtmux python3-packaging python3-pluggy 644s python3-pytest python3-pytest-mock python3-pytest-rerunfailures 644s python3-sortedcontainers python3-tmuxp tmuxp 644s Suggested packages: 644s python-hypothesis-doc python-pytest-mock-doc python-sortedcontainers-doc 644s Recommended packages: 644s python3-click 644s The following NEW packages will be installed: 644s autopkgtest-satdep python3-all python3-colorama python3-dateutil 644s python3-hypothesis python3-iniconfig python3-libtmux python3-packaging 644s python3-pluggy python3-pytest python3-pytest-mock 644s python3-pytest-rerunfailures python3-sortedcontainers python3-tmuxp tmuxp 644s 0 upgraded, 15 newly installed, 0 to remove and 1 not upgraded. 644s Need to get 871 kB/872 kB of archives. 644s After this operation, 4235 kB of additional disk space will be used. 644s Get:1 /tmp/autopkgtest.l5XFVd/1-autopkgtest-satdep.deb autopkgtest-satdep armhf 0 [752 B] 644s Get:2 http://ftpmaster.internal/ubuntu noble-proposed/main armhf python3-all armhf 3.12.2-0ubuntu1 [886 B] 644s Get:3 http://ftpmaster.internal/ubuntu noble/main armhf python3-colorama all 0.4.6-4 [32.1 kB] 644s Get:4 http://ftpmaster.internal/ubuntu noble/main armhf python3-dateutil all 2.8.2-3 [79.2 kB] 645s Get:5 http://ftpmaster.internal/ubuntu noble/main armhf python3-sortedcontainers all 2.4.0-2 [27.6 kB] 645s Get:6 http://ftpmaster.internal/ubuntu noble-proposed/universe armhf python3-hypothesis all 6.98.15-1 [311 kB] 645s Get:7 http://ftpmaster.internal/ubuntu noble/universe armhf python3-iniconfig all 1.1.1-2 [6024 B] 645s Get:8 http://ftpmaster.internal/ubuntu noble/universe armhf python3-libtmux all 0.30.2-1 [39.3 kB] 645s Get:9 http://ftpmaster.internal/ubuntu noble/main armhf python3-packaging all 23.2-1 [40.6 kB] 645s Get:10 http://ftpmaster.internal/ubuntu noble/universe armhf python3-pluggy all 1.4.0-1 [20.4 kB] 645s Get:11 http://ftpmaster.internal/ubuntu noble-proposed/universe armhf python3-pytest all 8.0.2-1 [248 kB] 645s Get:12 http://ftpmaster.internal/ubuntu noble/universe armhf python3-pytest-mock all 3.12.0-1.1 [11.3 kB] 645s Get:13 http://ftpmaster.internal/ubuntu noble/universe armhf python3-pytest-rerunfailures all 12.0-1 [14.1 kB] 645s Get:14 http://ftpmaster.internal/ubuntu noble/universe armhf python3-tmuxp all 1.38.0-1ubuntu1 [38.7 kB] 645s Get:15 http://ftpmaster.internal/ubuntu noble/universe armhf tmuxp all 1.38.0-1ubuntu1 [2248 B] 646s Fetched 871 kB in 1s (710 kB/s) 646s Selecting previously unselected package python3-all. 647s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 58436 files and directories currently installed.) 647s Preparing to unpack .../00-python3-all_3.12.2-0ubuntu1_armhf.deb ... 647s Unpacking python3-all (3.12.2-0ubuntu1) ... 647s Selecting previously unselected package python3-colorama. 647s Preparing to unpack .../01-python3-colorama_0.4.6-4_all.deb ... 647s Unpacking python3-colorama (0.4.6-4) ... 647s Selecting previously unselected package python3-dateutil. 647s Preparing to unpack .../02-python3-dateutil_2.8.2-3_all.deb ... 647s Unpacking python3-dateutil (2.8.2-3) ... 647s Selecting previously unselected package python3-sortedcontainers. 647s Preparing to unpack .../03-python3-sortedcontainers_2.4.0-2_all.deb ... 647s Unpacking python3-sortedcontainers (2.4.0-2) ... 647s Selecting previously unselected package python3-hypothesis. 647s Preparing to unpack .../04-python3-hypothesis_6.98.15-1_all.deb ... 647s Unpacking python3-hypothesis (6.98.15-1) ... 647s Selecting previously unselected package python3-iniconfig. 647s Preparing to unpack .../05-python3-iniconfig_1.1.1-2_all.deb ... 647s Unpacking python3-iniconfig (1.1.1-2) ... 647s Selecting previously unselected package python3-libtmux. 647s Preparing to unpack .../06-python3-libtmux_0.30.2-1_all.deb ... 647s Unpacking python3-libtmux (0.30.2-1) ... 647s Selecting previously unselected package python3-packaging. 647s Preparing to unpack .../07-python3-packaging_23.2-1_all.deb ... 647s Unpacking python3-packaging (23.2-1) ... 647s Selecting previously unselected package python3-pluggy. 647s Preparing to unpack .../08-python3-pluggy_1.4.0-1_all.deb ... 647s Unpacking python3-pluggy (1.4.0-1) ... 647s Selecting previously unselected package python3-pytest. 647s Preparing to unpack .../09-python3-pytest_8.0.2-1_all.deb ... 647s Unpacking python3-pytest (8.0.2-1) ... 647s Selecting previously unselected package python3-pytest-mock. 647s Preparing to unpack .../10-python3-pytest-mock_3.12.0-1.1_all.deb ... 647s Unpacking python3-pytest-mock (3.12.0-1.1) ... 647s Selecting previously unselected package python3-pytest-rerunfailures. 647s Preparing to unpack .../11-python3-pytest-rerunfailures_12.0-1_all.deb ... 647s Unpacking python3-pytest-rerunfailures (12.0-1) ... 647s Selecting previously unselected package python3-tmuxp. 647s Preparing to unpack .../12-python3-tmuxp_1.38.0-1ubuntu1_all.deb ... 647s Unpacking python3-tmuxp (1.38.0-1ubuntu1) ... 648s Selecting previously unselected package tmuxp. 648s Preparing to unpack .../13-tmuxp_1.38.0-1ubuntu1_all.deb ... 648s Unpacking tmuxp (1.38.0-1ubuntu1) ... 648s Selecting previously unselected package autopkgtest-satdep. 648s Preparing to unpack .../14-1-autopkgtest-satdep.deb ... 648s Unpacking autopkgtest-satdep (0) ... 648s Setting up python3-iniconfig (1.1.1-2) ... 648s Setting up python3-libtmux (0.30.2-1) ... 648s Setting up python3-colorama (0.4.6-4) ... 649s Setting up python3-all (3.12.2-0ubuntu1) ... 649s Setting up python3-sortedcontainers (2.4.0-2) ... 649s Setting up python3-packaging (23.2-1) ... 649s Setting up python3-tmuxp (1.38.0-1ubuntu1) ... 650s Setting up python3-pluggy (1.4.0-1) ... 650s Setting up python3-dateutil (2.8.2-3) ... 650s Setting up tmuxp (1.38.0-1ubuntu1) ... 650s Setting up python3-pytest (8.0.2-1) ... 651s Setting up python3-hypothesis (6.98.15-1) ... 652s Setting up python3-pytest-mock (3.12.0-1.1) ... 653s Setting up python3-pytest-rerunfailures (12.0-1) ... 653s Setting up autopkgtest-satdep (0) ... 653s Processing triggers for man-db (2.12.0-3build4) ... 701s (Reading database ... 58919 files and directories currently installed.) 701s Removing autopkgtest-satdep (0) ... 709s autopkgtest [15:53:17]: test pytest: [----------------------- 712s === python3.12 === 712s /usr/lib/python3/dist-packages/_pytest/mark/structures.py:357: PytestRemovedIn9Warning: Marks applied to fixtures have no effect 712s See docs: https://docs.pytest.org/en/stable/deprecations.html#applying-a-mark-to-a-fixture-function 712s store_mark(func, self.mark) 714s ============================= test session starts ============================== 714s platform linux -- Python 3.12.2, pytest-8.0.2, pluggy-1.4.0 714s rootdir: /tmp/autopkgtest.l5XFVd/autopkgtest_tmp 714s plugins: hypothesis-6.98.15, libtmux-0.30.2, mock-3.12.0, rerunfailures-12.0 714s collected 194 items / 2 deselected / 192 selected 714s 715s tests/cli/test_cli.py .......F [ 4%] 715s tests/cli/test_convert.py ........ [ 8%] 715s tests/cli/test_debug_info.py . [ 8%] 720s tests/cli/test_freeze.py FFFFFF [ 11%] 721s tests/cli/test_import.py ....... [ 15%] 758s tests/cli/test_load.py FFFFFEEEEEEEE..s..FFFFFF [ 28%] 758s tests/cli/test_ls.py . [ 28%] 777s tests/cli/test_shell.py EEEEEEEEEEEEEEEEEEEE [ 39%] 777s tests/test_plugin.py .......... [ 44%] 777s tests/test_shell.py .. [ 45%] 779s tests/test_util.py .....FF [ 48%] 785s tests/tests/test_helpers.py FRRRRRF [ 50%] 819s tests/workspace/test_builder.py EEEsEEEERRRRREEEsFEEEFEEFFFFEEEEEEFFFFFF [ 68%] 849s FFFFFRRRFRRRFRRRFRRRFRRRFEEFFF [ 76%] 849s tests/workspace/test_config.py .............. [ 83%] 849s tests/workspace/test_finder.py .................. [ 92%] 850s tests/workspace/test_freezer.py E.. [ 94%] 850s tests/workspace/test_import_teamocil.py ........ [ 98%] 850s tests/workspace/test_import_tmuxinator.py ... [100%] 850s 850s ==================================== ERRORS ==================================== 850s ____________ ERROR at setup of test_load[dir-relative-dot-samedir] _____________ 850s 850s request = > 850s session_params = {'x': 800, 'y': 600} 850s server = Server(socket_name=libtmux_testkm1fc7jn) 850s 850s @pytest.fixture(scope="function") 850s def session( 850s request: pytest.FixtureRequest, 850s session_params: t.Dict[str, t.Any], 850s server: Server, 850s ) -> "Session": 850s """Return new, temporary :class:`libtmux.Session`. 850s 850s >>> from libtmux.session import Session 850s 850s >>> def test_example(session: "Session") -> None: 850s ... assert isinstance(session.name, str) 850s ... assert session.name.startswith('libtmux_') 850s ... window = session.new_window(window_name='new one') 850s ... assert window.name == 'new one' 850s 850s .. :: 850s >>> locals().keys() 850s dict_keys(...) 850s 850s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 850s >>> pytester = request.getfixturevalue('pytester') 850s 850s >>> pytester.makepyfile(**{'whatever.py': source}) 850s PosixPath(...) 850s 850s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 850s ===... 850s 850s >>> result.assert_outcomes(passed=1) 850s """ 850s session_name = "tmuxp" 850s 850s if not server.has_session(session_name): 850s > server.new_session( 850s session_name=session_name, 850s ) 850s 850s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 850s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 850s 850s self = Server(socket_name=libtmux_testkm1fc7jn), session_name = 'tmuxp' 850s kill_session = False, attach = False, start_directory = None, window_name = None 850s window_command = None, x = None, y = None, environment = None, args = () 850s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 850s proc = 850s 850s def new_session( 850s self, 850s session_name: t.Optional[str] = None, 850s kill_session: bool = False, 850s attach: bool = False, 850s start_directory: t.Optional[str] = None, 850s window_name: t.Optional[str] = None, 850s window_command: t.Optional[str] = None, 850s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s environment: t.Optional[t.Dict[str, str]] = None, 850s *args: t.Any, 850s **kwargs: t.Any, 850s ) -> Session: 850s """Create new session, returns new :class:`Session`. 850s 850s Uses ``-P`` flag to print session info, ``-F`` for return formatting 850s returns new Session object. 850s 850s ``$ tmux new-session -d`` will create the session in the background 850s ``$ tmux new-session -Ad`` will move to the session name if it already 850s exists. todo: make an option to handle this. 850s 850s Parameters 850s ---------- 850s session_name : str, optional 850s :: 850s 850s $ tmux new-session -s 850s attach : bool, optional 850s create session in the foreground. ``attach=False`` is equivalent 850s to:: 850s 850s $ tmux new-session -d 850s 850s Other Parameters 850s ---------------- 850s kill_session : bool, optional 850s Kill current session if ``$ tmux has-session``. 850s Useful for testing workspaces. 850s start_directory : str, optional 850s specifies the working directory in which the 850s new session is created. 850s window_name : str, optional 850s :: 850s 850s $ tmux new-session -n 850s window_command : str, optional 850s execute a command on starting the session. The window will close 850s when the command exits. NOTE: When this command exits the window 850s will close. This feature is useful for long-running processes 850s where the closing of the window upon completion is desired. 850s x : [int, str], optional 850s Force the specified width instead of the tmux default for a 850s detached session 850s y : [int, str], optional 850s Force the specified height instead of the tmux default for a 850s detached session 850s 850s Returns 850s ------- 850s :class:`Session` 850s 850s Raises 850s ------ 850s :exc:`exc.BadSessionName` 850s 850s Examples 850s -------- 850s Sessions can be created without a session name (0.14.2+): 850s 850s >>> server.new_session() 850s Session($2 2) 850s 850s Creating them in succession will enumerate IDs (via tmux): 850s 850s >>> server.new_session() 850s Session($3 3) 850s 850s With a `session_name`: 850s 850s >>> server.new_session(session_name='my session') 850s Session($4 my session) 850s """ 850s if session_name is not None: 850s session_check_name(session_name) 850s 850s if self.has_session(session_name): 850s if kill_session: 850s self.cmd("kill-session", "-t%s" % session_name) 850s logger.info("session %s exists. killed it." % session_name) 850s else: 850s raise exc.TmuxSessionExists( 850s "Session named %s exists" % session_name, 850s ) 850s 850s logger.debug(f"creating session {session_name}") 850s 850s env = os.environ.get("TMUX") 850s 850s if env: 850s del os.environ["TMUX"] 850s 850s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 850s "-P", 850s "-F#{session_id}", # output 850s ) 850s 850s if session_name is not None: 850s tmux_args += (f"-s{session_name}",) 850s 850s if not attach: 850s tmux_args += ("-d",) 850s 850s if start_directory: 850s tmux_args += ("-c", start_directory) 850s 850s if window_name: 850s tmux_args += ("-n", window_name) 850s 850s if x is not None: 850s tmux_args += ("-x", x) 850s 850s if y is not None: 850s tmux_args += ("-y", y) 850s 850s if window_command: 850s tmux_args += (window_command,) 850s 850s if environment: 850s if has_gte_version("3.2"): 850s for k, v in environment.items(): 850s tmux_args += (f"-e{k}={v}",) 850s else: 850s logger.warning( 850s "Environment flag ignored, tmux 3.2 or newer required.", 850s ) 850s 850s proc = self.cmd("new-session", *tmux_args) 850s 850s if proc.stderr: 850s > raise exc.LibTmuxException(proc.stderr) 850s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 850s 850s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 850s _________ ERROR at setup of test_load[dir-relative-dot-slash-samedir] __________ 850s 850s request = > 850s session_params = {'x': 800, 'y': 600} 850s server = Server(socket_name=libtmux_testdair7x9h) 850s 850s @pytest.fixture(scope="function") 850s def session( 850s request: pytest.FixtureRequest, 850s session_params: t.Dict[str, t.Any], 850s server: Server, 850s ) -> "Session": 850s """Return new, temporary :class:`libtmux.Session`. 850s 850s >>> from libtmux.session import Session 850s 850s >>> def test_example(session: "Session") -> None: 850s ... assert isinstance(session.name, str) 850s ... assert session.name.startswith('libtmux_') 850s ... window = session.new_window(window_name='new one') 850s ... assert window.name == 'new one' 850s 850s .. :: 850s >>> locals().keys() 850s dict_keys(...) 850s 850s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 850s >>> pytester = request.getfixturevalue('pytester') 850s 850s >>> pytester.makepyfile(**{'whatever.py': source}) 850s PosixPath(...) 850s 850s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 850s ===... 850s 850s >>> result.assert_outcomes(passed=1) 850s """ 850s session_name = "tmuxp" 850s 850s if not server.has_session(session_name): 850s > server.new_session( 850s session_name=session_name, 850s ) 850s 850s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 850s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 850s 850s self = Server(socket_name=libtmux_testdair7x9h), session_name = 'tmuxp' 850s kill_session = False, attach = False, start_directory = None, window_name = None 850s window_command = None, x = None, y = None, environment = None, args = () 850s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 850s proc = 850s 850s def new_session( 850s self, 850s session_name: t.Optional[str] = None, 850s kill_session: bool = False, 850s attach: bool = False, 850s start_directory: t.Optional[str] = None, 850s window_name: t.Optional[str] = None, 850s window_command: t.Optional[str] = None, 850s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s environment: t.Optional[t.Dict[str, str]] = None, 850s *args: t.Any, 850s **kwargs: t.Any, 850s ) -> Session: 850s """Create new session, returns new :class:`Session`. 850s 850s Uses ``-P`` flag to print session info, ``-F`` for return formatting 850s returns new Session object. 850s 850s ``$ tmux new-session -d`` will create the session in the background 850s ``$ tmux new-session -Ad`` will move to the session name if it already 850s exists. todo: make an option to handle this. 850s 850s Parameters 850s ---------- 850s session_name : str, optional 850s :: 850s 850s $ tmux new-session -s 850s attach : bool, optional 850s create session in the foreground. ``attach=False`` is equivalent 850s to:: 850s 850s $ tmux new-session -d 850s 850s Other Parameters 850s ---------------- 850s kill_session : bool, optional 850s Kill current session if ``$ tmux has-session``. 850s Useful for testing workspaces. 850s start_directory : str, optional 850s specifies the working directory in which the 850s new session is created. 850s window_name : str, optional 850s :: 850s 850s $ tmux new-session -n 850s window_command : str, optional 850s execute a command on starting the session. The window will close 850s when the command exits. NOTE: When this command exits the window 850s will close. This feature is useful for long-running processes 850s where the closing of the window upon completion is desired. 850s x : [int, str], optional 850s Force the specified width instead of the tmux default for a 850s detached session 850s y : [int, str], optional 850s Force the specified height instead of the tmux default for a 850s detached session 850s 850s Returns 850s ------- 850s :class:`Session` 850s 850s Raises 850s ------ 850s :exc:`exc.BadSessionName` 850s 850s Examples 850s -------- 850s Sessions can be created without a session name (0.14.2+): 850s 850s >>> server.new_session() 850s Session($2 2) 850s 850s Creating them in succession will enumerate IDs (via tmux): 850s 850s >>> server.new_session() 850s Session($3 3) 850s 850s With a `session_name`: 850s 850s >>> server.new_session(session_name='my session') 850s Session($4 my session) 850s """ 850s if session_name is not None: 850s session_check_name(session_name) 850s 850s if self.has_session(session_name): 850s if kill_session: 850s self.cmd("kill-session", "-t%s" % session_name) 850s logger.info("session %s exists. killed it." % session_name) 850s else: 850s raise exc.TmuxSessionExists( 850s "Session named %s exists" % session_name, 850s ) 850s 850s logger.debug(f"creating session {session_name}") 850s 850s env = os.environ.get("TMUX") 850s 850s if env: 850s del os.environ["TMUX"] 850s 850s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 850s "-P", 850s "-F#{session_id}", # output 850s ) 850s 850s if session_name is not None: 850s tmux_args += (f"-s{session_name}",) 850s 850s if not attach: 850s tmux_args += ("-d",) 850s 850s if start_directory: 850s tmux_args += ("-c", start_directory) 850s 850s if window_name: 850s tmux_args += ("-n", window_name) 850s 850s if x is not None: 850s tmux_args += ("-x", x) 850s 850s if y is not None: 850s tmux_args += ("-y", y) 850s 850s if window_command: 850s tmux_args += (window_command,) 850s 850s if environment: 850s if has_gte_version("3.2"): 850s for k, v in environment.items(): 850s tmux_args += (f"-e{k}={v}",) 850s else: 850s logger.warning( 850s "Environment flag ignored, tmux 3.2 or newer required.", 850s ) 850s 850s proc = self.cmd("new-session", *tmux_args) 850s 850s if proc.stderr: 850s > raise exc.LibTmuxException(proc.stderr) 850s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 850s 850s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 850s ____________ ERROR at setup of test_load[dir-relative-file-samedir] ____________ 850s 850s request = > 850s session_params = {'x': 800, 'y': 600} 850s server = Server(socket_name=libtmux_teste8ak6xq0) 850s 850s @pytest.fixture(scope="function") 850s def session( 850s request: pytest.FixtureRequest, 850s session_params: t.Dict[str, t.Any], 850s server: Server, 850s ) -> "Session": 850s """Return new, temporary :class:`libtmux.Session`. 850s 850s >>> from libtmux.session import Session 850s 850s >>> def test_example(session: "Session") -> None: 850s ... assert isinstance(session.name, str) 850s ... assert session.name.startswith('libtmux_') 850s ... window = session.new_window(window_name='new one') 850s ... assert window.name == 'new one' 850s 850s .. :: 850s >>> locals().keys() 850s dict_keys(...) 850s 850s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 850s >>> pytester = request.getfixturevalue('pytester') 850s 850s >>> pytester.makepyfile(**{'whatever.py': source}) 850s PosixPath(...) 850s 850s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 850s ===... 850s 850s >>> result.assert_outcomes(passed=1) 850s """ 850s session_name = "tmuxp" 850s 850s if not server.has_session(session_name): 850s > server.new_session( 850s session_name=session_name, 850s ) 850s 850s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 850s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 850s 850s self = Server(socket_name=libtmux_teste8ak6xq0), session_name = 'tmuxp' 850s kill_session = False, attach = False, start_directory = None, window_name = None 850s window_command = None, x = None, y = None, environment = None, args = () 850s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 850s proc = 850s 850s def new_session( 850s self, 850s session_name: t.Optional[str] = None, 850s kill_session: bool = False, 850s attach: bool = False, 850s start_directory: t.Optional[str] = None, 850s window_name: t.Optional[str] = None, 850s window_command: t.Optional[str] = None, 850s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s environment: t.Optional[t.Dict[str, str]] = None, 850s *args: t.Any, 850s **kwargs: t.Any, 850s ) -> Session: 850s """Create new session, returns new :class:`Session`. 850s 850s Uses ``-P`` flag to print session info, ``-F`` for return formatting 850s returns new Session object. 850s 850s ``$ tmux new-session -d`` will create the session in the background 850s ``$ tmux new-session -Ad`` will move to the session name if it already 850s exists. todo: make an option to handle this. 850s 850s Parameters 850s ---------- 850s session_name : str, optional 850s :: 850s 850s $ tmux new-session -s 850s attach : bool, optional 850s create session in the foreground. ``attach=False`` is equivalent 850s to:: 850s 850s $ tmux new-session -d 850s 850s Other Parameters 850s ---------------- 850s kill_session : bool, optional 850s Kill current session if ``$ tmux has-session``. 850s Useful for testing workspaces. 850s start_directory : str, optional 850s specifies the working directory in which the 850s new session is created. 850s window_name : str, optional 850s :: 850s 850s $ tmux new-session -n 850s window_command : str, optional 850s execute a command on starting the session. The window will close 850s when the command exits. NOTE: When this command exits the window 850s will close. This feature is useful for long-running processes 850s where the closing of the window upon completion is desired. 850s x : [int, str], optional 850s Force the specified width instead of the tmux default for a 850s detached session 850s y : [int, str], optional 850s Force the specified height instead of the tmux default for a 850s detached session 850s 850s Returns 850s ------- 850s :class:`Session` 850s 850s Raises 850s ------ 850s :exc:`exc.BadSessionName` 850s 850s Examples 850s -------- 850s Sessions can be created without a session name (0.14.2+): 850s 850s >>> server.new_session() 850s Session($2 2) 850s 850s Creating them in succession will enumerate IDs (via tmux): 850s 850s >>> server.new_session() 850s Session($3 3) 850s 850s With a `session_name`: 850s 850s >>> server.new_session(session_name='my session') 850s Session($4 my session) 850s """ 850s if session_name is not None: 850s session_check_name(session_name) 850s 850s if self.has_session(session_name): 850s if kill_session: 850s self.cmd("kill-session", "-t%s" % session_name) 850s logger.info("session %s exists. killed it." % session_name) 850s else: 850s raise exc.TmuxSessionExists( 850s "Session named %s exists" % session_name, 850s ) 850s 850s logger.debug(f"creating session {session_name}") 850s 850s env = os.environ.get("TMUX") 850s 850s if env: 850s del os.environ["TMUX"] 850s 850s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 850s "-P", 850s "-F#{session_id}", # output 850s ) 850s 850s if session_name is not None: 850s tmux_args += (f"-s{session_name}",) 850s 850s if not attach: 850s tmux_args += ("-d",) 850s 850s if start_directory: 850s tmux_args += ("-c", start_directory) 850s 850s if window_name: 850s tmux_args += ("-n", window_name) 850s 850s if x is not None: 850s tmux_args += ("-x", x) 850s 850s if y is not None: 850s tmux_args += ("-y", y) 850s 850s if window_command: 850s tmux_args += (window_command,) 850s 850s if environment: 850s if has_gte_version("3.2"): 850s for k, v in environment.items(): 850s tmux_args += (f"-e{k}={v}",) 850s else: 850s logger.warning( 850s "Environment flag ignored, tmux 3.2 or newer required.", 850s ) 850s 850s proc = self.cmd("new-session", *tmux_args) 850s 850s if proc.stderr: 850s > raise exc.LibTmuxException(proc.stderr) 850s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 850s 850s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 850s _________ ERROR at setup of test_load[filename-relative-file-samedir] __________ 850s 850s request = > 850s session_params = {'x': 800, 'y': 600} 850s server = Server(socket_name=libtmux_test42yo6mzn) 850s 850s @pytest.fixture(scope="function") 850s def session( 850s request: pytest.FixtureRequest, 850s session_params: t.Dict[str, t.Any], 850s server: Server, 850s ) -> "Session": 850s """Return new, temporary :class:`libtmux.Session`. 850s 850s >>> from libtmux.session import Session 850s 850s >>> def test_example(session: "Session") -> None: 850s ... assert isinstance(session.name, str) 850s ... assert session.name.startswith('libtmux_') 850s ... window = session.new_window(window_name='new one') 850s ... assert window.name == 'new one' 850s 850s .. :: 850s >>> locals().keys() 850s dict_keys(...) 850s 850s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 850s >>> pytester = request.getfixturevalue('pytester') 850s 850s >>> pytester.makepyfile(**{'whatever.py': source}) 850s PosixPath(...) 850s 850s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 850s ===... 850s 850s >>> result.assert_outcomes(passed=1) 850s """ 850s session_name = "tmuxp" 850s 850s if not server.has_session(session_name): 850s > server.new_session( 850s session_name=session_name, 850s ) 850s 850s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 850s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 850s 850s self = Server(socket_name=libtmux_test42yo6mzn), session_name = 'tmuxp' 850s kill_session = False, attach = False, start_directory = None, window_name = None 850s window_command = None, x = None, y = None, environment = None, args = () 850s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 850s proc = 850s 850s def new_session( 850s self, 850s session_name: t.Optional[str] = None, 850s kill_session: bool = False, 850s attach: bool = False, 850s start_directory: t.Optional[str] = None, 850s window_name: t.Optional[str] = None, 850s window_command: t.Optional[str] = None, 850s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s environment: t.Optional[t.Dict[str, str]] = None, 850s *args: t.Any, 850s **kwargs: t.Any, 850s ) -> Session: 850s """Create new session, returns new :class:`Session`. 850s 850s Uses ``-P`` flag to print session info, ``-F`` for return formatting 850s returns new Session object. 850s 850s ``$ tmux new-session -d`` will create the session in the background 850s ``$ tmux new-session -Ad`` will move to the session name if it already 850s exists. todo: make an option to handle this. 850s 850s Parameters 850s ---------- 850s session_name : str, optional 850s :: 850s 850s $ tmux new-session -s 850s attach : bool, optional 850s create session in the foreground. ``attach=False`` is equivalent 850s to:: 850s 850s $ tmux new-session -d 850s 850s Other Parameters 850s ---------------- 850s kill_session : bool, optional 850s Kill current session if ``$ tmux has-session``. 850s Useful for testing workspaces. 850s start_directory : str, optional 850s specifies the working directory in which the 850s new session is created. 850s window_name : str, optional 850s :: 850s 850s $ tmux new-session -n 850s window_command : str, optional 850s execute a command on starting the session. The window will close 850s when the command exits. NOTE: When this command exits the window 850s will close. This feature is useful for long-running processes 850s where the closing of the window upon completion is desired. 850s x : [int, str], optional 850s Force the specified width instead of the tmux default for a 850s detached session 850s y : [int, str], optional 850s Force the specified height instead of the tmux default for a 850s detached session 850s 850s Returns 850s ------- 850s :class:`Session` 850s 850s Raises 850s ------ 850s :exc:`exc.BadSessionName` 850s 850s Examples 850s -------- 850s Sessions can be created without a session name (0.14.2+): 850s 850s >>> server.new_session() 850s Session($2 2) 850s 850s Creating them in succession will enumerate IDs (via tmux): 850s 850s >>> server.new_session() 850s Session($3 3) 850s 850s With a `session_name`: 850s 850s >>> server.new_session(session_name='my session') 850s Session($4 my session) 850s """ 850s if session_name is not None: 850s session_check_name(session_name) 850s 850s if self.has_session(session_name): 850s if kill_session: 850s self.cmd("kill-session", "-t%s" % session_name) 850s logger.info("session %s exists. killed it." % session_name) 850s else: 850s raise exc.TmuxSessionExists( 850s "Session named %s exists" % session_name, 850s ) 850s 850s logger.debug(f"creating session {session_name}") 850s 850s env = os.environ.get("TMUX") 850s 850s if env: 850s del os.environ["TMUX"] 850s 850s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 850s "-P", 850s "-F#{session_id}", # output 850s ) 850s 850s if session_name is not None: 850s tmux_args += (f"-s{session_name}",) 850s 850s if not attach: 850s tmux_args += ("-d",) 850s 850s if start_directory: 850s tmux_args += ("-c", start_directory) 850s 850s if window_name: 850s tmux_args += ("-n", window_name) 850s 850s if x is not None: 850s tmux_args += ("-x", x) 850s 850s if y is not None: 850s tmux_args += ("-y", y) 850s 850s if window_command: 850s tmux_args += (window_command,) 850s 850s if environment: 850s if has_gte_version("3.2"): 850s for k, v in environment.items(): 850s tmux_args += (f"-e{k}={v}",) 850s else: 850s logger.warning( 850s "Environment flag ignored, tmux 3.2 or newer required.", 850s ) 850s 850s proc = self.cmd("new-session", *tmux_args) 850s 850s if proc.stderr: 850s > raise exc.LibTmuxException(proc.stderr) 850s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 850s 850s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 850s _____________ ERROR at setup of test_load[configdir-session-name] ______________ 850s 850s request = > 850s session_params = {'x': 800, 'y': 600} 850s server = Server(socket_name=libtmux_test7uqwpmxg) 850s 850s @pytest.fixture(scope="function") 850s def session( 850s request: pytest.FixtureRequest, 850s session_params: t.Dict[str, t.Any], 850s server: Server, 850s ) -> "Session": 850s """Return new, temporary :class:`libtmux.Session`. 850s 850s >>> from libtmux.session import Session 850s 850s >>> def test_example(session: "Session") -> None: 850s ... assert isinstance(session.name, str) 850s ... assert session.name.startswith('libtmux_') 850s ... window = session.new_window(window_name='new one') 850s ... assert window.name == 'new one' 850s 850s .. :: 850s >>> locals().keys() 850s dict_keys(...) 850s 850s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 850s >>> pytester = request.getfixturevalue('pytester') 850s 850s >>> pytester.makepyfile(**{'whatever.py': source}) 850s PosixPath(...) 850s 850s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 850s ===... 850s 850s >>> result.assert_outcomes(passed=1) 850s """ 850s session_name = "tmuxp" 850s 850s if not server.has_session(session_name): 850s > server.new_session( 850s session_name=session_name, 850s ) 850s 850s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 850s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 850s 850s self = Server(socket_name=libtmux_test7uqwpmxg), session_name = 'tmuxp' 850s kill_session = False, attach = False, start_directory = None, window_name = None 850s window_command = None, x = None, y = None, environment = None, args = () 850s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 850s proc = 850s 850s def new_session( 850s self, 850s session_name: t.Optional[str] = None, 850s kill_session: bool = False, 850s attach: bool = False, 850s start_directory: t.Optional[str] = None, 850s window_name: t.Optional[str] = None, 850s window_command: t.Optional[str] = None, 850s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s environment: t.Optional[t.Dict[str, str]] = None, 850s *args: t.Any, 850s **kwargs: t.Any, 850s ) -> Session: 850s """Create new session, returns new :class:`Session`. 850s 850s Uses ``-P`` flag to print session info, ``-F`` for return formatting 850s returns new Session object. 850s 850s ``$ tmux new-session -d`` will create the session in the background 850s ``$ tmux new-session -Ad`` will move to the session name if it already 850s exists. todo: make an option to handle this. 850s 850s Parameters 850s ---------- 850s session_name : str, optional 850s :: 850s 850s $ tmux new-session -s 850s attach : bool, optional 850s create session in the foreground. ``attach=False`` is equivalent 850s to:: 850s 850s $ tmux new-session -d 850s 850s Other Parameters 850s ---------------- 850s kill_session : bool, optional 850s Kill current session if ``$ tmux has-session``. 850s Useful for testing workspaces. 850s start_directory : str, optional 850s specifies the working directory in which the 850s new session is created. 850s window_name : str, optional 850s :: 850s 850s $ tmux new-session -n 850s window_command : str, optional 850s execute a command on starting the session. The window will close 850s when the command exits. NOTE: When this command exits the window 850s will close. This feature is useful for long-running processes 850s where the closing of the window upon completion is desired. 850s x : [int, str], optional 850s Force the specified width instead of the tmux default for a 850s detached session 850s y : [int, str], optional 850s Force the specified height instead of the tmux default for a 850s detached session 850s 850s Returns 850s ------- 850s :class:`Session` 850s 850s Raises 850s ------ 850s :exc:`exc.BadSessionName` 850s 850s Examples 850s -------- 850s Sessions can be created without a session name (0.14.2+): 850s 850s >>> server.new_session() 850s Session($2 2) 850s 850s Creating them in succession will enumerate IDs (via tmux): 850s 850s >>> server.new_session() 850s Session($3 3) 850s 850s With a `session_name`: 850s 850s >>> server.new_session(session_name='my session') 850s Session($4 my session) 850s """ 850s if session_name is not None: 850s session_check_name(session_name) 850s 850s if self.has_session(session_name): 850s if kill_session: 850s self.cmd("kill-session", "-t%s" % session_name) 850s logger.info("session %s exists. killed it." % session_name) 850s else: 850s raise exc.TmuxSessionExists( 850s "Session named %s exists" % session_name, 850s ) 850s 850s logger.debug(f"creating session {session_name}") 850s 850s env = os.environ.get("TMUX") 850s 850s if env: 850s del os.environ["TMUX"] 850s 850s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 850s "-P", 850s "-F#{session_id}", # output 850s ) 850s 850s if session_name is not None: 850s tmux_args += (f"-s{session_name}",) 850s 850s if not attach: 850s tmux_args += ("-d",) 850s 850s if start_directory: 850s tmux_args += ("-c", start_directory) 850s 850s if window_name: 850s tmux_args += ("-n", window_name) 850s 850s if x is not None: 850s tmux_args += ("-x", x) 850s 850s if y is not None: 850s tmux_args += ("-y", y) 850s 850s if window_command: 850s tmux_args += (window_command,) 850s 850s if environment: 850s if has_gte_version("3.2"): 850s for k, v in environment.items(): 850s tmux_args += (f"-e{k}={v}",) 850s else: 850s logger.warning( 850s "Environment flag ignored, tmux 3.2 or newer required.", 850s ) 850s 850s proc = self.cmd("new-session", *tmux_args) 850s 850s if proc.stderr: 850s > raise exc.LibTmuxException(proc.stderr) 850s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 850s 850s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 850s _______________ ERROR at setup of test_load[configdir-absolute] ________________ 850s 850s request = > 850s session_params = {'x': 800, 'y': 600} 850s server = Server(socket_name=libtmux_testyibqejlg) 850s 850s @pytest.fixture(scope="function") 850s def session( 850s request: pytest.FixtureRequest, 850s session_params: t.Dict[str, t.Any], 850s server: Server, 850s ) -> "Session": 850s """Return new, temporary :class:`libtmux.Session`. 850s 850s >>> from libtmux.session import Session 850s 850s >>> def test_example(session: "Session") -> None: 850s ... assert isinstance(session.name, str) 850s ... assert session.name.startswith('libtmux_') 850s ... window = session.new_window(window_name='new one') 850s ... assert window.name == 'new one' 850s 850s .. :: 850s >>> locals().keys() 850s dict_keys(...) 850s 850s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 850s >>> pytester = request.getfixturevalue('pytester') 850s 850s >>> pytester.makepyfile(**{'whatever.py': source}) 850s PosixPath(...) 850s 850s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 850s ===... 850s 850s >>> result.assert_outcomes(passed=1) 850s """ 850s session_name = "tmuxp" 850s 850s if not server.has_session(session_name): 850s > server.new_session( 850s session_name=session_name, 850s ) 850s 850s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 850s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 850s 850s self = Server(socket_name=libtmux_testyibqejlg), session_name = 'tmuxp' 850s kill_session = False, attach = False, start_directory = None, window_name = None 850s window_command = None, x = None, y = None, environment = None, args = () 850s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 850s proc = 850s 850s def new_session( 850s self, 850s session_name: t.Optional[str] = None, 850s kill_session: bool = False, 850s attach: bool = False, 850s start_directory: t.Optional[str] = None, 850s window_name: t.Optional[str] = None, 850s window_command: t.Optional[str] = None, 850s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s environment: t.Optional[t.Dict[str, str]] = None, 850s *args: t.Any, 850s **kwargs: t.Any, 850s ) -> Session: 850s """Create new session, returns new :class:`Session`. 850s 850s Uses ``-P`` flag to print session info, ``-F`` for return formatting 850s returns new Session object. 850s 850s ``$ tmux new-session -d`` will create the session in the background 850s ``$ tmux new-session -Ad`` will move to the session name if it already 850s exists. todo: make an option to handle this. 850s 850s Parameters 850s ---------- 850s session_name : str, optional 850s :: 850s 850s $ tmux new-session -s 850s attach : bool, optional 850s create session in the foreground. ``attach=False`` is equivalent 850s to:: 850s 850s $ tmux new-session -d 850s 850s Other Parameters 850s ---------------- 850s kill_session : bool, optional 850s Kill current session if ``$ tmux has-session``. 850s Useful for testing workspaces. 850s start_directory : str, optional 850s specifies the working directory in which the 850s new session is created. 850s window_name : str, optional 850s :: 850s 850s $ tmux new-session -n 850s window_command : str, optional 850s execute a command on starting the session. The window will close 850s when the command exits. NOTE: When this command exits the window 850s will close. This feature is useful for long-running processes 850s where the closing of the window upon completion is desired. 850s x : [int, str], optional 850s Force the specified width instead of the tmux default for a 850s detached session 850s y : [int, str], optional 850s Force the specified height instead of the tmux default for a 850s detached session 850s 850s Returns 850s ------- 850s :class:`Session` 850s 850s Raises 850s ------ 850s :exc:`exc.BadSessionName` 850s 850s Examples 850s -------- 850s Sessions can be created without a session name (0.14.2+): 850s 850s >>> server.new_session() 850s Session($2 2) 850s 850s Creating them in succession will enumerate IDs (via tmux): 850s 850s >>> server.new_session() 850s Session($3 3) 850s 850s With a `session_name`: 850s 850s >>> server.new_session(session_name='my session') 850s Session($4 my session) 850s """ 850s if session_name is not None: 850s session_check_name(session_name) 850s 850s if self.has_session(session_name): 850s if kill_session: 850s self.cmd("kill-session", "-t%s" % session_name) 850s logger.info("session %s exists. killed it." % session_name) 850s else: 850s raise exc.TmuxSessionExists( 850s "Session named %s exists" % session_name, 850s ) 850s 850s logger.debug(f"creating session {session_name}") 850s 850s env = os.environ.get("TMUX") 850s 850s if env: 850s del os.environ["TMUX"] 850s 850s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 850s "-P", 850s "-F#{session_id}", # output 850s ) 850s 850s if session_name is not None: 850s tmux_args += (f"-s{session_name}",) 850s 850s if not attach: 850s tmux_args += ("-d",) 850s 850s if start_directory: 850s tmux_args += ("-c", start_directory) 850s 850s if window_name: 850s tmux_args += ("-n", window_name) 850s 850s if x is not None: 850s tmux_args += ("-x", x) 850s 850s if y is not None: 850s tmux_args += ("-y", y) 850s 850s if window_command: 850s tmux_args += (window_command,) 850s 850s if environment: 850s if has_gte_version("3.2"): 850s for k, v in environment.items(): 850s tmux_args += (f"-e{k}={v}",) 850s else: 850s logger.warning( 850s "Environment flag ignored, tmux 3.2 or newer required.", 850s ) 850s 850s proc = self.cmd("new-session", *tmux_args) 850s 850s if proc.stderr: 850s > raise exc.LibTmuxException(proc.stderr) 850s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 850s 850s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 850s __________ ERROR at setup of test_load[configdir-session-name-double] __________ 850s 850s request = > 850s session_params = {'x': 800, 'y': 600} 850s server = Server(socket_name=libtmux_testt5yre0v4) 850s 850s @pytest.fixture(scope="function") 850s def session( 850s request: pytest.FixtureRequest, 850s session_params: t.Dict[str, t.Any], 850s server: Server, 850s ) -> "Session": 850s """Return new, temporary :class:`libtmux.Session`. 850s 850s >>> from libtmux.session import Session 850s 850s >>> def test_example(session: "Session") -> None: 850s ... assert isinstance(session.name, str) 850s ... assert session.name.startswith('libtmux_') 850s ... window = session.new_window(window_name='new one') 850s ... assert window.name == 'new one' 850s 850s .. :: 850s >>> locals().keys() 850s dict_keys(...) 850s 850s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 850s >>> pytester = request.getfixturevalue('pytester') 850s 850s >>> pytester.makepyfile(**{'whatever.py': source}) 850s PosixPath(...) 850s 850s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 850s ===... 850s 850s >>> result.assert_outcomes(passed=1) 850s """ 850s session_name = "tmuxp" 850s 850s if not server.has_session(session_name): 850s > server.new_session( 850s session_name=session_name, 850s ) 850s 850s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 850s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 850s 850s self = Server(socket_name=libtmux_testt5yre0v4), session_name = 'tmuxp' 850s kill_session = False, attach = False, start_directory = None, window_name = None 850s window_command = None, x = None, y = None, environment = None, args = () 850s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 850s proc = 850s 850s def new_session( 850s self, 850s session_name: t.Optional[str] = None, 850s kill_session: bool = False, 850s attach: bool = False, 850s start_directory: t.Optional[str] = None, 850s window_name: t.Optional[str] = None, 850s window_command: t.Optional[str] = None, 850s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s environment: t.Optional[t.Dict[str, str]] = None, 850s *args: t.Any, 850s **kwargs: t.Any, 850s ) -> Session: 850s """Create new session, returns new :class:`Session`. 850s 850s Uses ``-P`` flag to print session info, ``-F`` for return formatting 850s returns new Session object. 850s 850s ``$ tmux new-session -d`` will create the session in the background 850s ``$ tmux new-session -Ad`` will move to the session name if it already 850s exists. todo: make an option to handle this. 850s 850s Parameters 850s ---------- 850s session_name : str, optional 850s :: 850s 850s $ tmux new-session -s 850s attach : bool, optional 850s create session in the foreground. ``attach=False`` is equivalent 850s to:: 850s 850s $ tmux new-session -d 850s 850s Other Parameters 850s ---------------- 850s kill_session : bool, optional 850s Kill current session if ``$ tmux has-session``. 850s Useful for testing workspaces. 850s start_directory : str, optional 850s specifies the working directory in which the 850s new session is created. 850s window_name : str, optional 850s :: 850s 850s $ tmux new-session -n 850s window_command : str, optional 850s execute a command on starting the session. The window will close 850s when the command exits. NOTE: When this command exits the window 850s will close. This feature is useful for long-running processes 850s where the closing of the window upon completion is desired. 850s x : [int, str], optional 850s Force the specified width instead of the tmux default for a 850s detached session 850s y : [int, str], optional 850s Force the specified height instead of the tmux default for a 850s detached session 850s 850s Returns 850s ------- 850s :class:`Session` 850s 850s Raises 850s ------ 850s :exc:`exc.BadSessionName` 850s 850s Examples 850s -------- 850s Sessions can be created without a session name (0.14.2+): 850s 850s >>> server.new_session() 850s Session($2 2) 850s 850s Creating them in succession will enumerate IDs (via tmux): 850s 850s >>> server.new_session() 850s Session($3 3) 850s 850s With a `session_name`: 850s 850s >>> server.new_session(session_name='my session') 850s Session($4 my session) 850s """ 850s if session_name is not None: 850s session_check_name(session_name) 850s 850s if self.has_session(session_name): 850s if kill_session: 850s self.cmd("kill-session", "-t%s" % session_name) 850s logger.info("session %s exists. killed it." % session_name) 850s else: 850s raise exc.TmuxSessionExists( 850s "Session named %s exists" % session_name, 850s ) 850s 850s logger.debug(f"creating session {session_name}") 850s 850s env = os.environ.get("TMUX") 850s 850s if env: 850s del os.environ["TMUX"] 850s 850s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 850s "-P", 850s "-F#{session_id}", # output 850s ) 850s 850s if session_name is not None: 850s tmux_args += (f"-s{session_name}",) 850s 850s if not attach: 850s tmux_args += ("-d",) 850s 850s if start_directory: 850s tmux_args += ("-c", start_directory) 850s 850s if window_name: 850s tmux_args += ("-n", window_name) 850s 850s if x is not None: 850s tmux_args += ("-x", x) 850s 850s if y is not None: 850s tmux_args += ("-y", y) 850s 850s if window_command: 850s tmux_args += (window_command,) 850s 850s if environment: 850s if has_gte_version("3.2"): 850s for k, v in environment.items(): 850s tmux_args += (f"-e{k}={v}",) 850s else: 850s logger.warning( 850s "Environment flag ignored, tmux 3.2 or newer required.", 850s ) 850s 850s proc = self.cmd("new-session", *tmux_args) 850s 850s if proc.stderr: 850s > raise exc.LibTmuxException(proc.stderr) 850s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 850s 850s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 850s ________ ERROR at setup of test_regression_00132_session_name_with_dots ________ 850s 850s request = > 850s session_params = {'x': 800, 'y': 600} 850s server = Server(socket_name=libtmux_testypifsug6) 850s 850s @pytest.fixture(scope="function") 850s def session( 850s request: pytest.FixtureRequest, 850s session_params: t.Dict[str, t.Any], 850s server: Server, 850s ) -> "Session": 850s """Return new, temporary :class:`libtmux.Session`. 850s 850s >>> from libtmux.session import Session 850s 850s >>> def test_example(session: "Session") -> None: 850s ... assert isinstance(session.name, str) 850s ... assert session.name.startswith('libtmux_') 850s ... window = session.new_window(window_name='new one') 850s ... assert window.name == 'new one' 850s 850s .. :: 850s >>> locals().keys() 850s dict_keys(...) 850s 850s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 850s >>> pytester = request.getfixturevalue('pytester') 850s 850s >>> pytester.makepyfile(**{'whatever.py': source}) 850s PosixPath(...) 850s 850s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 850s ===... 850s 850s >>> result.assert_outcomes(passed=1) 850s """ 850s session_name = "tmuxp" 850s 850s if not server.has_session(session_name): 850s > server.new_session( 850s session_name=session_name, 850s ) 850s 850s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 850s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 850s 850s self = Server(socket_name=libtmux_testypifsug6), session_name = 'tmuxp' 850s kill_session = False, attach = False, start_directory = None, window_name = None 850s window_command = None, x = None, y = None, environment = None, args = () 850s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 850s proc = 850s 850s def new_session( 850s self, 850s session_name: t.Optional[str] = None, 850s kill_session: bool = False, 850s attach: bool = False, 850s start_directory: t.Optional[str] = None, 850s window_name: t.Optional[str] = None, 850s window_command: t.Optional[str] = None, 850s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s environment: t.Optional[t.Dict[str, str]] = None, 850s *args: t.Any, 850s **kwargs: t.Any, 850s ) -> Session: 850s """Create new session, returns new :class:`Session`. 850s 850s Uses ``-P`` flag to print session info, ``-F`` for return formatting 850s returns new Session object. 850s 850s ``$ tmux new-session -d`` will create the session in the background 850s ``$ tmux new-session -Ad`` will move to the session name if it already 850s exists. todo: make an option to handle this. 850s 850s Parameters 850s ---------- 850s session_name : str, optional 850s :: 850s 850s $ tmux new-session -s 850s attach : bool, optional 850s create session in the foreground. ``attach=False`` is equivalent 850s to:: 850s 850s $ tmux new-session -d 850s 850s Other Parameters 850s ---------------- 850s kill_session : bool, optional 850s Kill current session if ``$ tmux has-session``. 850s Useful for testing workspaces. 850s start_directory : str, optional 850s specifies the working directory in which the 850s new session is created. 850s window_name : str, optional 850s :: 850s 850s $ tmux new-session -n 850s window_command : str, optional 850s execute a command on starting the session. The window will close 850s when the command exits. NOTE: When this command exits the window 850s will close. This feature is useful for long-running processes 850s where the closing of the window upon completion is desired. 850s x : [int, str], optional 850s Force the specified width instead of the tmux default for a 850s detached session 850s y : [int, str], optional 850s Force the specified height instead of the tmux default for a 850s detached session 850s 850s Returns 850s ------- 850s :class:`Session` 850s 850s Raises 850s ------ 850s :exc:`exc.BadSessionName` 850s 850s Examples 850s -------- 850s Sessions can be created without a session name (0.14.2+): 850s 850s >>> server.new_session() 850s Session($2 2) 850s 850s Creating them in succession will enumerate IDs (via tmux): 850s 850s >>> server.new_session() 850s Session($3 3) 850s 850s With a `session_name`: 850s 850s >>> server.new_session(session_name='my session') 850s Session($4 my session) 850s """ 850s if session_name is not None: 850s session_check_name(session_name) 850s 850s if self.has_session(session_name): 850s if kill_session: 850s self.cmd("kill-session", "-t%s" % session_name) 850s logger.info("session %s exists. killed it." % session_name) 850s else: 850s raise exc.TmuxSessionExists( 850s "Session named %s exists" % session_name, 850s ) 850s 850s logger.debug(f"creating session {session_name}") 850s 850s env = os.environ.get("TMUX") 850s 850s if env: 850s del os.environ["TMUX"] 850s 850s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 850s "-P", 850s "-F#{session_id}", # output 850s ) 850s 850s if session_name is not None: 850s tmux_args += (f"-s{session_name}",) 850s 850s if not attach: 850s tmux_args += ("-d",) 850s 850s if start_directory: 850s tmux_args += ("-c", start_directory) 850s 850s if window_name: 850s tmux_args += ("-n", window_name) 850s 850s if x is not None: 850s tmux_args += ("-x", x) 850s 850s if y is not None: 850s tmux_args += ("-y", y) 850s 850s if window_command: 850s tmux_args += (window_command,) 850s 850s if environment: 850s if has_gte_version("3.2"): 850s for k, v in environment.items(): 850s tmux_args += (f"-e{k}={v}",) 850s else: 850s logger.warning( 850s "Environment flag ignored, tmux 3.2 or newer required.", 850s ) 850s 850s proc = self.cmd("new-session", *tmux_args) 850s 850s if proc.stderr: 850s > raise exc.LibTmuxException(proc.stderr) 850s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 850s 850s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 850s ___________ ERROR at setup of test_shell[print-socket-name-cli_cmd0] ___________ 850s 850s request = > 850s session_params = {'x': 800, 'y': 600} 850s server = Server(socket_name=libtmux_testdj3qa_6u) 850s 850s @pytest.fixture(scope="function") 850s def session( 850s request: pytest.FixtureRequest, 850s session_params: t.Dict[str, t.Any], 850s server: Server, 850s ) -> "Session": 850s """Return new, temporary :class:`libtmux.Session`. 850s 850s >>> from libtmux.session import Session 850s 850s >>> def test_example(session: "Session") -> None: 850s ... assert isinstance(session.name, str) 850s ... assert session.name.startswith('libtmux_') 850s ... window = session.new_window(window_name='new one') 850s ... assert window.name == 'new one' 850s 850s .. :: 850s >>> locals().keys() 850s dict_keys(...) 850s 850s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 850s >>> pytester = request.getfixturevalue('pytester') 850s 850s >>> pytester.makepyfile(**{'whatever.py': source}) 850s PosixPath(...) 850s 850s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 850s ===... 850s 850s >>> result.assert_outcomes(passed=1) 850s """ 850s session_name = "tmuxp" 850s 850s if not server.has_session(session_name): 850s > server.new_session( 850s session_name=session_name, 850s ) 850s 850s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 850s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 850s 850s self = Server(socket_name=libtmux_testdj3qa_6u), session_name = 'tmuxp' 850s kill_session = False, attach = False, start_directory = None, window_name = None 850s window_command = None, x = None, y = None, environment = None, args = () 850s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 850s proc = 850s 850s def new_session( 850s self, 850s session_name: t.Optional[str] = None, 850s kill_session: bool = False, 850s attach: bool = False, 850s start_directory: t.Optional[str] = None, 850s window_name: t.Optional[str] = None, 850s window_command: t.Optional[str] = None, 850s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s environment: t.Optional[t.Dict[str, str]] = None, 850s *args: t.Any, 850s **kwargs: t.Any, 850s ) -> Session: 850s """Create new session, returns new :class:`Session`. 850s 850s Uses ``-P`` flag to print session info, ``-F`` for return formatting 850s returns new Session object. 850s 850s ``$ tmux new-session -d`` will create the session in the background 850s ``$ tmux new-session -Ad`` will move to the session name if it already 850s exists. todo: make an option to handle this. 850s 850s Parameters 850s ---------- 850s session_name : str, optional 850s :: 850s 850s $ tmux new-session -s 850s attach : bool, optional 850s create session in the foreground. ``attach=False`` is equivalent 850s to:: 850s 850s $ tmux new-session -d 850s 850s Other Parameters 850s ---------------- 850s kill_session : bool, optional 850s Kill current session if ``$ tmux has-session``. 850s Useful for testing workspaces. 850s start_directory : str, optional 850s specifies the working directory in which the 850s new session is created. 850s window_name : str, optional 850s :: 850s 850s $ tmux new-session -n 850s window_command : str, optional 850s execute a command on starting the session. The window will close 850s when the command exits. NOTE: When this command exits the window 850s will close. This feature is useful for long-running processes 850s where the closing of the window upon completion is desired. 850s x : [int, str], optional 850s Force the specified width instead of the tmux default for a 850s detached session 850s y : [int, str], optional 850s Force the specified height instead of the tmux default for a 850s detached session 850s 850s Returns 850s ------- 850s :class:`Session` 850s 850s Raises 850s ------ 850s :exc:`exc.BadSessionName` 850s 850s Examples 850s -------- 850s Sessions can be created without a session name (0.14.2+): 850s 850s >>> server.new_session() 850s Session($2 2) 850s 850s Creating them in succession will enumerate IDs (via tmux): 850s 850s >>> server.new_session() 850s Session($3 3) 850s 850s With a `session_name`: 850s 850s >>> server.new_session(session_name='my session') 850s Session($4 my session) 850s """ 850s if session_name is not None: 850s session_check_name(session_name) 850s 850s if self.has_session(session_name): 850s if kill_session: 850s self.cmd("kill-session", "-t%s" % session_name) 850s logger.info("session %s exists. killed it." % session_name) 850s else: 850s raise exc.TmuxSessionExists( 850s "Session named %s exists" % session_name, 850s ) 850s 850s logger.debug(f"creating session {session_name}") 850s 850s env = os.environ.get("TMUX") 850s 850s if env: 850s del os.environ["TMUX"] 850s 850s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 850s "-P", 850s "-F#{session_id}", # output 850s ) 850s 850s if session_name is not None: 850s tmux_args += (f"-s{session_name}",) 850s 850s if not attach: 850s tmux_args += ("-d",) 850s 850s if start_directory: 850s tmux_args += ("-c", start_directory) 850s 850s if window_name: 850s tmux_args += ("-n", window_name) 850s 850s if x is not None: 850s tmux_args += ("-x", x) 850s 850s if y is not None: 850s tmux_args += ("-y", y) 850s 850s if window_command: 850s tmux_args += (window_command,) 850s 850s if environment: 850s if has_gte_version("3.2"): 850s for k, v in environment.items(): 850s tmux_args += (f"-e{k}={v}",) 850s else: 850s logger.warning( 850s "Environment flag ignored, tmux 3.2 or newer required.", 850s ) 850s 850s proc = self.cmd("new-session", *tmux_args) 850s 850s if proc.stderr: 850s > raise exc.LibTmuxException(proc.stderr) 850s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 850s 850s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 850s ___________ ERROR at setup of test_shell[print-socket-name-cli_cmd1] ___________ 850s 850s request = > 850s session_params = {'x': 800, 'y': 600} 850s server = Server(socket_name=libtmux_test3oryufm8) 850s 850s @pytest.fixture(scope="function") 850s def session( 850s request: pytest.FixtureRequest, 850s session_params: t.Dict[str, t.Any], 850s server: Server, 850s ) -> "Session": 850s """Return new, temporary :class:`libtmux.Session`. 850s 850s >>> from libtmux.session import Session 850s 850s >>> def test_example(session: "Session") -> None: 850s ... assert isinstance(session.name, str) 850s ... assert session.name.startswith('libtmux_') 850s ... window = session.new_window(window_name='new one') 850s ... assert window.name == 'new one' 850s 850s .. :: 850s >>> locals().keys() 850s dict_keys(...) 850s 850s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 850s >>> pytester = request.getfixturevalue('pytester') 850s 850s >>> pytester.makepyfile(**{'whatever.py': source}) 850s PosixPath(...) 850s 850s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 850s ===... 850s 850s >>> result.assert_outcomes(passed=1) 850s """ 850s session_name = "tmuxp" 850s 850s if not server.has_session(session_name): 850s > server.new_session( 850s session_name=session_name, 850s ) 850s 850s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 850s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 850s 850s self = Server(socket_name=libtmux_test3oryufm8), session_name = 'tmuxp' 850s kill_session = False, attach = False, start_directory = None, window_name = None 850s window_command = None, x = None, y = None, environment = None, args = () 850s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 850s proc = 850s 850s def new_session( 850s self, 850s session_name: t.Optional[str] = None, 850s kill_session: bool = False, 850s attach: bool = False, 850s start_directory: t.Optional[str] = None, 850s window_name: t.Optional[str] = None, 850s window_command: t.Optional[str] = None, 850s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s environment: t.Optional[t.Dict[str, str]] = None, 850s *args: t.Any, 850s **kwargs: t.Any, 850s ) -> Session: 850s """Create new session, returns new :class:`Session`. 850s 850s Uses ``-P`` flag to print session info, ``-F`` for return formatting 850s returns new Session object. 850s 850s ``$ tmux new-session -d`` will create the session in the background 850s ``$ tmux new-session -Ad`` will move to the session name if it already 850s exists. todo: make an option to handle this. 850s 850s Parameters 850s ---------- 850s session_name : str, optional 850s :: 850s 850s $ tmux new-session -s 850s attach : bool, optional 850s create session in the foreground. ``attach=False`` is equivalent 850s to:: 850s 850s $ tmux new-session -d 850s 850s Other Parameters 850s ---------------- 850s kill_session : bool, optional 850s Kill current session if ``$ tmux has-session``. 850s Useful for testing workspaces. 850s start_directory : str, optional 850s specifies the working directory in which the 850s new session is created. 850s window_name : str, optional 850s :: 850s 850s $ tmux new-session -n 850s window_command : str, optional 850s execute a command on starting the session. The window will close 850s when the command exits. NOTE: When this command exits the window 850s will close. This feature is useful for long-running processes 850s where the closing of the window upon completion is desired. 850s x : [int, str], optional 850s Force the specified width instead of the tmux default for a 850s detached session 850s y : [int, str], optional 850s Force the specified height instead of the tmux default for a 850s detached session 850s 850s Returns 850s ------- 850s :class:`Session` 850s 850s Raises 850s ------ 850s :exc:`exc.BadSessionName` 850s 850s Examples 850s -------- 850s Sessions can be created without a session name (0.14.2+): 850s 850s >>> server.new_session() 850s Session($2 2) 850s 850s Creating them in succession will enumerate IDs (via tmux): 850s 850s >>> server.new_session() 850s Session($3 3) 850s 850s With a `session_name`: 850s 850s >>> server.new_session(session_name='my session') 850s Session($4 my session) 850s """ 850s if session_name is not None: 850s session_check_name(session_name) 850s 850s if self.has_session(session_name): 850s if kill_session: 850s self.cmd("kill-session", "-t%s" % session_name) 850s logger.info("session %s exists. killed it." % session_name) 850s else: 850s raise exc.TmuxSessionExists( 850s "Session named %s exists" % session_name, 850s ) 850s 850s logger.debug(f"creating session {session_name}") 850s 850s env = os.environ.get("TMUX") 850s 850s if env: 850s del os.environ["TMUX"] 850s 850s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 850s "-P", 850s "-F#{session_id}", # output 850s ) 850s 850s if session_name is not None: 850s tmux_args += (f"-s{session_name}",) 850s 850s if not attach: 850s tmux_args += ("-d",) 850s 850s if start_directory: 850s tmux_args += ("-c", start_directory) 850s 850s if window_name: 850s tmux_args += ("-n", window_name) 850s 850s if x is not None: 850s tmux_args += ("-x", x) 850s 850s if y is not None: 850s tmux_args += ("-y", y) 850s 850s if window_command: 850s tmux_args += (window_command,) 850s 850s if environment: 850s if has_gte_version("3.2"): 850s for k, v in environment.items(): 850s tmux_args += (f"-e{k}={v}",) 850s else: 850s logger.warning( 850s "Environment flag ignored, tmux 3.2 or newer required.", 850s ) 850s 850s proc = self.cmd("new-session", *tmux_args) 850s 850s if proc.stderr: 850s > raise exc.LibTmuxException(proc.stderr) 850s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 850s 850s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 850s __________ ERROR at setup of test_shell[print-session-name-cli_cmd0] ___________ 850s 850s request = > 850s session_params = {'x': 800, 'y': 600} 850s server = Server(socket_name=libtmux_testnma4wcrg) 850s 850s @pytest.fixture(scope="function") 850s def session( 850s request: pytest.FixtureRequest, 850s session_params: t.Dict[str, t.Any], 850s server: Server, 850s ) -> "Session": 850s """Return new, temporary :class:`libtmux.Session`. 850s 850s >>> from libtmux.session import Session 850s 850s >>> def test_example(session: "Session") -> None: 850s ... assert isinstance(session.name, str) 850s ... assert session.name.startswith('libtmux_') 850s ... window = session.new_window(window_name='new one') 850s ... assert window.name == 'new one' 850s 850s .. :: 850s >>> locals().keys() 850s dict_keys(...) 850s 850s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 850s >>> pytester = request.getfixturevalue('pytester') 850s 850s >>> pytester.makepyfile(**{'whatever.py': source}) 850s PosixPath(...) 850s 850s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 850s ===... 850s 850s >>> result.assert_outcomes(passed=1) 850s """ 850s session_name = "tmuxp" 850s 850s if not server.has_session(session_name): 850s > server.new_session( 850s session_name=session_name, 850s ) 850s 850s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 850s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 850s 850s self = Server(socket_name=libtmux_testnma4wcrg), session_name = 'tmuxp' 850s kill_session = False, attach = False, start_directory = None, window_name = None 850s window_command = None, x = None, y = None, environment = None, args = () 850s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 850s proc = 850s 850s def new_session( 850s self, 850s session_name: t.Optional[str] = None, 850s kill_session: bool = False, 850s attach: bool = False, 850s start_directory: t.Optional[str] = None, 850s window_name: t.Optional[str] = None, 850s window_command: t.Optional[str] = None, 850s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s environment: t.Optional[t.Dict[str, str]] = None, 850s *args: t.Any, 850s **kwargs: t.Any, 850s ) -> Session: 850s """Create new session, returns new :class:`Session`. 850s 850s Uses ``-P`` flag to print session info, ``-F`` for return formatting 850s returns new Session object. 850s 850s ``$ tmux new-session -d`` will create the session in the background 850s ``$ tmux new-session -Ad`` will move to the session name if it already 850s exists. todo: make an option to handle this. 850s 850s Parameters 850s ---------- 850s session_name : str, optional 850s :: 850s 850s $ tmux new-session -s 850s attach : bool, optional 850s create session in the foreground. ``attach=False`` is equivalent 850s to:: 850s 850s $ tmux new-session -d 850s 850s Other Parameters 850s ---------------- 850s kill_session : bool, optional 850s Kill current session if ``$ tmux has-session``. 850s Useful for testing workspaces. 850s start_directory : str, optional 850s specifies the working directory in which the 850s new session is created. 850s window_name : str, optional 850s :: 850s 850s $ tmux new-session -n 850s window_command : str, optional 850s execute a command on starting the session. The window will close 850s when the command exits. NOTE: When this command exits the window 850s will close. This feature is useful for long-running processes 850s where the closing of the window upon completion is desired. 850s x : [int, str], optional 850s Force the specified width instead of the tmux default for a 850s detached session 850s y : [int, str], optional 850s Force the specified height instead of the tmux default for a 850s detached session 850s 850s Returns 850s ------- 850s :class:`Session` 850s 850s Raises 850s ------ 850s :exc:`exc.BadSessionName` 850s 850s Examples 850s -------- 850s Sessions can be created without a session name (0.14.2+): 850s 850s >>> server.new_session() 850s Session($2 2) 850s 850s Creating them in succession will enumerate IDs (via tmux): 850s 850s >>> server.new_session() 850s Session($3 3) 850s 850s With a `session_name`: 850s 850s >>> server.new_session(session_name='my session') 850s Session($4 my session) 850s """ 850s if session_name is not None: 850s session_check_name(session_name) 850s 850s if self.has_session(session_name): 850s if kill_session: 850s self.cmd("kill-session", "-t%s" % session_name) 850s logger.info("session %s exists. killed it." % session_name) 850s else: 850s raise exc.TmuxSessionExists( 850s "Session named %s exists" % session_name, 850s ) 850s 850s logger.debug(f"creating session {session_name}") 850s 850s env = os.environ.get("TMUX") 850s 850s if env: 850s del os.environ["TMUX"] 850s 850s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 850s "-P", 850s "-F#{session_id}", # output 850s ) 850s 850s if session_name is not None: 850s tmux_args += (f"-s{session_name}",) 850s 850s if not attach: 850s tmux_args += ("-d",) 850s 850s if start_directory: 850s tmux_args += ("-c", start_directory) 850s 850s if window_name: 850s tmux_args += ("-n", window_name) 850s 850s if x is not None: 850s tmux_args += ("-x", x) 850s 850s if y is not None: 850s tmux_args += ("-y", y) 850s 850s if window_command: 850s tmux_args += (window_command,) 850s 850s if environment: 850s if has_gte_version("3.2"): 850s for k, v in environment.items(): 850s tmux_args += (f"-e{k}={v}",) 850s else: 850s logger.warning( 850s "Environment flag ignored, tmux 3.2 or newer required.", 850s ) 850s 850s proc = self.cmd("new-session", *tmux_args) 850s 850s if proc.stderr: 850s > raise exc.LibTmuxException(proc.stderr) 850s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 850s 850s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 850s __________ ERROR at setup of test_shell[print-session-name-cli_cmd1] ___________ 850s 850s request = > 850s session_params = {'x': 800, 'y': 600} 850s server = Server(socket_name=libtmux_testk0psbvew) 850s 850s @pytest.fixture(scope="function") 850s def session( 850s request: pytest.FixtureRequest, 850s session_params: t.Dict[str, t.Any], 850s server: Server, 850s ) -> "Session": 850s """Return new, temporary :class:`libtmux.Session`. 850s 850s >>> from libtmux.session import Session 850s 850s >>> def test_example(session: "Session") -> None: 850s ... assert isinstance(session.name, str) 850s ... assert session.name.startswith('libtmux_') 850s ... window = session.new_window(window_name='new one') 850s ... assert window.name == 'new one' 850s 850s .. :: 850s >>> locals().keys() 850s dict_keys(...) 850s 850s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 850s >>> pytester = request.getfixturevalue('pytester') 850s 850s >>> pytester.makepyfile(**{'whatever.py': source}) 850s PosixPath(...) 850s 850s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 850s ===... 850s 850s >>> result.assert_outcomes(passed=1) 850s """ 850s session_name = "tmuxp" 850s 850s if not server.has_session(session_name): 850s > server.new_session( 850s session_name=session_name, 850s ) 850s 850s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 850s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 850s 850s self = Server(socket_name=libtmux_testk0psbvew), session_name = 'tmuxp' 850s kill_session = False, attach = False, start_directory = None, window_name = None 850s window_command = None, x = None, y = None, environment = None, args = () 850s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 850s proc = 850s 850s def new_session( 850s self, 850s session_name: t.Optional[str] = None, 850s kill_session: bool = False, 850s attach: bool = False, 850s start_directory: t.Optional[str] = None, 850s window_name: t.Optional[str] = None, 850s window_command: t.Optional[str] = None, 850s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s environment: t.Optional[t.Dict[str, str]] = None, 850s *args: t.Any, 850s **kwargs: t.Any, 850s ) -> Session: 850s """Create new session, returns new :class:`Session`. 850s 850s Uses ``-P`` flag to print session info, ``-F`` for return formatting 850s returns new Session object. 850s 850s ``$ tmux new-session -d`` will create the session in the background 850s ``$ tmux new-session -Ad`` will move to the session name if it already 850s exists. todo: make an option to handle this. 850s 850s Parameters 850s ---------- 850s session_name : str, optional 850s :: 850s 850s $ tmux new-session -s 850s attach : bool, optional 850s create session in the foreground. ``attach=False`` is equivalent 850s to:: 850s 850s $ tmux new-session -d 850s 850s Other Parameters 850s ---------------- 850s kill_session : bool, optional 850s Kill current session if ``$ tmux has-session``. 850s Useful for testing workspaces. 850s start_directory : str, optional 850s specifies the working directory in which the 850s new session is created. 850s window_name : str, optional 850s :: 850s 850s $ tmux new-session -n 850s window_command : str, optional 850s execute a command on starting the session. The window will close 850s when the command exits. NOTE: When this command exits the window 850s will close. This feature is useful for long-running processes 850s where the closing of the window upon completion is desired. 850s x : [int, str], optional 850s Force the specified width instead of the tmux default for a 850s detached session 850s y : [int, str], optional 850s Force the specified height instead of the tmux default for a 850s detached session 850s 850s Returns 850s ------- 850s :class:`Session` 850s 850s Raises 850s ------ 850s :exc:`exc.BadSessionName` 850s 850s Examples 850s -------- 850s Sessions can be created without a session name (0.14.2+): 850s 850s >>> server.new_session() 850s Session($2 2) 850s 850s Creating them in succession will enumerate IDs (via tmux): 850s 850s >>> server.new_session() 850s Session($3 3) 850s 850s With a `session_name`: 850s 850s >>> server.new_session(session_name='my session') 850s Session($4 my session) 850s """ 850s if session_name is not None: 850s session_check_name(session_name) 850s 850s if self.has_session(session_name): 850s if kill_session: 850s self.cmd("kill-session", "-t%s" % session_name) 850s logger.info("session %s exists. killed it." % session_name) 850s else: 850s raise exc.TmuxSessionExists( 850s "Session named %s exists" % session_name, 850s ) 850s 850s logger.debug(f"creating session {session_name}") 850s 850s env = os.environ.get("TMUX") 850s 850s if env: 850s del os.environ["TMUX"] 850s 850s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 850s "-P", 850s "-F#{session_id}", # output 850s ) 850s 850s if session_name is not None: 850s tmux_args += (f"-s{session_name}",) 850s 850s if not attach: 850s tmux_args += ("-d",) 850s 850s if start_directory: 850s tmux_args += ("-c", start_directory) 850s 850s if window_name: 850s tmux_args += ("-n", window_name) 850s 850s if x is not None: 850s tmux_args += ("-x", x) 850s 850s if y is not None: 850s tmux_args += ("-y", y) 850s 850s if window_command: 850s tmux_args += (window_command,) 850s 850s if environment: 850s if has_gte_version("3.2"): 850s for k, v in environment.items(): 850s tmux_args += (f"-e{k}={v}",) 850s else: 850s logger.warning( 850s "Environment flag ignored, tmux 3.2 or newer required.", 850s ) 850s 850s proc = self.cmd("new-session", *tmux_args) 850s 850s if proc.stderr: 850s > raise exc.LibTmuxException(proc.stderr) 850s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 850s 850s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 850s ___________ ERROR at setup of test_shell[print-has-session-cli_cmd0] ___________ 850s 850s request = > 850s session_params = {'x': 800, 'y': 600} 850s server = Server(socket_name=libtmux_testxmz_j3st) 850s 850s @pytest.fixture(scope="function") 850s def session( 850s request: pytest.FixtureRequest, 850s session_params: t.Dict[str, t.Any], 850s server: Server, 850s ) -> "Session": 850s """Return new, temporary :class:`libtmux.Session`. 850s 850s >>> from libtmux.session import Session 850s 850s >>> def test_example(session: "Session") -> None: 850s ... assert isinstance(session.name, str) 850s ... assert session.name.startswith('libtmux_') 850s ... window = session.new_window(window_name='new one') 850s ... assert window.name == 'new one' 850s 850s .. :: 850s >>> locals().keys() 850s dict_keys(...) 850s 850s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 850s >>> pytester = request.getfixturevalue('pytester') 850s 850s >>> pytester.makepyfile(**{'whatever.py': source}) 850s PosixPath(...) 850s 850s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 850s ===... 850s 850s >>> result.assert_outcomes(passed=1) 850s """ 850s session_name = "tmuxp" 850s 850s if not server.has_session(session_name): 850s > server.new_session( 850s session_name=session_name, 850s ) 850s 850s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 850s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 850s 850s self = Server(socket_name=libtmux_testxmz_j3st), session_name = 'tmuxp' 850s kill_session = False, attach = False, start_directory = None, window_name = None 850s window_command = None, x = None, y = None, environment = None, args = () 850s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 850s proc = 850s 850s def new_session( 850s self, 850s session_name: t.Optional[str] = None, 850s kill_session: bool = False, 850s attach: bool = False, 850s start_directory: t.Optional[str] = None, 850s window_name: t.Optional[str] = None, 850s window_command: t.Optional[str] = None, 850s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s environment: t.Optional[t.Dict[str, str]] = None, 850s *args: t.Any, 850s **kwargs: t.Any, 850s ) -> Session: 850s """Create new session, returns new :class:`Session`. 850s 850s Uses ``-P`` flag to print session info, ``-F`` for return formatting 850s returns new Session object. 850s 850s ``$ tmux new-session -d`` will create the session in the background 850s ``$ tmux new-session -Ad`` will move to the session name if it already 850s exists. todo: make an option to handle this. 850s 850s Parameters 850s ---------- 850s session_name : str, optional 850s :: 850s 850s $ tmux new-session -s 850s attach : bool, optional 850s create session in the foreground. ``attach=False`` is equivalent 850s to:: 850s 850s $ tmux new-session -d 850s 850s Other Parameters 850s ---------------- 850s kill_session : bool, optional 850s Kill current session if ``$ tmux has-session``. 850s Useful for testing workspaces. 850s start_directory : str, optional 850s specifies the working directory in which the 850s new session is created. 850s window_name : str, optional 850s :: 850s 850s $ tmux new-session -n 850s window_command : str, optional 850s execute a command on starting the session. The window will close 850s when the command exits. NOTE: When this command exits the window 850s will close. This feature is useful for long-running processes 850s where the closing of the window upon completion is desired. 850s x : [int, str], optional 850s Force the specified width instead of the tmux default for a 850s detached session 850s y : [int, str], optional 850s Force the specified height instead of the tmux default for a 850s detached session 850s 850s Returns 850s ------- 850s :class:`Session` 850s 850s Raises 850s ------ 850s :exc:`exc.BadSessionName` 850s 850s Examples 850s -------- 850s Sessions can be created without a session name (0.14.2+): 850s 850s >>> server.new_session() 850s Session($2 2) 850s 850s Creating them in succession will enumerate IDs (via tmux): 850s 850s >>> server.new_session() 850s Session($3 3) 850s 850s With a `session_name`: 850s 850s >>> server.new_session(session_name='my session') 850s Session($4 my session) 850s """ 850s if session_name is not None: 850s session_check_name(session_name) 850s 850s if self.has_session(session_name): 850s if kill_session: 850s self.cmd("kill-session", "-t%s" % session_name) 850s logger.info("session %s exists. killed it." % session_name) 850s else: 850s raise exc.TmuxSessionExists( 850s "Session named %s exists" % session_name, 850s ) 850s 850s logger.debug(f"creating session {session_name}") 850s 850s env = os.environ.get("TMUX") 850s 850s if env: 850s del os.environ["TMUX"] 850s 850s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 850s "-P", 850s "-F#{session_id}", # output 850s ) 850s 850s if session_name is not None: 850s tmux_args += (f"-s{session_name}",) 850s 850s if not attach: 850s tmux_args += ("-d",) 850s 850s if start_directory: 850s tmux_args += ("-c", start_directory) 850s 850s if window_name: 850s tmux_args += ("-n", window_name) 850s 850s if x is not None: 850s tmux_args += ("-x", x) 850s 850s if y is not None: 850s tmux_args += ("-y", y) 850s 850s if window_command: 850s tmux_args += (window_command,) 850s 850s if environment: 850s if has_gte_version("3.2"): 850s for k, v in environment.items(): 850s tmux_args += (f"-e{k}={v}",) 850s else: 850s logger.warning( 850s "Environment flag ignored, tmux 3.2 or newer required.", 850s ) 850s 850s proc = self.cmd("new-session", *tmux_args) 850s 850s if proc.stderr: 850s > raise exc.LibTmuxException(proc.stderr) 850s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 850s 850s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 850s ___________ ERROR at setup of test_shell[print-has-session-cli_cmd1] ___________ 850s 850s request = > 850s session_params = {'x': 800, 'y': 600} 850s server = Server(socket_name=libtmux_testeskhrx58) 850s 850s @pytest.fixture(scope="function") 850s def session( 850s request: pytest.FixtureRequest, 850s session_params: t.Dict[str, t.Any], 850s server: Server, 850s ) -> "Session": 850s """Return new, temporary :class:`libtmux.Session`. 850s 850s >>> from libtmux.session import Session 850s 850s >>> def test_example(session: "Session") -> None: 850s ... assert isinstance(session.name, str) 850s ... assert session.name.startswith('libtmux_') 850s ... window = session.new_window(window_name='new one') 850s ... assert window.name == 'new one' 850s 850s .. :: 850s >>> locals().keys() 850s dict_keys(...) 850s 850s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 850s >>> pytester = request.getfixturevalue('pytester') 850s 850s >>> pytester.makepyfile(**{'whatever.py': source}) 850s PosixPath(...) 850s 850s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 850s ===... 850s 850s >>> result.assert_outcomes(passed=1) 850s """ 850s session_name = "tmuxp" 850s 850s if not server.has_session(session_name): 850s > server.new_session( 850s session_name=session_name, 850s ) 850s 850s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 850s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 850s 850s self = Server(socket_name=libtmux_testeskhrx58), session_name = 'tmuxp' 850s kill_session = False, attach = False, start_directory = None, window_name = None 850s window_command = None, x = None, y = None, environment = None, args = () 850s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 850s proc = 850s 850s def new_session( 850s self, 850s session_name: t.Optional[str] = None, 850s kill_session: bool = False, 850s attach: bool = False, 850s start_directory: t.Optional[str] = None, 850s window_name: t.Optional[str] = None, 850s window_command: t.Optional[str] = None, 850s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s environment: t.Optional[t.Dict[str, str]] = None, 850s *args: t.Any, 850s **kwargs: t.Any, 850s ) -> Session: 850s """Create new session, returns new :class:`Session`. 850s 850s Uses ``-P`` flag to print session info, ``-F`` for return formatting 850s returns new Session object. 850s 850s ``$ tmux new-session -d`` will create the session in the background 850s ``$ tmux new-session -Ad`` will move to the session name if it already 850s exists. todo: make an option to handle this. 850s 850s Parameters 850s ---------- 850s session_name : str, optional 850s :: 850s 850s $ tmux new-session -s 850s attach : bool, optional 850s create session in the foreground. ``attach=False`` is equivalent 850s to:: 850s 850s $ tmux new-session -d 850s 850s Other Parameters 850s ---------------- 850s kill_session : bool, optional 850s Kill current session if ``$ tmux has-session``. 850s Useful for testing workspaces. 850s start_directory : str, optional 850s specifies the working directory in which the 850s new session is created. 850s window_name : str, optional 850s :: 850s 850s $ tmux new-session -n 850s window_command : str, optional 850s execute a command on starting the session. The window will close 850s when the command exits. NOTE: When this command exits the window 850s will close. This feature is useful for long-running processes 850s where the closing of the window upon completion is desired. 850s x : [int, str], optional 850s Force the specified width instead of the tmux default for a 850s detached session 850s y : [int, str], optional 850s Force the specified height instead of the tmux default for a 850s detached session 850s 850s Returns 850s ------- 850s :class:`Session` 850s 850s Raises 850s ------ 850s :exc:`exc.BadSessionName` 850s 850s Examples 850s -------- 850s Sessions can be created without a session name (0.14.2+): 850s 850s >>> server.new_session() 850s Session($2 2) 850s 850s Creating them in succession will enumerate IDs (via tmux): 850s 850s >>> server.new_session() 850s Session($3 3) 850s 850s With a `session_name`: 850s 850s >>> server.new_session(session_name='my session') 850s Session($4 my session) 850s """ 850s if session_name is not None: 850s session_check_name(session_name) 850s 850s if self.has_session(session_name): 850s if kill_session: 850s self.cmd("kill-session", "-t%s" % session_name) 850s logger.info("session %s exists. killed it." % session_name) 850s else: 850s raise exc.TmuxSessionExists( 850s "Session named %s exists" % session_name, 850s ) 850s 850s logger.debug(f"creating session {session_name}") 850s 850s env = os.environ.get("TMUX") 850s 850s if env: 850s del os.environ["TMUX"] 850s 850s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 850s "-P", 850s "-F#{session_id}", # output 850s ) 850s 850s if session_name is not None: 850s tmux_args += (f"-s{session_name}",) 850s 850s if not attach: 850s tmux_args += ("-d",) 850s 850s if start_directory: 850s tmux_args += ("-c", start_directory) 850s 850s if window_name: 850s tmux_args += ("-n", window_name) 850s 850s if x is not None: 850s tmux_args += ("-x", x) 850s 850s if y is not None: 850s tmux_args += ("-y", y) 850s 850s if window_command: 850s tmux_args += (window_command,) 850s 850s if environment: 850s if has_gte_version("3.2"): 850s for k, v in environment.items(): 850s tmux_args += (f"-e{k}={v}",) 850s else: 850s logger.warning( 850s "Environment flag ignored, tmux 3.2 or newer required.", 850s ) 850s 850s proc = self.cmd("new-session", *tmux_args) 850s 850s if proc.stderr: 850s > raise exc.LibTmuxException(proc.stderr) 850s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 850s 850s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 850s ___________ ERROR at setup of test_shell[print-window-name-cli_cmd0] ___________ 850s 850s request = > 850s session_params = {'x': 800, 'y': 600} 850s server = Server(socket_name=libtmux_test7tfrwshd) 850s 850s @pytest.fixture(scope="function") 850s def session( 850s request: pytest.FixtureRequest, 850s session_params: t.Dict[str, t.Any], 850s server: Server, 850s ) -> "Session": 850s """Return new, temporary :class:`libtmux.Session`. 850s 850s >>> from libtmux.session import Session 850s 850s >>> def test_example(session: "Session") -> None: 850s ... assert isinstance(session.name, str) 850s ... assert session.name.startswith('libtmux_') 850s ... window = session.new_window(window_name='new one') 850s ... assert window.name == 'new one' 850s 850s .. :: 850s >>> locals().keys() 850s dict_keys(...) 850s 850s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 850s >>> pytester = request.getfixturevalue('pytester') 850s 850s >>> pytester.makepyfile(**{'whatever.py': source}) 850s PosixPath(...) 850s 850s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 850s ===... 850s 850s >>> result.assert_outcomes(passed=1) 850s """ 850s session_name = "tmuxp" 850s 850s if not server.has_session(session_name): 850s > server.new_session( 850s session_name=session_name, 850s ) 850s 850s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 850s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 850s 850s self = Server(socket_name=libtmux_test7tfrwshd), session_name = 'tmuxp' 850s kill_session = False, attach = False, start_directory = None, window_name = None 850s window_command = None, x = None, y = None, environment = None, args = () 850s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 850s proc = 850s 850s def new_session( 850s self, 850s session_name: t.Optional[str] = None, 850s kill_session: bool = False, 850s attach: bool = False, 850s start_directory: t.Optional[str] = None, 850s window_name: t.Optional[str] = None, 850s window_command: t.Optional[str] = None, 850s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 850s environment: t.Optional[t.Dict[str, str]] = None, 850s *args: t.Any, 850s **kwargs: t.Any, 850s ) -> Session: 850s """Create new session, returns new :class:`Session`. 850s 850s Uses ``-P`` flag to print session info, ``-F`` for return formatting 850s returns new Session object. 850s 850s ``$ tmux new-session -d`` will create the session in the background 850s ``$ tmux new-session -Ad`` will move to the session name if it already 850s exists. todo: make an option to handle this. 850s 850s Parameters 850s ---------- 850s session_name : str, optional 850s :: 850s 850s $ tmux new-session -s 850s attach : bool, optional 850s create session in the foreground. ``attach=False`` is equivalent 850s to:: 850s 850s $ tmux new-session -d 850s 850s Other Parameters 850s ---------------- 850s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ___________ ERROR at setup of test_shell[print-window-name-cli_cmd1] ___________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_test13uzj7gc) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test13uzj7gc), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _____________ ERROR at setup of test_shell[print-pane-id-cli_cmd0] _____________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testyqw7rctg) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testyqw7rctg), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _____________ ERROR at setup of test_shell[print-pane-id-cli_cmd1] _____________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testn1vubd60) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testn1vubd60), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _ ERROR at setup of test_shell[print-pane-id-obeys-tmux-pane-env-var-cli_cmd0] _ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_test2w7hr5ut) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test2w7hr5ut), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _ ERROR at setup of test_shell[print-pane-id-obeys-tmux-pane-env-var-cli_cmd1] _ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_test08lfo9h6) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test08lfo9h6), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _ ERROR at setup of test_shell_target_missing[cli_args0-inputs0-env0-template_ctx0-CalledProcessError-.*DoesNotExist.*-cli_cmd0] _ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testxvul9kpy) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testxvul9kpy), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _ ERROR at setup of test_shell_target_missing[cli_args0-inputs0-env0-template_ctx0-CalledProcessError-.*DoesNotExist.*-cli_cmd1] _ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_test4phc83kv) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test4phc83kv), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _ ERROR at setup of test_shell_target_missing[cli_args1-inputs1-env1-template_ctx1-TmuxpException-Session not found: nonexistent_session-cli_cmd0] _ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testwctbgxfi) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testwctbgxfi), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _ ERROR at setup of test_shell_target_missing[cli_args1-inputs1-env1-template_ctx1-TmuxpException-Session not found: nonexistent_session-cli_cmd1] _ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_test4j5dnpys) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test4j5dnpys), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _ ERROR at setup of test_shell_target_missing[cli_args2-inputs2-env2-template_ctx2-TmuxpException-Window not found: {WINDOW_NAME}-cli_cmd0] _ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testf743rp8j) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testf743rp8j), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _ ERROR at setup of test_shell_target_missing[cli_args2-inputs2-env2-template_ctx2-TmuxpException-Window not found: {WINDOW_NAME}-cli_cmd1] _ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testyexu96nh) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testyexu96nh), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _ ERROR at setup of test_shell_interactive[cli_args0-inputs0-env0-(InteractiveConsole)-cli_cmd0] _ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_test2_3cwelb) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test2_3cwelb), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _ ERROR at setup of test_shell_interactive[cli_args1-inputs1-env1-(InteractiveConsole)-cli_cmd0] _ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testyq620aus) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testyq620aus), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _____________________ ERROR at setup of test_split_windows _____________________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testyzp5brsl) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testyzp5brsl), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _______________ ERROR at setup of test_split_windows_three_pane ________________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testjw37pa40) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testjw37pa40), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ___________________ ERROR at setup of test_focus_pane_index ____________________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testrn4zt9qv) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testrn4zt9qv), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ____________________ ERROR at setup of test_session_options ____________________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testnyuxv1hi) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testnyuxv1hi), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ____________________ ERROR at setup of test_global_options _____________________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testrq59uv3w) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testrq59uv3w), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ______________ ERROR at setup of test_global_session_env_options _______________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testwnc_mi06) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testwnc_mi06), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ____________________ ERROR at setup of test_window_options _____________________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_test6nw9ct2g) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test6nw9ct2g), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _________________ ERROR at setup of test_window_options_after __________________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testqjwh436z) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testqjwh436z), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _____________________ ERROR at setup of test_window_shell ______________________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testa6sm2c4e) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testa6sm2c4e), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _________________ ERROR at setup of test_environment_variables _________________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testoa3uqgrd) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testoa3uqgrd), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ___________________ ERROR at setup of test_blank_pane_spawn ____________________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testezfsnrd3) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testezfsnrd3), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ____________________ ERROR at setup of test_start_directory ____________________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testhf1sjavr) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testhf1sjavr), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _______________ ERROR at setup of test_start_directory_relative ________________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testykscj60w) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testykscj60w), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ______________________ ERROR at setup of test_pane_order _______________________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testxjl7cn0u) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testxjl7cn0u), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _____________________ ERROR at setup of test_window_index ______________________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testmxjvqzes) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testmxjvqzes), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ________ ERROR at setup of test_plugin_system_before_workspace_builder _________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testc2db1eix) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testc2db1eix), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ____________ ERROR at setup of test_plugin_system_on_window_create _____________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_test7ybdr_f9) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test7ybdr_f9), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s __________ ERROR at setup of test_plugin_system_after_window_finished __________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testxdhpvr3s) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testxdhpvr3s), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ____ ERROR at setup of test_plugin_system_on_window_create_multiple_windows ____ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testbxiqo3ym) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testbxiqo3ym), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _ ERROR at setup of test_plugin_system_after_window_finished_multiple_windows __ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testg587vrlf) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testg587vrlf), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ____________ ERROR at setup of test_plugin_system_multiple_plugins _____________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testr_umzgt7) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testr_umzgt7), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ______________ ERROR at setup of test_first_pane_start_directory _______________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_test5dhpejzo) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test5dhpejzo), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ________________ ERROR at setup of test_layout_main_horizontal _________________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_testz7iah1q8) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testz7iah1q8), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _____________________ ERROR at setup of test_freeze_config _____________________ 851s 851s request = > 851s session_params = {'x': 800, 'y': 600} 851s server = Server(socket_name=libtmux_test6huep7k8) 851s 851s @pytest.fixture(scope="function") 851s def session( 851s request: pytest.FixtureRequest, 851s session_params: t.Dict[str, t.Any], 851s server: Server, 851s ) -> "Session": 851s """Return new, temporary :class:`libtmux.Session`. 851s 851s >>> from libtmux.session import Session 851s 851s >>> def test_example(session: "Session") -> None: 851s ... assert isinstance(session.name, str) 851s ... assert session.name.startswith('libtmux_') 851s ... window = session.new_window(window_name='new one') 851s ... assert window.name == 'new one' 851s 851s .. :: 851s >>> locals().keys() 851s dict_keys(...) 851s 851s >>> source = ''.join([e.source for e in request._pyfuncitem.dtest.examples][:3]) 851s >>> pytester = request.getfixturevalue('pytester') 851s 851s >>> pytester.makepyfile(**{'whatever.py': source}) 851s PosixPath(...) 851s 851s >>> result = pytester.runpytest('whatever.py', '--disable-warnings') 851s ===... 851s 851s >>> result.assert_outcomes(passed=1) 851s """ 851s session_name = "tmuxp" 851s 851s if not server.has_session(session_name): 851s > server.new_session( 851s session_name=session_name, 851s ) 851s 851s /usr/lib/python3/dist-packages/libtmux/pytest_plugin.py:220: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test6huep7k8), session_name = 'tmuxp' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None, tmux_args = ('-P', '-F#{session_id}', '-stmuxp', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s =================================== FAILURES =================================== 851s ____________________________ test_reattach_plugins _____________________________ 851s 851s monkeypatch_plugin_test_packages = None 851s server = Server(socket_name=libtmux_testbk_2u5q1) 851s 851s def test_reattach_plugins( 851s monkeypatch_plugin_test_packages: None, 851s server: "Server", 851s ) -> None: 851s """Test reattach plugin hook.""" 851s config_plugins = test_utils.read_workspace_file("workspace/builder/plugin_r.yaml") 851s 851s session_config = ConfigReader._load(fmt="yaml", content=config_plugins) 851s session_config = loader.expand(session_config) 851s 851s # open it detached 851s builder = WorkspaceBuilder( 851s session_config=session_config, 851s plugins=load_plugins(session_config), 851s server=server, 851s ) 851s > builder.build() 851s 851s tests/cli/test_cli.py:147: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testbk_2u5q1), session_name = 'plugin-test-r' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = 800, y = 600, environment = None, args = () 851s kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-splugin-test-r', '-d', '-x', 800, ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ________________________ test_freeze[cli_args0-inputs0] ________________________ 851s 851s server = Server(socket_name=libtmux_tests42i9brf) 851s cli_args = ['freeze', 'myfrozensession'], inputs = ['y\n', './la.yaml\n', 'y\n'] 851s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_freeze_cli_args0_inputs0_0') 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf6858ff0> 851s 851s @pytest.mark.parametrize( 851s "cli_args,inputs", 851s [ 851s (["freeze", "myfrozensession"], ["y\n", "./la.yaml\n", "y\n"]), 851s ( # Exists 851s ["freeze", "myfrozensession"], 851s ["y\n", "./exists.yaml\n", "./la.yaml\n", "y\n"], 851s ), 851s ( # Imply current session if not entered 851s ["freeze"], 851s ["y\n", "./la.yaml\n", "y\n"], 851s ), 851s (["freeze"], ["y\n", "./exists.yaml\n", "./la.yaml\n", "y\n"]), # Exists 851s ], 851s ) 851s def test_freeze( 851s server: "Server", 851s cli_args: t.List[str], 851s inputs: t.List[str], 851s tmp_path: pathlib.Path, 851s monkeypatch: pytest.MonkeyPatch, 851s ) -> None: 851s """Parametrized test for freezing a tmux session to a tmuxp config file.""" 851s monkeypatch.setenv("HOME", str(tmp_path)) 851s exists_yaml = tmp_path / "exists.yaml" 851s exists_yaml.touch() 851s 851s > server.new_session(session_name="myfirstsession") 851s 851s tests/cli/test_freeze.py:41: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_tests42i9brf), session_name = 'myfirstsession' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-smyfirstsession', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ________________________ test_freeze[cli_args1-inputs1] ________________________ 851s 851s server = Server(socket_name=libtmux_test86gq4cbo) 851s cli_args = ['freeze', 'myfrozensession'] 851s inputs = ['y\n', './exists.yaml\n', './la.yaml\n', 'y\n'] 851s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_freeze_cli_args1_inputs1_0') 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf6858f78> 851s 851s @pytest.mark.parametrize( 851s "cli_args,inputs", 851s [ 851s (["freeze", "myfrozensession"], ["y\n", "./la.yaml\n", "y\n"]), 851s ( # Exists 851s ["freeze", "myfrozensession"], 851s ["y\n", "./exists.yaml\n", "./la.yaml\n", "y\n"], 851s ), 851s ( # Imply current session if not entered 851s ["freeze"], 851s ["y\n", "./la.yaml\n", "y\n"], 851s ), 851s (["freeze"], ["y\n", "./exists.yaml\n", "./la.yaml\n", "y\n"]), # Exists 851s ], 851s ) 851s def test_freeze( 851s server: "Server", 851s cli_args: t.List[str], 851s inputs: t.List[str], 851s tmp_path: pathlib.Path, 851s monkeypatch: pytest.MonkeyPatch, 851s ) -> None: 851s """Parametrized test for freezing a tmux session to a tmuxp config file.""" 851s monkeypatch.setenv("HOME", str(tmp_path)) 851s exists_yaml = tmp_path / "exists.yaml" 851s exists_yaml.touch() 851s 851s > server.new_session(session_name="myfirstsession") 851s 851s tests/cli/test_freeze.py:41: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test86gq4cbo), session_name = 'myfirstsession' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-smyfirstsession', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ________________________ test_freeze[cli_args2-inputs2] ________________________ 851s 851s server = Server(socket_name=libtmux_testyha7lgem), cli_args = ['freeze'] 851s inputs = ['y\n', './la.yaml\n', 'y\n'] 851s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_freeze_cli_args2_inputs2_0') 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf68582b8> 851s 851s @pytest.mark.parametrize( 851s "cli_args,inputs", 851s [ 851s (["freeze", "myfrozensession"], ["y\n", "./la.yaml\n", "y\n"]), 851s ( # Exists 851s ["freeze", "myfrozensession"], 851s ["y\n", "./exists.yaml\n", "./la.yaml\n", "y\n"], 851s ), 851s ( # Imply current session if not entered 851s ["freeze"], 851s ["y\n", "./la.yaml\n", "y\n"], 851s ), 851s (["freeze"], ["y\n", "./exists.yaml\n", "./la.yaml\n", "y\n"]), # Exists 851s ], 851s ) 851s def test_freeze( 851s server: "Server", 851s cli_args: t.List[str], 851s inputs: t.List[str], 851s tmp_path: pathlib.Path, 851s monkeypatch: pytest.MonkeyPatch, 851s ) -> None: 851s """Parametrized test for freezing a tmux session to a tmuxp config file.""" 851s monkeypatch.setenv("HOME", str(tmp_path)) 851s exists_yaml = tmp_path / "exists.yaml" 851s exists_yaml.touch() 851s 851s > server.new_session(session_name="myfirstsession") 851s 851s tests/cli/test_freeze.py:41: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testyha7lgem), session_name = 'myfirstsession' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-smyfirstsession', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ________________________ test_freeze[cli_args3-inputs3] ________________________ 851s 851s server = Server(socket_name=libtmux_test6nk9f7md), cli_args = ['freeze'] 851s inputs = ['y\n', './exists.yaml\n', './la.yaml\n', 'y\n'] 851s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_freeze_cli_args3_inputs3_0') 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf6af7c90> 851s 851s @pytest.mark.parametrize( 851s "cli_args,inputs", 851s [ 851s (["freeze", "myfrozensession"], ["y\n", "./la.yaml\n", "y\n"]), 851s ( # Exists 851s ["freeze", "myfrozensession"], 851s ["y\n", "./exists.yaml\n", "./la.yaml\n", "y\n"], 851s ), 851s ( # Imply current session if not entered 851s ["freeze"], 851s ["y\n", "./la.yaml\n", "y\n"], 851s ), 851s (["freeze"], ["y\n", "./exists.yaml\n", "./la.yaml\n", "y\n"]), # Exists 851s ], 851s ) 851s def test_freeze( 851s server: "Server", 851s cli_args: t.List[str], 851s inputs: t.List[str], 851s tmp_path: pathlib.Path, 851s monkeypatch: pytest.MonkeyPatch, 851s ) -> None: 851s """Parametrized test for freezing a tmux session to a tmuxp config file.""" 851s monkeypatch.setenv("HOME", str(tmp_path)) 851s exists_yaml = tmp_path / "exists.yaml" 851s exists_yaml.touch() 851s 851s > server.new_session(session_name="myfirstsession") 851s 851s tests/cli/test_freeze.py:41: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test6nk9f7md), session_name = 'myfirstsession' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-smyfirstsession', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ___________________ test_freeze_overwrite[cli_args0-inputs0] ___________________ 851s 851s server = Server(socket_name=libtmux_testngms0jr9) 851s cli_args = ['freeze', 'mysession', '--force'] 851s inputs = ['\n', '\n', 'y\n', './exists.yaml\n', 'y\n'] 851s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_freeze_overwrite_cli_args0') 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf6b0ef18> 851s 851s @pytest.mark.parametrize( 851s "cli_args,inputs", 851s [ 851s ( # Overwrite 851s ["freeze", "mysession", "--force"], 851s ["\n", "\n", "y\n", "./exists.yaml\n", "y\n"], 851s ), 851s ( # Imply current session if not entered 851s ["freeze", "--force"], 851s ["\n", "\n", "y\n", "./exists.yaml\n", "y\n"], 851s ), 851s ], 851s ) 851s def test_freeze_overwrite( 851s server: "Server", 851s cli_args: t.List[str], 851s inputs: t.List[str], 851s tmp_path: pathlib.Path, 851s monkeypatch: pytest.MonkeyPatch, 851s ) -> None: 851s """Test overwrite prompt when freezing a tmuxp configuration file.""" 851s monkeypatch.setenv("HOME", str(tmp_path)) 851s exists_yaml = tmp_path / "exists.yaml" 851s exists_yaml.touch() 851s 851s > server.new_session(session_name="mysession") 851s 851s tests/cli/test_freeze.py:93: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testngms0jr9), session_name = 'mysession' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-smysession', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ___________________ test_freeze_overwrite[cli_args1-inputs1] ___________________ 851s 851s server = Server(socket_name=libtmux_testhliq6_vm) 851s cli_args = ['freeze', '--force'] 851s inputs = ['\n', '\n', 'y\n', './exists.yaml\n', 'y\n'] 851s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_freeze_overwrite_cli_args1') 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf6b0e930> 851s 851s @pytest.mark.parametrize( 851s "cli_args,inputs", 851s [ 851s ( # Overwrite 851s ["freeze", "mysession", "--force"], 851s ["\n", "\n", "y\n", "./exists.yaml\n", "y\n"], 851s ), 851s ( # Imply current session if not entered 851s ["freeze", "--force"], 851s ["\n", "\n", "y\n", "./exists.yaml\n", "y\n"], 851s ), 851s ], 851s ) 851s def test_freeze_overwrite( 851s server: "Server", 851s cli_args: t.List[str], 851s inputs: t.List[str], 851s tmp_path: pathlib.Path, 851s monkeypatch: pytest.MonkeyPatch, 851s ) -> None: 851s """Test overwrite prompt when freezing a tmuxp configuration file.""" 851s monkeypatch.setenv("HOME", str(tmp_path)) 851s exists_yaml = tmp_path / "exists.yaml" 851s exists_yaml.touch() 851s 851s > server.new_session(session_name="mysession") 851s 851s tests/cli/test_freeze.py:93: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testhliq6_vm), session_name = 'mysession' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-smysession', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _____________________________ test_load_workspace ______________________________ 851s 851s server = Server(socket_name=libtmux_testa8wtcp1h) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf68bd9f0> 851s 851s def test_load_workspace( 851s server: "Server", 851s monkeypatch: pytest.MonkeyPatch, 851s ) -> None: 851s """Generic test for loading a tmuxp workspace via tmuxp load.""" 851s # this is an implementation test. Since this testsuite may be ran within 851s # a tmux session by the developer himself, delete the TMUX variable 851s # temporarily. 851s monkeypatch.delenv("TMUX", raising=False) 851s session_file = FIXTURE_PATH / "workspace/builder" / "two_pane.yaml" 851s 851s # open it detached 851s > session = load_workspace( 851s session_file, 851s socket_name=server.socket_name, 851s detached=True, 851s ) 851s 851s tests/cli/test_load.py:41: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/cli/load.py:430: in load_workspace 851s _load_detached(builder) 851s /usr/lib/python3/dist-packages/tmuxp/cli/load.py:226: in _load_detached 851s builder.build() 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testa8wtcp1h) 851s session_name = 'sample workspace', kill_session = False, attach = False 851s start_directory = '/tmp/pytest-of-ubuntu/pytest-0/home0/ubuntu' 851s window_name = None, window_command = None, x = 800, y = 600, environment = None 851s args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-ssample workspace', '-d', '-c', '/tmp/pytest-of-ubuntu/pytest-0/home0/ubuntu', ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ----------------------------- Captured stdout call ----------------------------- 851s [Loading] /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/two_pane.yaml 851s ------------------------------ Captured log call ------------------------------- 851s INFO tmuxp.cli.utils:utils.py:29 [Loading] /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/two_pane.yaml 851s ____________________ test_load_workspace_passes_tmux_config ____________________ 851s 851s server = Server(socket_name=libtmux_test_tfa840n) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf68e1228> 851s 851s def test_load_workspace_passes_tmux_config( 851s server: "Server", 851s monkeypatch: pytest.MonkeyPatch, 851s ) -> None: 851s """Test tmuxp load with a tmux configuration file.""" 851s # this is an implementation test. Since this testsuite may be ran within 851s # a tmux session by the developer himself, delete the TMUX variable 851s # temporarily. 851s monkeypatch.delenv("TMUX", raising=False) 851s session_file = FIXTURE_PATH / "workspace/builder" / "two_pane.yaml" 851s 851s # open it detached 851s > session = load_workspace( 851s session_file, 851s socket_name=server.socket_name, 851s tmux_config_file=str(FIXTURE_PATH / "tmux" / "tmux.conf"), 851s detached=True, 851s ) 851s 851s tests/cli/test_load.py:63: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/cli/load.py:430: in load_workspace 851s _load_detached(builder) 851s /usr/lib/python3/dist-packages/tmuxp/cli/load.py:226: in _load_detached 851s builder.build() 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test_tfa840n) 851s session_name = 'sample workspace', kill_session = False, attach = False 851s start_directory = '/tmp/pytest-of-ubuntu/pytest-0/home0/ubuntu' 851s window_name = None, window_command = None, x = 800, y = 600, environment = None 851s args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-ssample workspace', '-d', '-c', '/tmp/pytest-of-ubuntu/pytest-0/home0/ubuntu', ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ----------------------------- Captured stdout call ----------------------------- 851s [Loading] /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/two_pane.yaml 851s ------------------------------ Captured log call ------------------------------- 851s INFO tmuxp.cli.utils:utils.py:29 [Loading] /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/two_pane.yaml 851s ______________________ test_load_workspace_named_session _______________________ 851s 851s server = Server(socket_name=libtmux_testj6ut7hwp) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf6bed600> 851s 851s def test_load_workspace_named_session( 851s server: "Server", 851s monkeypatch: pytest.MonkeyPatch, 851s ) -> None: 851s """Test tmuxp load with a custom tmux session name.""" 851s # this is an implementation test. Since this testsuite may be ran within 851s # a tmux session by the developer himself, delete the TMUX variable 851s # temporarily. 851s monkeypatch.delenv("TMUX", raising=False) 851s session_file = FIXTURE_PATH / "workspace/builder" / "two_pane.yaml" 851s 851s # open it detached 851s > session = load_workspace( 851s session_file, 851s socket_name=server.socket_name, 851s new_session_name="tmuxp-new", 851s detached=True, 851s ) 851s 851s tests/cli/test_load.py:87: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/cli/load.py:430: in load_workspace 851s _load_detached(builder) 851s /usr/lib/python3/dist-packages/tmuxp/cli/load.py:226: in _load_detached 851s builder.build() 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testj6ut7hwp), session_name = 'tmuxp-new' 851s kill_session = False, attach = False 851s start_directory = '/tmp/pytest-of-ubuntu/pytest-0/home0/ubuntu' 851s window_name = None, window_command = None, x = 800, y = 600, environment = None 851s args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-stmuxp-new', '-d', '-c', '/tmp/pytest-of-ubuntu/pytest-0/home0/ubuntu', ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ----------------------------- Captured stdout call ----------------------------- 851s [Loading] /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/two_pane.yaml 851s ------------------------------ Captured log call ------------------------------- 851s INFO tmuxp.cli.utils:utils.py:29 [Loading] /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/two_pane.yaml 851s ________________ test_load_workspace_name_match_regression_252 _________________ 851s 851s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_name_match0') 851s server = Server(socket_name=libtmux_test4wfdbymt) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf6be02b8> 851s 851s @pytest.mark.skipif( 851s has_lt_version("2.1"), 851s reason="exact session name matches only tmux >= 2.1", 851s ) 851s def test_load_workspace_name_match_regression_252( 851s tmp_path: pathlib.Path, 851s server: "Server", 851s monkeypatch: pytest.MonkeyPatch, 851s ) -> None: 851s """Test tmuxp load for a regression where tmux shell names would not match.""" 851s monkeypatch.delenv("TMUX", raising=False) 851s session_file = FIXTURE_PATH / "workspace/builder" / "two_pane.yaml" 851s 851s # open it detached 851s > session = load_workspace( 851s session_file, 851s socket_name=server.socket_name, 851s detached=True, 851s ) 851s 851s tests/cli/test_load.py:112: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/cli/load.py:430: in load_workspace 851s _load_detached(builder) 851s /usr/lib/python3/dist-packages/tmuxp/cli/load.py:226: in _load_detached 851s builder.build() 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test4wfdbymt) 851s session_name = 'sample workspace', kill_session = False, attach = False 851s start_directory = '/tmp/pytest-of-ubuntu/pytest-0/home0/ubuntu' 851s window_name = None, window_command = None, x = 800, y = 600, environment = None 851s args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-ssample workspace', '-d', '-c', '/tmp/pytest-of-ubuntu/pytest-0/home0/ubuntu', ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ----------------------------- Captured stdout call ----------------------------- 851s [Loading] /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/two_pane.yaml 851s ------------------------------ Captured log call ------------------------------- 851s INFO tmuxp.cli.utils:utils.py:29 [Loading] /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/two_pane.yaml 851s ________________________ test_load_symlinked_workspace _________________________ 851s 851s server = Server(socket_name=libtmux_testfy_7659s) 851s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_load_symlinked_workspace0') 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf6bef378> 851s 851s def test_load_symlinked_workspace( 851s server: "Server", 851s tmp_path: pathlib.Path, 851s monkeypatch: pytest.MonkeyPatch, 851s ) -> None: 851s """Test tmuxp load can follow a symlinked tmuxp config file.""" 851s # this is an implementation test. Since this testsuite may be ran within 851s # a tmux session by the developer himself, delete the TMUX variable 851s # temporarily. 851s monkeypatch.delenv("TMUX", raising=False) 851s 851s realtemp = tmp_path / "myrealtemp" 851s realtemp.mkdir() 851s linktemp = tmp_path / "symlinktemp" 851s linktemp.symlink_to(realtemp) 851s workspace_file = linktemp / "simple.yaml" 851s 851s workspace_file.write_text( 851s """ 851s session_name: samplesimple 851s start_directory: './' 851s windows: 851s - panes: 851s - echo 'hey'""", 851s encoding="utf-8", 851s ) 851s 851s # open it detached 851s > session = load_workspace( 851s str(workspace_file), 851s socket_name=server.socket_name, 851s detached=True, 851s ) 851s 851s tests/cli/test_load.py:171: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/cli/load.py:430: in load_workspace 851s _load_detached(builder) 851s /usr/lib/python3/dist-packages/tmuxp/cli/load.py:226: in _load_detached 851s builder.build() 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testfy_7659s), session_name = 'samplesimple' 851s kill_session = False, attach = False 851s start_directory = '/tmp/pytest-of-ubuntu/pytest-0/test_load_symlinked_workspace0/myrealtemp' 851s window_name = None, window_command = None, x = 800, y = 600, environment = None 851s args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-ssamplesimple', '-d', '-c', '/tmp/pytest-of-ubuntu/pytest-0/test_load_symlinked_workspace0/myrealtemp', ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ----------------------------- Captured stdout call ----------------------------- 851s [Loading] /tmp/pytest-of-ubuntu/pytest-0/test_load_symlinked_workspace0/symlinktemp/simple.yaml 851s ------------------------------ Captured log call ------------------------------- 851s INFO tmuxp.cli.utils:utils.py:29 [Loading] /tmp/pytest-of-ubuntu/pytest-0/test_load_symlinked_workspace0/symlinktemp/simple.yaml 851s _______________________ test_plugin_system_before_script _______________________ 851s 851s monkeypatch_plugin_test_packages = None 851s server = Server(socket_name=libtmux_testqyk59vza) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf6b0eca8> 851s 851s def test_plugin_system_before_script( 851s monkeypatch_plugin_test_packages: None, 851s server: "Server", 851s monkeypatch: pytest.MonkeyPatch, 851s ) -> None: 851s """Test tmuxp load with sessions using before_script.""" 851s # this is an implementation test. Since this testsuite may be ran within 851s # a tmux session by the developer himself, delete the TMUX variable 851s # temporarily. 851s monkeypatch.delenv("TMUX", raising=False) 851s session_file = FIXTURE_PATH / "workspace/builder" / "plugin_bs.yaml" 851s 851s # open it detached 851s > session = load_workspace( 851s session_file, 851s socket_name=server.socket_name, 851s detached=True, 851s ) 851s 851s tests/cli/test_load.py:562: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/cli/load.py:430: in load_workspace 851s _load_detached(builder) 851s /usr/lib/python3/dist-packages/tmuxp/cli/load.py:226: in _load_detached 851s builder.build() 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testqyk59vza), session_name = 'plugin-test-bs' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = 800, y = 600, environment = None, args = () 851s kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-splugin-test-bs', '-d', '-x', 800, ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ----------------------------- Captured stdout call ----------------------------- 851s [Loading] /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/plugin_bs.yaml 851s ------------------------------ Captured log call ------------------------------- 851s INFO tmuxp.cli.utils:utils.py:29 [Loading] /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/plugin_bs.yaml 851s ______________________________ test_load_attached ______________________________ 851s 851s server = Server(socket_name=libtmux_test8lhbjeo9) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf68583f0> 851s mocker = 851s 851s def test_load_attached( 851s server: "Server", 851s monkeypatch: pytest.MonkeyPatch, 851s mocker: MockerFixture, 851s ) -> None: 851s """Test tmuxp load's attachment behavior.""" 851s # Load a session and attach from outside tmux 851s monkeypatch.delenv("TMUX", raising=False) 851s 851s attach_session_mock = mocker.patch("libtmux.session.Session.attach_session") 851s attach_session_mock.return_value.stderr = None 851s 851s yaml_config = test_utils.read_workspace_file("workspace/builder/two_pane.yaml") 851s session_config = ConfigReader._load(fmt="yaml", content=yaml_config) 851s 851s builder = WorkspaceBuilder(session_config=session_config, server=server) 851s 851s > _load_attached(builder, False) 851s 851s tests/cli/test_load.py:589: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/cli/load.py:193: in _load_attached 851s builder.build() 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test8lhbjeo9) 851s session_name = 'sample workspace', kill_session = False, attach = False 851s start_directory = '~', window_name = None, window_command = None, x = 800 851s y = 600, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-ssample workspace', '-d', '-c', '~', ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _________________________ test_load_attached_detached __________________________ 851s 851s server = Server(socket_name=libtmux_testuz5kdor1) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf6b0e3a8> 851s mocker = 851s 851s def test_load_attached_detached( 851s server: "Server", 851s monkeypatch: pytest.MonkeyPatch, 851s mocker: MockerFixture, 851s ) -> None: 851s """Test tmuxp load when sessions are build without attaching client.""" 851s # Load a session but don't attach 851s monkeypatch.delenv("TMUX", raising=False) 851s 851s attach_session_mock = mocker.patch("libtmux.session.Session.attach_session") 851s attach_session_mock.return_value.stderr = None 851s 851s yaml_config = test_utils.read_workspace_file("workspace/builder/two_pane.yaml") 851s session_config = ConfigReader._load(fmt="yaml", content=yaml_config) 851s 851s builder = WorkspaceBuilder(session_config=session_config, server=server) 851s 851s > _load_attached(builder, True) 851s 851s tests/cli/test_load.py:611: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/cli/load.py:193: in _load_attached 851s builder.build() 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testuz5kdor1) 851s session_name = 'sample workspace', kill_session = False, attach = False 851s start_directory = '~', window_name = None, window_command = None, x = 800 851s y = 600, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-ssample workspace', '-d', '-c', '~', ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ________________________ test_load_attached_within_tmux ________________________ 851s 851s server = Server(socket_name=libtmux_testuhaqvwjk) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf68917e0> 851s mocker = 851s 851s def test_load_attached_within_tmux( 851s server: "Server", 851s monkeypatch: pytest.MonkeyPatch, 851s mocker: MockerFixture, 851s ) -> None: 851s """Test loading via tmuxp load when already within a tmux session.""" 851s # Load a session and attach from within tmux 851s monkeypatch.setenv("TMUX", "/tmp/tmux-1234/default,123,0") 851s 851s switch_client_mock = mocker.patch("libtmux.session.Session.switch_client") 851s switch_client_mock.return_value.stderr = None 851s 851s yaml_config = test_utils.read_workspace_file("workspace/builder/two_pane.yaml") 851s session_config = ConfigReader._load(fmt="yaml", content=yaml_config) 851s 851s builder = WorkspaceBuilder(session_config=session_config, server=server) 851s 851s > _load_attached(builder, False) 851s 851s tests/cli/test_load.py:633: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/cli/load.py:193: in _load_attached 851s builder.build() 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testuhaqvwjk) 851s session_name = 'sample workspace', kill_session = False, attach = False 851s start_directory = '~', window_name = None, window_command = None, x = 800 851s y = 600, environment = None, args = (), kwargs = {} 851s env = '/tmp/tmux-1234/default,123,0' 851s tmux_args = ('-P', '-F#{session_id}', '-ssample workspace', '-d', '-c', '~', ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ___________________ test_load_attached_within_tmux_detached ____________________ 851s 851s server = Server(socket_name=libtmux_test19mz4t80) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf68a30f0> 851s mocker = 851s 851s def test_load_attached_within_tmux_detached( 851s server: "Server", 851s monkeypatch: pytest.MonkeyPatch, 851s mocker: MockerFixture, 851s ) -> None: 851s """Test loading via tmuxp load within a tmux session switches clients.""" 851s # Load a session and attach from within tmux 851s monkeypatch.setenv("TMUX", "/tmp/tmux-1234/default,123,0") 851s 851s switch_client_mock = mocker.patch("libtmux.session.Session.switch_client") 851s switch_client_mock.return_value.stderr = None 851s 851s yaml_config = test_utils.read_workspace_file("workspace/builder/two_pane.yaml") 851s session_config = ConfigReader._load(fmt="yaml", content=yaml_config) 851s 851s builder = WorkspaceBuilder(session_config=session_config, server=server) 851s 851s > _load_attached(builder, True) 851s 851s tests/cli/test_load.py:655: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/cli/load.py:193: in _load_attached 851s builder.build() 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test19mz4t80) 851s session_name = 'sample workspace', kill_session = False, attach = False 851s start_directory = '~', window_name = None, window_command = None, x = 800 851s y = 600, environment = None, args = (), kwargs = {} 851s env = '/tmp/tmux-1234/default,123,0' 851s tmux_args = ('-P', '-F#{session_id}', '-ssample workspace', '-d', '-c', '~', ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _________________ test_load_append_windows_to_current_session __________________ 851s 851s server = Server(socket_name=libtmux_test9t60_zli) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf689fc30> 851s 851s def test_load_append_windows_to_current_session( 851s server: "Server", 851s monkeypatch: pytest.MonkeyPatch, 851s ) -> None: 851s """Test tmuxp load when windows are appended to the current session.""" 851s yaml_config = test_utils.read_workspace_file("workspace/builder/two_pane.yaml") 851s session_config = ConfigReader._load(fmt="yaml", content=yaml_config) 851s 851s builder = WorkspaceBuilder(session_config=session_config, server=server) 851s > builder.build() 851s 851s tests/cli/test_load.py:669: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test9t60_zli) 851s session_name = 'sample workspace', kill_session = False, attach = False 851s start_directory = '~', window_name = None, window_command = None, x = 800 851s y = 600, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-ssample workspace', '-d', '-c', '~', ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s __________ test_get_session_should_default_to_local_attached_session ___________ 851s 851s server = Server(socket_name=libtmux_test6w49n8_p) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf68dda08> 851s 851s def test_get_session_should_default_to_local_attached_session( 851s server: Server, 851s monkeypatch: pytest.MonkeyPatch, 851s ) -> None: 851s """get_session() should launch current terminal's tmux session, if inside one.""" 851s > server.new_session(session_name="myfirstsession") 851s 851s tests/test_util.py:63: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test6w49n8_p), session_name = 'myfirstsession' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-smyfirstsession', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ______ test_get_session_should_return_first_session_if_no_active_session _______ 851s 851s server = Server(socket_name=libtmux_test42qa0eig) 851s 851s def test_get_session_should_return_first_session_if_no_active_session( 851s server: Server, 851s ) -> None: 851s """get_session() should return first session if no active session.""" 851s > first_session = server.new_session(session_name="myfirstsession") 851s 851s tests/test_util.py:78: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test42qa0eig), session_name = 'myfirstsession' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = None, y = None, environment = None, args = () 851s kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-smyfirstsession', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ___________________ test_temp_session_kills_session_on_exit ____________________ 851s 851s server = Server(socket_name=libtmux_testne1lgb4v) 851s 851s def test_temp_session_kills_session_on_exit(server: Server) -> None: 851s """Test temp_session() context manager kills session on exit.""" 851s server = server 851s session_name = get_test_session_name(server=server) 851s 851s > with temp_session(server=server, session_name=session_name): 851s 851s tests/tests/test_helpers.py:12: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3.12/contextlib.py:137: in __enter__ 851s return next(self.gen) 851s /usr/lib/python3/dist-packages/libtmux/test.py:224: in temp_session 851s session = server.new_session(session_name, *args, **kwargs) 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testne1lgb4v) 851s session_name = 'libtmux_u3qrp6th', kill_session = False, attach = False 851s start_directory = None, window_name = None, window_command = None, x = None 851s y = None, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-slibtmux_u3qrp6th', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _______________ test_temp_session_if_session_killed_before_exit ________________ 851s 851s server = Server(socket_name=libtmux_test1sgti3bu) 851s 851s @pytest.mark.flaky(reruns=5) 851s def test_temp_session_if_session_killed_before_exit(server: Server) -> None: 851s """Handles situation where session already closed within context.""" 851s server = server 851s session_name = get_test_session_name(server=server) 851s 851s > with temp_session(server=server, session_name=session_name): 851s 851s tests/tests/test_helpers.py:25: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3.12/contextlib.py:137: in __enter__ 851s return next(self.gen) 851s /usr/lib/python3/dist-packages/libtmux/test.py:224: in temp_session 851s session = server.new_session(session_name, *args, **kwargs) 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test1sgti3bu) 851s session_name = 'libtmux_kb67pa3g', kill_session = False, attach = False 851s start_directory = None, window_name = None, window_command = None, x = None 851s y = None, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-slibtmux_kb67pa3g', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _________________________ test_automatic_rename_option _________________________ 851s 851s server = Server(socket_name=libtmux_testrz5um20f) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf684f8e8> 851s 851s def test_automatic_rename_option( 851s server: "Server", 851s monkeypatch: pytest.MonkeyPatch, 851s ) -> None: 851s """Test workspace builder with automatic renaming enabled.""" 851s monkeypatch.setenv("DISABLE_AUTO_TITLE", "true") 851s workspace = ConfigReader._from_file( 851s test_utils.get_workspace_file("workspace/builder/window_automatic_rename.yaml"), 851s ) 851s 851s # This should be a command guaranteed to be terminal name across systems 851s portable_command = workspace["windows"][0]["panes"][0]["shell_command"][0]["cmd"] 851s # If a command is like "man ls", get the command base name, "ls" 851s if " " in portable_command: 851s portable_command = portable_command.split(" ")[0] 851s 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s > builder.build() 851s 851s tests/workspace/test_builder.py:504: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testrz5um20f) 851s session_name = 'test window options', kill_session = False, attach = False 851s start_directory = '~', window_name = None, window_command = None, x = 800 851s y = 600, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-stest window options', '-d', '-c', '~', ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ____________________ test_start_directory_sets_session_path ____________________ 851s 851s server = Server(socket_name=libtmux_testb65jvtzm) 851s 851s @pytest.mark.skipif( 851s has_lt_version("3.2a"), 851s reason="needs format introduced in tmux >= 3.2a", 851s ) 851s def test_start_directory_sets_session_path(server: Server) -> None: 851s """Test start_directory setting path in session_path.""" 851s workspace = ConfigReader._from_file( 851s test_utils.get_workspace_file( 851s "workspace/builder/start_directory_session_path.yaml", 851s ), 851s ) 851s workspace = loader.expand(workspace) 851s workspace = loader.trickle(workspace) 851s 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s > builder.build() 851s 851s tests/workspace/test_builder.py:673: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testb65jvtzm) 851s session_name = 'sample_start_dir_session_path', kill_session = False 851s attach = False, start_directory = '/usr', window_name = None 851s window_command = None, x = 800, y = 600, environment = None, args = () 851s kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-ssample_start_dir_session_path', '-d', '-c', '/usr', ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _______________ test_before_script_throw_error_if_retcode_error ________________ 851s 851s server = Server(socket_name=libtmux_testucjla6t5) 851s 851s def test_before_script_throw_error_if_retcode_error( 851s server: Server, 851s ) -> None: 851s """Test tmuxp configuration before_script when command fails.""" 851s config_script_fails = test_utils.read_workspace_file( 851s "workspace/builder/config_script_fails.yaml", 851s ) 851s yaml_workspace = config_script_fails.format( 851s script_failed=FIXTURE_PATH / "script_failed.sh", 851s ) 851s 851s workspace = ConfigReader._load(fmt="yaml", content=yaml_workspace) 851s workspace = loader.expand(workspace) 851s workspace = loader.trickle(workspace) 851s 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s 851s > with temp_session(server) as sess: 851s 851s tests/workspace/test_builder.py:774: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3.12/contextlib.py:137: in __enter__ 851s return next(self.gen) 851s /usr/lib/python3/dist-packages/libtmux/test.py:224: in temp_session 851s session = server.new_session(session_name, *args, **kwargs) 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testucjla6t5) 851s session_name = 'libtmux_1lshd0tr', kill_session = False, attach = False 851s start_directory = None, window_name = None, window_command = None, x = None 851s y = None, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-slibtmux_1lshd0tr', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ______________ test_before_script_throw_error_if_file_not_exists _______________ 851s 851s server = Server(socket_name=libtmux_testnx97rwib) 851s 851s def test_before_script_throw_error_if_file_not_exists( 851s server: Server, 851s ) -> None: 851s """Test tmuxp configuration before_script when script does not exist.""" 851s config_script_not_exists = test_utils.read_workspace_file( 851s "workspace/builder/config_script_not_exists.yaml", 851s ) 851s yaml_workspace = config_script_not_exists.format( 851s script_not_exists=FIXTURE_PATH / "script_not_exists.sh", 851s ) 851s workspace = ConfigReader._load(fmt="yaml", content=yaml_workspace) 851s workspace = loader.expand(workspace) 851s workspace = loader.trickle(workspace) 851s 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s 851s > with temp_session(server) as session: 851s 851s tests/workspace/test_builder.py:801: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3.12/contextlib.py:137: in __enter__ 851s return next(self.gen) 851s /usr/lib/python3/dist-packages/libtmux/test.py:224: in temp_session 851s session = server.new_session(session_name, *args, **kwargs) 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testnx97rwib) 851s session_name = 'libtmux_cmt5j8y6', kill_session = False, attach = False 851s start_directory = None, window_name = None, window_command = None, x = None 851s y = None, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-slibtmux_cmt5j8y6', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ____________________ test_before_script_true_if_test_passes ____________________ 851s 851s server = Server(socket_name=libtmux_test8sxz1eok) 851s 851s def test_before_script_true_if_test_passes( 851s server: Server, 851s ) -> None: 851s """Test tmuxp configuration before_script when command succeeds.""" 851s config_script_completes = test_utils.read_workspace_file( 851s "workspace/builder/config_script_completes.yaml", 851s ) 851s script_complete_sh = FIXTURE_PATH / "script_complete.sh" 851s assert script_complete_sh.exists() 851s 851s yaml_workspace = config_script_completes.format(script_complete=script_complete_sh) 851s workspace = ConfigReader._load(fmt="yaml", content=yaml_workspace) 851s workspace = loader.expand(workspace) 851s workspace = loader.trickle(workspace) 851s 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s 851s > with temp_session(server) as session: 851s 851s tests/workspace/test_builder.py:831: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3.12/contextlib.py:137: in __enter__ 851s return next(self.gen) 851s /usr/lib/python3/dist-packages/libtmux/test.py:224: in temp_session 851s session = server.new_session(session_name, *args, **kwargs) 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test8sxz1eok) 851s session_name = 'libtmux_8c4h5bro', kill_session = False, attach = False 851s start_directory = None, window_name = None, window_command = None, x = None 851s y = None, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-slibtmux_8c4h5bro', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _______________ test_before_script_true_if_test_passes_with_args _______________ 851s 851s server = Server(socket_name=libtmux_testdrtgc19z) 851s 851s def test_before_script_true_if_test_passes_with_args( 851s server: Server, 851s ) -> None: 851s """Test tmuxp configuration before_script when command passes w/ args.""" 851s config_script_completes = test_utils.read_workspace_file( 851s "workspace/builder/config_script_completes.yaml", 851s ) 851s script_complete_sh = FIXTURE_PATH / "script_complete.sh" 851s assert script_complete_sh.exists() 851s 851s yaml_workspace = config_script_completes.format(script_complete=script_complete_sh) 851s 851s workspace = ConfigReader._load(fmt="yaml", content=yaml_workspace) 851s workspace = loader.expand(workspace) 851s workspace = loader.trickle(workspace) 851s 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s 851s > with temp_session(server) as session: 851s 851s tests/workspace/test_builder.py:853: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3.12/contextlib.py:137: in __enter__ 851s return next(self.gen) 851s /usr/lib/python3/dist-packages/libtmux/test.py:224: in temp_session 851s session = server.new_session(session_name, *args, **kwargs) 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testdrtgc19z) 851s session_name = 'libtmux_xy6chlt0', kill_session = False, attach = False 851s start_directory = None, window_name = None, window_command = None, x = None 851s y = None, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-slibtmux_xy6chlt0', '-d') 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ________________________ test_load_configs_same_session ________________________ 851s 851s server = Server(socket_name=libtmux_test62cg_whn) 851s 851s def test_load_configs_same_session( 851s server: Server, 851s ) -> None: 851s """Test tmuxp configuration can be loaded into same session.""" 851s workspace = ConfigReader._from_file( 851s path=test_utils.get_workspace_file("workspace/builder/three_windows.yaml"), 851s ) 851s 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s > builder.build() 851s 851s tests/workspace/test_builder.py:1018: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test62cg_whn) 851s session_name = 'sample_three_windows', kill_session = False, attach = False 851s start_directory = None, window_name = None, window_command = None, x = 800 851s y = 600, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-ssample_three_windows', '-d', '-x', 800, ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _____________________ test_load_configs_separate_sessions ______________________ 851s 851s server = Server(socket_name=libtmux_testzku3t0sx) 851s 851s def test_load_configs_separate_sessions( 851s server: Server, 851s ) -> None: 851s """Test workspace builder can load configuration in separate session.""" 851s workspace = ConfigReader._from_file( 851s path=test_utils.get_workspace_file("workspace/builder/three_windows.yaml"), 851s ) 851s 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s > builder.build() 851s 851s tests/workspace/test_builder.py:1052: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testzku3t0sx) 851s session_name = 'sample_three_windows', kill_session = False, attach = False 851s start_directory = None, window_name = None, window_command = None, x = 800 851s y = 600, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-ssample_three_windows', '-d', '-x', 800, ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ________________________ test_find_current_active_pane _________________________ 851s 851s server = Server(socket_name=libtmux_testny0jlg4_) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf69a42b8> 851s 851s def test_find_current_active_pane( 851s server: Server, 851s monkeypatch: pytest.MonkeyPatch, 851s ) -> None: 851s """Tests workspace builder can find the current active pane (and session).""" 851s workspace = ConfigReader._from_file( 851s path=test_utils.get_workspace_file("workspace/builder/three_windows.yaml"), 851s ) 851s 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s > builder.build() 851s 851s tests/workspace/test_builder.py:1079: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testny0jlg4_) 851s session_name = 'sample_three_windows', kill_session = False, attach = False 851s start_directory = None, window_name = None, window_command = None, x = 800 851s y = 600, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-ssample_three_windows', '-d', '-x', 800, ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ____________ test_load_workspace_enter[pane_enter_false_shortform] _____________ 851s 851s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_enter_pane0') 851s server = Server(socket_name=libtmux_testhf4jkcq8) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf697fbd0> 851s yaml = '\nsession_name: Should not execute\nwindows:\n- panes:\n - shell_command: echo "___$((1 + 3))___"\n enter: false\n' 851s output = '___4___', should_see = False 851s 851s @pytest.mark.parametrize( 851s "yaml,output,should_see", 851s [ 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: 851s - echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "other command" 851s - cmd: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s ], 851s ids=[ 851s "pane_enter_false_shortform", 851s "pane_enter_false_longform", 851s "pane_enter_default_shortform", 851s "pane_enter_default_longform", 851s "pane_command_enter_false_shortform", 851s "pane_command_enter_false_longform", 851s "pane_command_enter_default_shortform", 851s "pane_command_enter_default_longform", 851s ], 851s ) 851s def test_load_workspace_enter( 851s tmp_path: pathlib.Path, 851s server: Server, 851s monkeypatch: pytest.MonkeyPatch, 851s yaml: str, 851s output: str, 851s should_see: bool, 851s ) -> None: 851s """Test workspace enters commands to panes in tmuxp configuration.""" 851s yaml_workspace = tmp_path / "simple.yaml" 851s yaml_workspace.write_text(yaml, encoding="utf-8") 851s workspace = ConfigReader._from_file(yaml_workspace) 851s workspace = loader.expand(workspace) 851s workspace = loader.trickle(workspace) 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s > builder.build() 851s 851s tests/workspace/test_builder.py:1238: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testhf4jkcq8) 851s session_name = 'Should not execute', kill_session = False, attach = False 851s start_directory = None, window_name = None, window_command = None, x = 800 851s y = 600, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-sShould not execute', '-d', '-x', 800, ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _____________ test_load_workspace_enter[pane_enter_false_longform] _____________ 851s 851s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_enter_pane1') 851s server = Server(socket_name=libtmux_testmp5jdq98) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf6944738> 851s yaml = '\nsession_name: Should not execute\nwindows:\n- panes:\n - shell_command:\n - echo "___$((1 + 3))___"\n enter: false\n' 851s output = '___4___', should_see = False 851s 851s @pytest.mark.parametrize( 851s "yaml,output,should_see", 851s [ 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: 851s - echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "other command" 851s - cmd: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s ], 851s ids=[ 851s "pane_enter_false_shortform", 851s "pane_enter_false_longform", 851s "pane_enter_default_shortform", 851s "pane_enter_default_longform", 851s "pane_command_enter_false_shortform", 851s "pane_command_enter_false_longform", 851s "pane_command_enter_default_shortform", 851s "pane_command_enter_default_longform", 851s ], 851s ) 851s def test_load_workspace_enter( 851s tmp_path: pathlib.Path, 851s server: Server, 851s monkeypatch: pytest.MonkeyPatch, 851s yaml: str, 851s output: str, 851s should_see: bool, 851s ) -> None: 851s """Test workspace enters commands to panes in tmuxp configuration.""" 851s yaml_workspace = tmp_path / "simple.yaml" 851s yaml_workspace.write_text(yaml, encoding="utf-8") 851s workspace = ConfigReader._from_file(yaml_workspace) 851s workspace = loader.expand(workspace) 851s workspace = loader.trickle(workspace) 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s > builder.build() 851s 851s tests/workspace/test_builder.py:1238: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testmp5jdq98) 851s session_name = 'Should not execute', kill_session = False, attach = False 851s start_directory = None, window_name = None, window_command = None, x = 800 851s y = 600, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-sShould not execute', '-d', '-x', 800, ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ___________ test_load_workspace_enter[pane_enter_default_shortform] ____________ 851s 851s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_enter_pane2') 851s server = Server(socket_name=libtmux_testz1ynecxa) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf69a4ae0> 851s yaml = '\nsession_name: Should execute\nwindows:\n- panes:\n - shell_command: echo "___$((1 + 3))___"\n' 851s output = '___4___', should_see = True 851s 851s @pytest.mark.parametrize( 851s "yaml,output,should_see", 851s [ 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: 851s - echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "other command" 851s - cmd: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s ], 851s ids=[ 851s "pane_enter_false_shortform", 851s "pane_enter_false_longform", 851s "pane_enter_default_shortform", 851s "pane_enter_default_longform", 851s "pane_command_enter_false_shortform", 851s "pane_command_enter_false_longform", 851s "pane_command_enter_default_shortform", 851s "pane_command_enter_default_longform", 851s ], 851s ) 851s def test_load_workspace_enter( 851s tmp_path: pathlib.Path, 851s server: Server, 851s monkeypatch: pytest.MonkeyPatch, 851s yaml: str, 851s output: str, 851s should_see: bool, 851s ) -> None: 851s """Test workspace enters commands to panes in tmuxp configuration.""" 851s yaml_workspace = tmp_path / "simple.yaml" 851s yaml_workspace.write_text(yaml, encoding="utf-8") 851s workspace = ConfigReader._from_file(yaml_workspace) 851s workspace = loader.expand(workspace) 851s workspace = loader.trickle(workspace) 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s > builder.build() 851s 851s tests/workspace/test_builder.py:1238: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testz1ynecxa), session_name = 'Should execute' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = 800, y = 600, environment = None, args = () 851s kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-sShould execute', '-d', '-x', 800, ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ____________ test_load_workspace_enter[pane_enter_default_longform] ____________ 851s 851s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_enter_pane3') 851s server = Server(socket_name=libtmux_testm_ely2b3) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf6765480> 851s yaml = '\nsession_name: Should execute\nwindows:\n- panes:\n - shell_command:\n - echo "___$((1 + 3))___"\n' 851s output = '___4___', should_see = True 851s 851s @pytest.mark.parametrize( 851s "yaml,output,should_see", 851s [ 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: 851s - echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "other command" 851s - cmd: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s ], 851s ids=[ 851s "pane_enter_false_shortform", 851s "pane_enter_false_longform", 851s "pane_enter_default_shortform", 851s "pane_enter_default_longform", 851s "pane_command_enter_false_shortform", 851s "pane_command_enter_false_longform", 851s "pane_command_enter_default_shortform", 851s "pane_command_enter_default_longform", 851s ], 851s ) 851s def test_load_workspace_enter( 851s tmp_path: pathlib.Path, 851s server: Server, 851s monkeypatch: pytest.MonkeyPatch, 851s yaml: str, 851s output: str, 851s should_see: bool, 851s ) -> None: 851s """Test workspace enters commands to panes in tmuxp configuration.""" 851s yaml_workspace = tmp_path / "simple.yaml" 851s yaml_workspace.write_text(yaml, encoding="utf-8") 851s workspace = ConfigReader._from_file(yaml_workspace) 851s workspace = loader.expand(workspace) 851s workspace = loader.trickle(workspace) 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s > builder.build() 851s 851s tests/workspace/test_builder.py:1238: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testm_ely2b3), session_name = 'Should execute' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = 800, y = 600, environment = None, args = () 851s kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-sShould execute', '-d', '-x', 800, ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ________ test_load_workspace_enter[pane_command_enter_false_shortform] _________ 851s 851s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_enter_pane4') 851s server = Server(socket_name=libtmux_testnzk0xwcj) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf69a4ca8> 851s yaml = '\nsession_name: Should not execute\nwindows:\n- panes:\n - shell_command:\n - cmd: echo "___$((1 + 3))___"\n enter: false\n' 851s output = '___4___', should_see = False 851s 851s @pytest.mark.parametrize( 851s "yaml,output,should_see", 851s [ 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: 851s - echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "other command" 851s - cmd: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s ], 851s ids=[ 851s "pane_enter_false_shortform", 851s "pane_enter_false_longform", 851s "pane_enter_default_shortform", 851s "pane_enter_default_longform", 851s "pane_command_enter_false_shortform", 851s "pane_command_enter_false_longform", 851s "pane_command_enter_default_shortform", 851s "pane_command_enter_default_longform", 851s ], 851s ) 851s def test_load_workspace_enter( 851s tmp_path: pathlib.Path, 851s server: Server, 851s monkeypatch: pytest.MonkeyPatch, 851s yaml: str, 851s output: str, 851s should_see: bool, 851s ) -> None: 851s """Test workspace enters commands to panes in tmuxp configuration.""" 851s yaml_workspace = tmp_path / "simple.yaml" 851s yaml_workspace.write_text(yaml, encoding="utf-8") 851s workspace = ConfigReader._from_file(yaml_workspace) 851s workspace = loader.expand(workspace) 851s workspace = loader.trickle(workspace) 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s > builder.build() 851s 851s tests/workspace/test_builder.py:1238: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testnzk0xwcj) 851s session_name = 'Should not execute', kill_session = False, attach = False 851s start_directory = None, window_name = None, window_command = None, x = 800 851s y = 600, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-sShould not execute', '-d', '-x', 800, ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _________ test_load_workspace_enter[pane_command_enter_false_longform] _________ 851s 851s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_enter_pane5') 851s server = Server(socket_name=libtmux_test3sha49u_) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf697f330> 851s yaml = '\nsession_name: Should not execute\nwindows:\n- panes:\n - shell_command:\n - cmd: echo "___$((1 + 3))___"\n enter: false\n' 851s output = '___4___', should_see = False 851s 851s @pytest.mark.parametrize( 851s "yaml,output,should_see", 851s [ 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: 851s - echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "other command" 851s - cmd: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s ], 851s ids=[ 851s "pane_enter_false_shortform", 851s "pane_enter_false_longform", 851s "pane_enter_default_shortform", 851s "pane_enter_default_longform", 851s "pane_command_enter_false_shortform", 851s "pane_command_enter_false_longform", 851s "pane_command_enter_default_shortform", 851s "pane_command_enter_default_longform", 851s ], 851s ) 851s def test_load_workspace_enter( 851s tmp_path: pathlib.Path, 851s server: Server, 851s monkeypatch: pytest.MonkeyPatch, 851s yaml: str, 851s output: str, 851s should_see: bool, 851s ) -> None: 851s """Test workspace enters commands to panes in tmuxp configuration.""" 851s yaml_workspace = tmp_path / "simple.yaml" 851s yaml_workspace.write_text(yaml, encoding="utf-8") 851s workspace = ConfigReader._from_file(yaml_workspace) 851s workspace = loader.expand(workspace) 851s workspace = loader.trickle(workspace) 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s > builder.build() 851s 851s tests/workspace/test_builder.py:1238: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test3sha49u_) 851s session_name = 'Should not execute', kill_session = False, attach = False 851s start_directory = None, window_name = None, window_command = None, x = 800 851s y = 600, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-sShould not execute', '-d', '-x', 800, ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _______ test_load_workspace_enter[pane_command_enter_default_shortform] ________ 851s 851s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_enter_pane6') 851s server = Server(socket_name=libtmux_test1rhlfk32) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf67420f0> 851s yaml = '\nsession_name: Should execute\nwindows:\n- panes:\n - shell_command: echo "___$((1 + 3))___"\n' 851s output = '___4___', should_see = True 851s 851s @pytest.mark.parametrize( 851s "yaml,output,should_see", 851s [ 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: 851s - echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "other command" 851s - cmd: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s ], 851s ids=[ 851s "pane_enter_false_shortform", 851s "pane_enter_false_longform", 851s "pane_enter_default_shortform", 851s "pane_enter_default_longform", 851s "pane_command_enter_false_shortform", 851s "pane_command_enter_false_longform", 851s "pane_command_enter_default_shortform", 851s "pane_command_enter_default_longform", 851s ], 851s ) 851s def test_load_workspace_enter( 851s tmp_path: pathlib.Path, 851s server: Server, 851s monkeypatch: pytest.MonkeyPatch, 851s yaml: str, 851s output: str, 851s should_see: bool, 851s ) -> None: 851s """Test workspace enters commands to panes in tmuxp configuration.""" 851s yaml_workspace = tmp_path / "simple.yaml" 851s yaml_workspace.write_text(yaml, encoding="utf-8") 851s workspace = ConfigReader._from_file(yaml_workspace) 851s workspace = loader.expand(workspace) 851s workspace = loader.trickle(workspace) 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s > builder.build() 851s 851s tests/workspace/test_builder.py:1238: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test1rhlfk32), session_name = 'Should execute' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = 800, y = 600, environment = None, args = () 851s kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-sShould execute', '-d', '-x', 800, ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ________ test_load_workspace_enter[pane_command_enter_default_longform] ________ 851s 851s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_enter_pane7') 851s server = Server(socket_name=libtmux_testl0zjf_r1) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf6742900> 851s yaml = '\nsession_name: Should execute\nwindows:\n- panes:\n - shell_command:\n - cmd: echo "other command"\n - cmd: echo "___$((1 + 3))___"\n' 851s output = '___4___', should_see = True 851s 851s @pytest.mark.parametrize( 851s "yaml,output,should_see", 851s [ 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: 851s - echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s enter: false 851s """, 851s ), 851s "___4___", 851s False, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "other command" 851s - cmd: echo "___$((1 + 3))___" 851s """, 851s ), 851s "___4___", 851s True, 851s ], 851s ], 851s ids=[ 851s "pane_enter_false_shortform", 851s "pane_enter_false_longform", 851s "pane_enter_default_shortform", 851s "pane_enter_default_longform", 851s "pane_command_enter_false_shortform", 851s "pane_command_enter_false_longform", 851s "pane_command_enter_default_shortform", 851s "pane_command_enter_default_longform", 851s ], 851s ) 851s def test_load_workspace_enter( 851s tmp_path: pathlib.Path, 851s server: Server, 851s monkeypatch: pytest.MonkeyPatch, 851s yaml: str, 851s output: str, 851s should_see: bool, 851s ) -> None: 851s """Test workspace enters commands to panes in tmuxp configuration.""" 851s yaml_workspace = tmp_path / "simple.yaml" 851s yaml_workspace.write_text(yaml, encoding="utf-8") 851s workspace = ConfigReader._from_file(yaml_workspace) 851s workspace = loader.expand(workspace) 851s workspace = loader.trickle(workspace) 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s > builder.build() 851s 851s tests/workspace/test_builder.py:1238: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testl0zjf_r1), session_name = 'Should execute' 851s kill_session = False, attach = False, start_directory = None, window_name = None 851s window_command = None, x = 800, y = 600, environment = None, args = () 851s kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-sShould execute', '-d', '-x', 800, ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ___________ test_load_workspace_sleep[command_level_sleep_shortform] ___________ 851s 851s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_comm3') 851s server = Server(socket_name=libtmux_testildsogat) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf6743198> 851s yaml = '\nsession_name: Should not execute\nwindows:\n- panes:\n - shell_command:\n - cmd: echo "___$((1 + 5))___"\n sleep_before: .15\n - cmd: echo "___$((1 + 3))___"\n sleep_before: .35\n' 851s sleep = 0.5, output = '___4___' 851s 851s @pytest.mark.parametrize( 851s "yaml,sleep,output", 851s [ 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 5))___" 851s sleep_before: .15 851s - cmd: echo "___$((1 + 3))___" 851s sleep_before: .35 851s """, 851s ), 851s 0.5, 851s "___4___", 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 5))___" 851s sleep_before: 1 851s - cmd: echo "___$((1 + 3))___" 851s sleep_before: .25 851s """, 851s ), 851s 1.25, 851s "___4___", 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s sleep_before: .5 851s """, 851s ), 851s 0.5, 851s "___4___", 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s sleep_before: 1 851s """, 851s ), 851s 1, 851s "___4___", 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s shell_command_before: 851s - cmd: echo "sleeping before" 851s sleep_before: .5 851s windows: 851s - panes: 851s - echo "___$((1 + 3))___" 851s """, 851s ), 851s 0.5, 851s "___4___", 851s ], 851s ], 851s ids=[ 851s "command_level_sleep_shortform", 851s "command_level_pane_sleep_longform", 851s "pane_sleep_shortform", 851s "pane_sleep_longform", 851s "shell_before_before_command_level", 851s ], 851s ) 851s @pytest.mark.flaky(reruns=3) 851s def test_load_workspace_sleep( 851s tmp_path: pathlib.Path, 851s server: Server, 851s monkeypatch: pytest.MonkeyPatch, 851s yaml: str, 851s sleep: int, 851s output: str, 851s ) -> None: 851s """Test sleep commands in tmuxp configuration.""" 851s yaml_workspace = tmp_path / "simple.yaml" 851s yaml_workspace.write_text(yaml, encoding="utf-8") 851s workspace = ConfigReader._from_file(yaml_workspace) 851s workspace = loader.expand(workspace) 851s workspace = loader.trickle(workspace) 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s 851s start_time = time.process_time() 851s 851s > builder.build() 851s 851s tests/workspace/test_builder.py:1365: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testildsogat) 851s session_name = 'Should not execute', kill_session = False, attach = False 851s start_directory = None, window_name = None, window_command = None, x = 800 851s y = 600, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-sShould not execute', '-d', '-x', 800, ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _________ test_load_workspace_sleep[command_level_pane_sleep_longform] _________ 851s 851s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_comm7') 851s server = Server(socket_name=libtmux_testqbrsj3z_) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf66e4288> 851s yaml = '\nsession_name: Should not execute\nwindows:\n- panes:\n - shell_command:\n - cmd: echo "___$((1 + 5))___"\n sleep_before: 1\n - cmd: echo "___$((1 + 3))___"\n sleep_before: .25\n' 851s sleep = 1.25, output = '___4___' 851s 851s @pytest.mark.parametrize( 851s "yaml,sleep,output", 851s [ 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 5))___" 851s sleep_before: .15 851s - cmd: echo "___$((1 + 3))___" 851s sleep_before: .35 851s """, 851s ), 851s 0.5, 851s "___4___", 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 5))___" 851s sleep_before: 1 851s - cmd: echo "___$((1 + 3))___" 851s sleep_before: .25 851s """, 851s ), 851s 1.25, 851s "___4___", 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s sleep_before: .5 851s """, 851s ), 851s 0.5, 851s "___4___", 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s sleep_before: 1 851s """, 851s ), 851s 1, 851s "___4___", 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s shell_command_before: 851s - cmd: echo "sleeping before" 851s sleep_before: .5 851s windows: 851s - panes: 851s - echo "___$((1 + 3))___" 851s """, 851s ), 851s 0.5, 851s "___4___", 851s ], 851s ], 851s ids=[ 851s "command_level_sleep_shortform", 851s "command_level_pane_sleep_longform", 851s "pane_sleep_shortform", 851s "pane_sleep_longform", 851s "shell_before_before_command_level", 851s ], 851s ) 851s @pytest.mark.flaky(reruns=3) 851s def test_load_workspace_sleep( 851s tmp_path: pathlib.Path, 851s server: Server, 851s monkeypatch: pytest.MonkeyPatch, 851s yaml: str, 851s sleep: int, 851s output: str, 851s ) -> None: 851s """Test sleep commands in tmuxp configuration.""" 851s yaml_workspace = tmp_path / "simple.yaml" 851s yaml_workspace.write_text(yaml, encoding="utf-8") 851s workspace = ConfigReader._from_file(yaml_workspace) 851s workspace = loader.expand(workspace) 851s workspace = loader.trickle(workspace) 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s 851s start_time = time.process_time() 851s 851s > builder.build() 851s 851s tests/workspace/test_builder.py:1365: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testqbrsj3z_) 851s session_name = 'Should not execute', kill_session = False, attach = False 851s start_directory = None, window_name = None, window_command = None, x = 800 851s y = 600, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-sShould not execute', '-d', '-x', 800, ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _______________ test_load_workspace_sleep[pane_sleep_shortform] ________________ 851s 851s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_pane3') 851s server = Server(socket_name=libtmux_test9pt3qcld) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf66e9708> 851s yaml = '\nsession_name: Should not execute\nwindows:\n- panes:\n - shell_command:\n - cmd: echo "___$((1 + 3))___"\n sleep_before: .5\n' 851s sleep = 0.5, output = '___4___' 851s 851s @pytest.mark.parametrize( 851s "yaml,sleep,output", 851s [ 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 5))___" 851s sleep_before: .15 851s - cmd: echo "___$((1 + 3))___" 851s sleep_before: .35 851s """, 851s ), 851s 0.5, 851s "___4___", 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 5))___" 851s sleep_before: 1 851s - cmd: echo "___$((1 + 3))___" 851s sleep_before: .25 851s """, 851s ), 851s 1.25, 851s "___4___", 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s sleep_before: .5 851s """, 851s ), 851s 0.5, 851s "___4___", 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s sleep_before: 1 851s """, 851s ), 851s 1, 851s "___4___", 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s shell_command_before: 851s - cmd: echo "sleeping before" 851s sleep_before: .5 851s windows: 851s - panes: 851s - echo "___$((1 + 3))___" 851s """, 851s ), 851s 0.5, 851s "___4___", 851s ], 851s ], 851s ids=[ 851s "command_level_sleep_shortform", 851s "command_level_pane_sleep_longform", 851s "pane_sleep_shortform", 851s "pane_sleep_longform", 851s "shell_before_before_command_level", 851s ], 851s ) 851s @pytest.mark.flaky(reruns=3) 851s def test_load_workspace_sleep( 851s tmp_path: pathlib.Path, 851s server: Server, 851s monkeypatch: pytest.MonkeyPatch, 851s yaml: str, 851s sleep: int, 851s output: str, 851s ) -> None: 851s """Test sleep commands in tmuxp configuration.""" 851s yaml_workspace = tmp_path / "simple.yaml" 851s yaml_workspace.write_text(yaml, encoding="utf-8") 851s workspace = ConfigReader._from_file(yaml_workspace) 851s workspace = loader.expand(workspace) 851s workspace = loader.trickle(workspace) 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s 851s start_time = time.process_time() 851s 851s > builder.build() 851s 851s tests/workspace/test_builder.py:1365: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test9pt3qcld) 851s session_name = 'Should not execute', kill_session = False, attach = False 851s start_directory = None, window_name = None, window_command = None, x = 800 851s y = 600, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-sShould not execute', '-d', '-x', 800, ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ________________ test_load_workspace_sleep[pane_sleep_longform] ________________ 851s 851s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_pane7') 851s server = Server(socket_name=libtmux_testj20qtlhz) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf67655d0> 851s yaml = '\nsession_name: Should not execute\nwindows:\n- panes:\n - shell_command:\n - cmd: echo "___$((1 + 3))___"\n sleep_before: 1\n' 851s sleep = 1, output = '___4___' 851s 851s @pytest.mark.parametrize( 851s "yaml,sleep,output", 851s [ 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 5))___" 851s sleep_before: .15 851s - cmd: echo "___$((1 + 3))___" 851s sleep_before: .35 851s """, 851s ), 851s 0.5, 851s "___4___", 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 5))___" 851s sleep_before: 1 851s - cmd: echo "___$((1 + 3))___" 851s sleep_before: .25 851s """, 851s ), 851s 1.25, 851s "___4___", 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s sleep_before: .5 851s """, 851s ), 851s 0.5, 851s "___4___", 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s sleep_before: 1 851s """, 851s ), 851s 1, 851s "___4___", 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s shell_command_before: 851s - cmd: echo "sleeping before" 851s sleep_before: .5 851s windows: 851s - panes: 851s - echo "___$((1 + 3))___" 851s """, 851s ), 851s 0.5, 851s "___4___", 851s ], 851s ], 851s ids=[ 851s "command_level_sleep_shortform", 851s "command_level_pane_sleep_longform", 851s "pane_sleep_shortform", 851s "pane_sleep_longform", 851s "shell_before_before_command_level", 851s ], 851s ) 851s @pytest.mark.flaky(reruns=3) 851s def test_load_workspace_sleep( 851s tmp_path: pathlib.Path, 851s server: Server, 851s monkeypatch: pytest.MonkeyPatch, 851s yaml: str, 851s sleep: int, 851s output: str, 851s ) -> None: 851s """Test sleep commands in tmuxp configuration.""" 851s yaml_workspace = tmp_path / "simple.yaml" 851s yaml_workspace.write_text(yaml, encoding="utf-8") 851s workspace = ConfigReader._from_file(yaml_workspace) 851s workspace = loader.expand(workspace) 851s workspace = loader.trickle(workspace) 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s 851s start_time = time.process_time() 851s 851s > builder.build() 851s 851s tests/workspace/test_builder.py:1365: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testj20qtlhz) 851s session_name = 'Should not execute', kill_session = False, attach = False 851s start_directory = None, window_name = None, window_command = None, x = 800 851s y = 600, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-sShould not execute', '-d', '-x', 800, ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s _________ test_load_workspace_sleep[shell_before_before_command_level] _________ 851s 851s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_shel3') 851s server = Server(socket_name=libtmux_test8m4qaxpr) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf68a3720> 851s yaml = '\nsession_name: Should not execute\nshell_command_before:\n - cmd: echo "sleeping before"\n sleep_before: .5\nwindows:\n- panes:\n - echo "___$((1 + 3))___"\n' 851s sleep = 0.5, output = '___4___' 851s 851s @pytest.mark.parametrize( 851s "yaml,sleep,output", 851s [ 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 5))___" 851s sleep_before: .15 851s - cmd: echo "___$((1 + 3))___" 851s sleep_before: .35 851s """, 851s ), 851s 0.5, 851s "___4___", 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 5))___" 851s sleep_before: 1 851s - cmd: echo "___$((1 + 3))___" 851s sleep_before: .25 851s """, 851s ), 851s 1.25, 851s "___4___", 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s sleep_before: .5 851s """, 851s ), 851s 0.5, 851s "___4___", 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s windows: 851s - panes: 851s - shell_command: 851s - cmd: echo "___$((1 + 3))___" 851s sleep_before: 1 851s """, 851s ), 851s 1, 851s "___4___", 851s ], 851s [ 851s textwrap.dedent( 851s """ 851s session_name: Should not execute 851s shell_command_before: 851s - cmd: echo "sleeping before" 851s sleep_before: .5 851s windows: 851s - panes: 851s - echo "___$((1 + 3))___" 851s """, 851s ), 851s 0.5, 851s "___4___", 851s ], 851s ], 851s ids=[ 851s "command_level_sleep_shortform", 851s "command_level_pane_sleep_longform", 851s "pane_sleep_shortform", 851s "pane_sleep_longform", 851s "shell_before_before_command_level", 851s ], 851s ) 851s @pytest.mark.flaky(reruns=3) 851s def test_load_workspace_sleep( 851s tmp_path: pathlib.Path, 851s server: Server, 851s monkeypatch: pytest.MonkeyPatch, 851s yaml: str, 851s sleep: int, 851s output: str, 851s ) -> None: 851s """Test sleep commands in tmuxp configuration.""" 851s yaml_workspace = tmp_path / "simple.yaml" 851s yaml_workspace.write_text(yaml, encoding="utf-8") 851s workspace = ConfigReader._from_file(yaml_workspace) 851s workspace = loader.expand(workspace) 851s workspace = loader.trickle(workspace) 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s 851s start_time = time.process_time() 851s 851s > builder.build() 851s 851s tests/workspace/test_builder.py:1365: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_test8m4qaxpr) 851s session_name = 'Should not execute', kill_session = False, attach = False 851s start_directory = None, window_name = None, window_command = None, x = 800 851s y = 600, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-sShould not execute', '-d', '-x', 800, ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s __________ test_issue_800_default_size_many_windows[default-behavior] __________ 851s 851s server = Server(socket_name=libtmux_testgjukzt_6) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf690f0f0> 851s test_id = 'default-behavior', TMUXP_DEFAULT_SIZE = None, raises = False 851s confoverrides = {} 851s 851s @pytest.mark.parametrize( 851s DefaultSizeNamespaceFixture._fields, 851s DEFAULT_SIZE_FIXTURES, 851s ids=[f.test_id for f in DEFAULT_SIZE_FIXTURES], 851s ) 851s @pytest.mark.skipif(has_lt_version("2.9"), reason="default-size only applies there") 851s def test_issue_800_default_size_many_windows( 851s server: "Server", 851s monkeypatch: pytest.MonkeyPatch, 851s test_id: str, 851s TMUXP_DEFAULT_SIZE: t.Optional[str], 851s raises: bool, 851s confoverrides: t.Dict[str, t.Any], 851s ) -> None: 851s """Recreate default-size issue. 851s 851s v1.13.1 added a default-size, but this can break building workspaces with 851s a lot of panes. 851s 851s See also: https://github.com/tmux-python/tmuxp/issues/800 851s """ 851s yaml_workspace = test_utils.get_workspace_file( 851s "regressions/issue_800_default_size_many_windows.yaml", 851s ) 851s 851s workspace = ConfigReader._from_file(yaml_workspace) 851s workspace = loader.expand(workspace) 851s workspace = loader.trickle(workspace) 851s 851s if isinstance(confoverrides, dict): 851s for k, v in confoverrides.items(): 851s workspace[k] = v 851s 851s if TMUXP_DEFAULT_SIZE is not None: 851s monkeypatch.setenv("TMUXP_DEFAULT_SIZE", TMUXP_DEFAULT_SIZE) 851s 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s 851s if raises: 851s with pytest.raises( 851s ( 851s LibTmuxException, 851s exc.TmuxpException, 851s exc.EmptyWorkspaceException, 851s ObjectDoesNotExist, 851s ), 851s ): 851s builder.build() 851s 851s assert builder is not None 851s assert builder.session is not None 851s assert isinstance(builder.session, Session) 851s assert callable(builder.session.kill) 851s builder.session.kill() 851s 851s with pytest.raises(libtmux.exc.LibTmuxException, match="no space for new pane"): 851s builder.build() 851s return 851s 851s > builder.build() 851s 851s tests/workspace/test_builder.py:1553: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testgjukzt_6) 851s session_name = 'many-windows-issue', kill_session = False, attach = False 851s start_directory = None, window_name = None, window_command = None, x = 800 851s y = 600, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-smany-windows-issue', '-d', '-x', 800, ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s ____ test_issue_800_default_size_many_windows[v1.13.1 default-size-breaks] _____ 851s 851s server = Server(socket_name=libtmux_testy7_ln8ot) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf68919c0> 851s test_id = 'v1.13.1 default-size-breaks', TMUXP_DEFAULT_SIZE = None 851s raises = True, confoverrides = {'options': {'default-size': '80x24'}} 851s 851s @pytest.mark.parametrize( 851s DefaultSizeNamespaceFixture._fields, 851s DEFAULT_SIZE_FIXTURES, 851s ids=[f.test_id for f in DEFAULT_SIZE_FIXTURES], 851s ) 851s @pytest.mark.skipif(has_lt_version("2.9"), reason="default-size only applies there") 851s def test_issue_800_default_size_many_windows( 851s server: "Server", 851s monkeypatch: pytest.MonkeyPatch, 851s test_id: str, 851s TMUXP_DEFAULT_SIZE: t.Optional[str], 851s raises: bool, 851s confoverrides: t.Dict[str, t.Any], 851s ) -> None: 851s """Recreate default-size issue. 851s 851s v1.13.1 added a default-size, but this can break building workspaces with 851s a lot of panes. 851s 851s See also: https://github.com/tmux-python/tmuxp/issues/800 851s """ 851s yaml_workspace = test_utils.get_workspace_file( 851s "regressions/issue_800_default_size_many_windows.yaml", 851s ) 851s 851s workspace = ConfigReader._from_file(yaml_workspace) 851s workspace = loader.expand(workspace) 851s workspace = loader.trickle(workspace) 851s 851s if isinstance(confoverrides, dict): 851s for k, v in confoverrides.items(): 851s workspace[k] = v 851s 851s if TMUXP_DEFAULT_SIZE is not None: 851s monkeypatch.setenv("TMUXP_DEFAULT_SIZE", TMUXP_DEFAULT_SIZE) 851s 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s 851s if raises: 851s with pytest.raises( 851s ( 851s LibTmuxException, 851s exc.TmuxpException, 851s exc.EmptyWorkspaceException, 851s ObjectDoesNotExist, 851s ), 851s ): 851s builder.build() 851s 851s assert builder is not None 851s > assert builder.session is not None 851s 851s tests/workspace/test_builder.py:1544: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = 851s 851s @property 851s def session(self) -> Session: 851s """Return tmux session using in workspace builder session.""" 851s > if self._session is None: 851s E AttributeError: 'WorkspaceBuilder' object has no attribute '_session'. Did you mean: 'session'? 851s 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:186: AttributeError 851s _____ test_issue_800_default_size_many_windows[v1.13.1-option-workaround] ______ 851s 851s server = Server(socket_name=libtmux_testo8qa0srh) 851s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf66e9390> 851s test_id = 'v1.13.1-option-workaround', TMUXP_DEFAULT_SIZE = None, raises = False 851s confoverrides = {'options': {'default-size': '800x600'}} 851s 851s @pytest.mark.parametrize( 851s DefaultSizeNamespaceFixture._fields, 851s DEFAULT_SIZE_FIXTURES, 851s ids=[f.test_id for f in DEFAULT_SIZE_FIXTURES], 851s ) 851s @pytest.mark.skipif(has_lt_version("2.9"), reason="default-size only applies there") 851s def test_issue_800_default_size_many_windows( 851s server: "Server", 851s monkeypatch: pytest.MonkeyPatch, 851s test_id: str, 851s TMUXP_DEFAULT_SIZE: t.Optional[str], 851s raises: bool, 851s confoverrides: t.Dict[str, t.Any], 851s ) -> None: 851s """Recreate default-size issue. 851s 851s v1.13.1 added a default-size, but this can break building workspaces with 851s a lot of panes. 851s 851s See also: https://github.com/tmux-python/tmuxp/issues/800 851s """ 851s yaml_workspace = test_utils.get_workspace_file( 851s "regressions/issue_800_default_size_many_windows.yaml", 851s ) 851s 851s workspace = ConfigReader._from_file(yaml_workspace) 851s workspace = loader.expand(workspace) 851s workspace = loader.trickle(workspace) 851s 851s if isinstance(confoverrides, dict): 851s for k, v in confoverrides.items(): 851s workspace[k] = v 851s 851s if TMUXP_DEFAULT_SIZE is not None: 851s monkeypatch.setenv("TMUXP_DEFAULT_SIZE", TMUXP_DEFAULT_SIZE) 851s 851s builder = WorkspaceBuilder(session_config=workspace, server=server) 851s 851s if raises: 851s with pytest.raises( 851s ( 851s LibTmuxException, 851s exc.TmuxpException, 851s exc.EmptyWorkspaceException, 851s ObjectDoesNotExist, 851s ), 851s ): 851s builder.build() 851s 851s assert builder is not None 851s assert builder.session is not None 851s assert isinstance(builder.session, Session) 851s assert callable(builder.session.kill) 851s builder.session.kill() 851s 851s with pytest.raises(libtmux.exc.LibTmuxException, match="no space for new pane"): 851s builder.build() 851s return 851s 851s > builder.build() 851s 851s tests/workspace/test_builder.py:1553: 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s /usr/lib/python3/dist-packages/tmuxp/workspace/builder.py:235: in build 851s session = self.server.new_session( 851s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 851s 851s self = Server(socket_name=libtmux_testo8qa0srh) 851s session_name = 'many-windows-issue', kill_session = False, attach = False 851s start_directory = None, window_name = None, window_command = None, x = 800 851s y = 600, environment = None, args = (), kwargs = {}, env = None 851s tmux_args = ('-P', '-F#{session_id}', '-smany-windows-issue', '-d', '-x', 800, ...) 851s proc = 851s 851s def new_session( 851s self, 851s session_name: t.Optional[str] = None, 851s kill_session: bool = False, 851s attach: bool = False, 851s start_directory: t.Optional[str] = None, 851s window_name: t.Optional[str] = None, 851s window_command: t.Optional[str] = None, 851s x: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s y: t.Optional[t.Union[int, "DashLiteral"]] = None, 851s environment: t.Optional[t.Dict[str, str]] = None, 851s *args: t.Any, 851s **kwargs: t.Any, 851s ) -> Session: 851s """Create new session, returns new :class:`Session`. 851s 851s Uses ``-P`` flag to print session info, ``-F`` for return formatting 851s returns new Session object. 851s 851s ``$ tmux new-session -d`` will create the session in the background 851s ``$ tmux new-session -Ad`` will move to the session name if it already 851s exists. todo: make an option to handle this. 851s 851s Parameters 851s ---------- 851s session_name : str, optional 851s :: 851s 851s $ tmux new-session -s 851s attach : bool, optional 851s create session in the foreground. ``attach=False`` is equivalent 851s to:: 851s 851s $ tmux new-session -d 851s 851s Other Parameters 851s ---------------- 851s kill_session : bool, optional 851s Kill current session if ``$ tmux has-session``. 851s Useful for testing workspaces. 851s start_directory : str, optional 851s specifies the working directory in which the 851s new session is created. 851s window_name : str, optional 851s :: 851s 851s $ tmux new-session -n 851s window_command : str, optional 851s execute a command on starting the session. The window will close 851s when the command exits. NOTE: When this command exits the window 851s will close. This feature is useful for long-running processes 851s where the closing of the window upon completion is desired. 851s x : [int, str], optional 851s Force the specified width instead of the tmux default for a 851s detached session 851s y : [int, str], optional 851s Force the specified height instead of the tmux default for a 851s detached session 851s 851s Returns 851s ------- 851s :class:`Session` 851s 851s Raises 851s ------ 851s :exc:`exc.BadSessionName` 851s 851s Examples 851s -------- 851s Sessions can be created without a session name (0.14.2+): 851s 851s >>> server.new_session() 851s Session($2 2) 851s 851s Creating them in succession will enumerate IDs (via tmux): 851s 851s >>> server.new_session() 851s Session($3 3) 851s 851s With a `session_name`: 851s 851s >>> server.new_session(session_name='my session') 851s Session($4 my session) 851s """ 851s if session_name is not None: 851s session_check_name(session_name) 851s 851s if self.has_session(session_name): 851s if kill_session: 851s self.cmd("kill-session", "-t%s" % session_name) 851s logger.info("session %s exists. killed it." % session_name) 851s else: 851s raise exc.TmuxSessionExists( 851s "Session named %s exists" % session_name, 851s ) 851s 851s logger.debug(f"creating session {session_name}") 851s 851s env = os.environ.get("TMUX") 851s 851s if env: 851s del os.environ["TMUX"] 851s 851s tmux_args: t.Tuple[t.Union[str, int], ...] = ( 851s "-P", 851s "-F#{session_id}", # output 851s ) 851s 851s if session_name is not None: 851s tmux_args += (f"-s{session_name}",) 851s 851s if not attach: 851s tmux_args += ("-d",) 851s 851s if start_directory: 851s tmux_args += ("-c", start_directory) 851s 851s if window_name: 851s tmux_args += ("-n", window_name) 851s 851s if x is not None: 851s tmux_args += ("-x", x) 851s 851s if y is not None: 851s tmux_args += ("-y", y) 851s 851s if window_command: 851s tmux_args += (window_command,) 851s 851s if environment: 851s if has_gte_version("3.2"): 851s for k, v in environment.items(): 851s tmux_args += (f"-e{k}={v}",) 851s else: 851s logger.warning( 851s "Environment flag ignored, tmux 3.2 or newer required.", 851s ) 851s 851s proc = self.cmd("new-session", *tmux_args) 851s 851s if proc.stderr: 851s > raise exc.LibTmuxException(proc.stderr) 851s E libtmux.exc.LibTmuxException: ['server exited unexpectedly'] 851s 851s /usr/lib/python3/dist-packages/libtmux/server.py:500: LibTmuxException 851s =============================== warnings summary =============================== 851s tests/fixtures/utils.py:25 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/utils.py:25: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/import_teamocil/layouts.yaml' mode='r' encoding='UTF-8'> 851s return get_workspace_file(_file).open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/fixtures/utils.py:25 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/utils.py:25: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/import_teamocil/test1.yaml' mode='r' encoding='UTF-8'> 851s return get_workspace_file(_file).open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/fixtures/utils.py:25 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/utils.py:25: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/import_teamocil/test2.yaml' mode='r' encoding='UTF-8'> 851s return get_workspace_file(_file).open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/fixtures/utils.py:25 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/utils.py:25: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/import_teamocil/test3.yaml' mode='r' encoding='UTF-8'> 851s return get_workspace_file(_file).open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/fixtures/utils.py:25 851s tests/cli/test_import.py::test_import_teamocil[cli_args0-inputs0] 851s tests/cli/test_import.py::test_import_teamocil[cli_args1-inputs1] 851s tests/cli/test_import.py::test_import_teamocil[cli_args2-inputs2] 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/utils.py:25: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/import_teamocil/test4.yaml' mode='r' encoding='UTF-8'> 851s return get_workspace_file(_file).open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/fixtures/utils.py:25 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/utils.py:25: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/import_tmuxinator/test1.yaml' mode='r' encoding='UTF-8'> 851s return get_workspace_file(_file).open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/fixtures/utils.py:25 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/utils.py:25: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/import_tmuxinator/test2.yaml' mode='r' encoding='UTF-8'> 851s return get_workspace_file(_file).open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/fixtures/utils.py:25 851s tests/cli/test_import.py::test_import_tmuxinator[cli_args0-inputs0] 851s tests/cli/test_import.py::test_import_tmuxinator[cli_args1-inputs1] 851s tests/cli/test_import.py::test_import_tmuxinator[cli_args2-inputs2] 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/utils.py:25: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/import_tmuxinator/test3.yaml' mode='r' encoding='UTF-8'> 851s return get_workspace_file(_file).open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_cli.py::test_reattach_plugins 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/utils.py:25: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/plugin_r.yaml' mode='r' encoding='UTF-8'> 851s return get_workspace_file(_file).open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_convert.py::test_convert[cli_args0] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_convert_cli_args0_0/.tmuxp.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_convert.py::test_convert[cli_args0] 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/cli/test_convert.py:52: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_convert_cli_args0_0/.tmuxp.json' mode='r' encoding='UTF-8'> 851s assert tmuxp_json.open().read() == json.dumps({"session_name": "hello"}, indent=2) 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_convert.py::test_convert[cli_args1] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_convert_cli_args1_0/.tmuxp.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_convert.py::test_convert[cli_args1] 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/cli/test_convert.py:52: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_convert_cli_args1_0/.tmuxp.json' mode='r' encoding='UTF-8'> 851s assert tmuxp_json.open().read() == json.dumps({"session_name": "hello"}, indent=2) 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_convert.py::test_convert[cli_args2] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_convert_cli_args2_0/.tmuxp.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_convert.py::test_convert[cli_args2] 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/cli/test_convert.py:52: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_convert_cli_args2_0/.tmuxp.json' mode='r' encoding='UTF-8'> 851s assert tmuxp_json.open().read() == json.dumps({"session_name": "hello"}, indent=2) 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_convert.py::test_convert[cli_args3] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_convert_cli_args3_0/.tmuxp.yml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_convert.py::test_convert[cli_args3] 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/cli/test_convert.py:52: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_convert_cli_args3_0/.tmuxp.json' mode='r' encoding='UTF-8'> 851s assert tmuxp_json.open().read() == json.dumps({"session_name": "hello"}, indent=2) 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_convert.py::test_convert[cli_args4] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_convert_cli_args4_0/.tmuxp.yml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_convert.py::test_convert[cli_args4] 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/cli/test_convert.py:52: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_convert_cli_args4_0/.tmuxp.json' mode='r' encoding='UTF-8'> 851s assert tmuxp_json.open().read() == json.dumps({"session_name": "hello"}, indent=2) 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_convert.py::test_convert_json[cli_args0] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_convert_json_cli_args0_0/.tmuxp.json' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_convert.py::test_convert_json[cli_args0] 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/cli/test_convert.py:87: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_convert_json_cli_args0_0/.tmuxp.yaml' mode='r' encoding='UTF-8'> 851s assert tmuxp_yaml.open().read() == "session_name: hello\n" 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_convert.py::test_convert_json[cli_args1] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_convert_json_cli_args1_0/.tmuxp.json' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_convert.py::test_convert_json[cli_args1] 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/cli/test_convert.py:87: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_convert_json_cli_args1_0/.tmuxp.yaml' mode='r' encoding='UTF-8'> 851s assert tmuxp_yaml.open().read() == "session_name: hello\n" 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_convert.py::test_convert_json[cli_args2] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_convert_json_cli_args2_0/.tmuxp.json' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_convert.py::test_convert_json[cli_args2] 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/cli/test_convert.py:87: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_convert_json_cli_args2_0/.tmuxp.yaml' mode='r' encoding='UTF-8'> 851s assert tmuxp_yaml.open().read() == "session_name: hello\n" 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_import.py::test_import_teamocil[cli_args0-inputs0] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_import_teamocil_cli_args00/.teamocil/config.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_import.py::test_import_teamocil[cli_args1-inputs1] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_import_teamocil_cli_args10/.teamocil/config.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_import.py::test_import_teamocil[cli_args2-inputs2] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_import_teamocil_cli_args20/.teamocil/config.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_import.py::test_import_tmuxinator[cli_args0-inputs0] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_import_tmuxinator_cli_arg0/.tmuxinator/config.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_import.py::test_import_tmuxinator[cli_args1-inputs1] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_import_tmuxinator_cli_arg1/.tmuxinator/config.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_import.py::test_import_tmuxinator[cli_args2-inputs2] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_import_tmuxinator_cli_arg2/.tmuxinator/config.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_load.py::test_load_workspace 851s tests/cli/test_load.py::test_load_workspace_passes_tmux_config 851s tests/cli/test_load.py::test_load_workspace_named_session 851s tests/cli/test_load.py::test_load_workspace_name_match_regression_252 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/two_pane.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_load.py::test_load_symlinked_workspace 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_symlinked_workspace0/symlinktemp/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_load.py::test_load_log_file[cli_args0] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_log_file_cli_args0_0/.tmuxp.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_load.py::test_load_log_file[cli_args0] 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/cli/test_load.py:451: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_log_file_cli_args0_0/log.txt' mode='r' encoding='UTF-8'> 851s assert "Loading" in log_file_path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_load.py::test_load_plugins 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/utils.py:25: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/plugin_bwb.yaml' mode='r' encoding='UTF-8'> 851s return get_workspace_file(_file).open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_load.py::test_load_plugins_version_fail_no_skip[cli_args0-inputs0] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/plugin_versions_fail.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_load.py::test_load_plugins_plugin_missing[cli_args0] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/plugin_missing_fail.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_load.py::test_plugin_system_before_script 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/plugin_bs.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/cli/test_load.py::test_load_attached 851s tests/cli/test_load.py::test_load_attached_detached 851s tests/cli/test_load.py::test_load_attached_within_tmux 851s tests/cli/test_load.py::test_load_attached_within_tmux_detached 851s tests/cli/test_load.py::test_load_append_windows_to_current_session 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/utils.py:25: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/two_pane.yaml' mode='r' encoding='UTF-8'> 851s return get_workspace_file(_file).open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/test_util.py::test_run_before_script_raise_BeforeLoadScriptError_if_retcode 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/test_util.py:27: ResourceWarning: unclosed file <_io.BufferedReader name=12> 851s with pytest.raises(BeforeLoadScriptError): 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/test_util.py::test_return_stdout_if_ok 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/test_util.py:35: ResourceWarning: unclosed file <_io.BufferedReader name=12> 851s run_before_script(script_file) 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/test_util.py::test_return_stdout_if_ok 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/test_util.py:35: ResourceWarning: unclosed file <_io.BufferedReader name=14> 851s run_before_script(script_file) 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/test_util.py::test_get_session_should_default_to_local_attached_session 851s /usr/lib/python3.12/subprocess.py:1021: ResourceWarning: unclosed file <_io.FileIO name=12 mode='rb' closefd=True> 851s self.stderr = io.open(errread, 'rb', bufsize) 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/test_util.py::test_get_session_should_default_to_local_attached_session 851s /usr/lib/python3.12/subprocess.py:1021: ResourceWarning: unclosed file <_io.FileIO name=13 mode='rb' closefd=True> 851s self.stderr = io.open(errread, 'rb', bufsize) 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_automatic_rename_option 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/window_automatic_rename.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_start_directory_sets_session_path 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/start_directory_session_path.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_before_script_throw_error_if_retcode_error 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/utils.py:25: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/config_script_fails.yaml' mode='r' encoding='UTF-8'> 851s return get_workspace_file(_file).open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_before_script_throw_error_if_file_not_exists 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/utils.py:25: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/config_script_not_exists.yaml' mode='r' encoding='UTF-8'> 851s return get_workspace_file(_file).open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_before_script_true_if_test_passes 851s tests/workspace/test_builder.py::test_before_script_true_if_test_passes_with_args 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/utils.py:25: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/config_script_completes.yaml' mode='r' encoding='UTF-8'> 851s return get_workspace_file(_file).open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_configs_same_session 851s tests/workspace/test_builder.py::test_load_configs_separate_sessions 851s tests/workspace/test_builder.py::test_find_current_active_pane 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/builder/three_windows.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_enter[pane_enter_false_shortform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_enter_pane0/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_enter[pane_enter_false_longform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_enter_pane1/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_enter[pane_enter_default_shortform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_enter_pane2/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_enter[pane_enter_default_longform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_enter_pane3/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_enter[pane_command_enter_false_shortform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_enter_pane4/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_enter[pane_command_enter_false_longform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_enter_pane5/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_enter[pane_command_enter_default_shortform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_enter_pane6/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_enter[pane_command_enter_default_longform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_enter_pane7/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_sleep[command_level_sleep_shortform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_comm0/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_sleep[command_level_sleep_shortform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_comm1/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_sleep[command_level_sleep_shortform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_comm2/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_sleep[command_level_sleep_shortform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_comm3/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_sleep[command_level_pane_sleep_longform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_comm4/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_sleep[command_level_pane_sleep_longform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_comm5/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_sleep[command_level_pane_sleep_longform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_comm6/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_sleep[command_level_pane_sleep_longform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_comm7/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_sleep[pane_sleep_shortform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_pane0/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_sleep[pane_sleep_shortform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_pane1/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_sleep[pane_sleep_shortform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_pane2/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_sleep[pane_sleep_shortform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_pane3/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_sleep[pane_sleep_longform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_pane4/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_sleep[pane_sleep_longform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_pane5/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_sleep[pane_sleep_longform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_pane6/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_sleep[pane_sleep_longform] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_pane7/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_sleep[shell_before_before_command_level] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_shel0/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_sleep[shell_before_before_command_level] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_shel1/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_sleep[shell_before_before_command_level] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_shel2/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_load_workspace_sleep[shell_before_before_command_level] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_load_workspace_sleep_shel3/simple.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_builder.py::test_issue_800_default_size_many_windows[default-behavior] 851s tests/workspace/test_builder.py::test_issue_800_default_size_many_windows[v1.13.1 default-size-breaks] 851s tests/workspace/test_builder.py::test_issue_800_default_size_many_windows[v1.13.1-option-workaround] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/regressions/issue_800_default_size_many_windows.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_config.py::test_export_json 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/utils.py:25: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/shell_command_before_session.yaml' mode='r' encoding='UTF-8'> 851s return get_workspace_file(_file).open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_config.py::test_export_json 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/utils.py:25: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/shell_command_before_session-expected.yaml' mode='r' encoding='UTF-8'> 851s return get_workspace_file(_file).open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_config.py::test_export_json 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_export_json0/config.json' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_config.py::test_workspace_expand2 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/utils.py:25: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/expand2-unexpanded.yaml' mode='r' encoding='UTF-8'> 851s return get_workspace_file(_file).open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_config.py::test_workspace_expand2 851s /tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/utils.py:25: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/workspace/expand2-expanded.yaml' mode='r' encoding='UTF-8'> 851s return get_workspace_file(_file).open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_config.py::test_expands_blank_panes 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/examples/blank-panes.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_freezer.py::test_export_yaml 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-ubuntu/pytest-0/test_export_yaml0/config.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s tests/workspace/test_import_teamocil.py::test_multisession_config[two-windows-expected0] 851s /usr/lib/python3/dist-packages/tmuxp/_internal/config_reader.py:107: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/autopkgtest.l5XFVd/autopkgtest_tmp/tests/fixtures/import_teamocil/layouts.yaml' mode='r' encoding='UTF-8'> 851s content = path.open().read() 851s Enable tracemalloc to get traceback where the object was allocated. 851s See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. 851s 851s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 851s =========================== short test summary info ============================ 851s FAILED tests/cli/test_cli.py::test_reattach_plugins - libtmux.exc.LibTmuxExce... 851s FAILED tests/cli/test_freeze.py::test_freeze[cli_args0-inputs0] - libtmux.exc... 851s FAILED tests/cli/test_freeze.py::test_freeze[cli_args1-inputs1] - libtmux.exc... 851s FAILED tests/cli/test_freeze.py::test_freeze[cli_args2-inputs2] - libtmux.exc... 851s FAILED tests/cli/test_freeze.py::test_freeze[cli_args3-inputs3] - libtmux.exc... 851s FAILED tests/cli/test_freeze.py::test_freeze_overwrite[cli_args0-inputs0] - l... 851s FAILED tests/cli/test_freeze.py::test_freeze_overwrite[cli_args1-inputs1] - l... 851s FAILED tests/cli/test_load.py::test_load_workspace - libtmux.exc.LibTmuxExcep... 851s FAILED tests/cli/test_load.py::test_load_workspace_passes_tmux_config - libtm... 851s FAILED tests/cli/test_load.py::test_load_workspace_named_session - libtmux.ex... 851s FAILED tests/cli/test_load.py::test_load_workspace_name_match_regression_252 851s FAILED tests/cli/test_load.py::test_load_symlinked_workspace - libtmux.exc.Li... 851s FAILED tests/cli/test_load.py::test_plugin_system_before_script - libtmux.exc... 851s FAILED tests/cli/test_load.py::test_load_attached - libtmux.exc.LibTmuxExcept... 851s FAILED tests/cli/test_load.py::test_load_attached_detached - libtmux.exc.LibT... 851s FAILED tests/cli/test_load.py::test_load_attached_within_tmux - libtmux.exc.L... 851s FAILED tests/cli/test_load.py::test_load_attached_within_tmux_detached - libt... 852s FAILED tests/cli/test_load.py::test_load_append_windows_to_current_session - ... 852s FAILED tests/test_util.py::test_get_session_should_default_to_local_attached_session 852s FAILED tests/test_util.py::test_get_session_should_return_first_session_if_no_active_session 852s FAILED tests/tests/test_helpers.py::test_temp_session_kills_session_on_exit 852s FAILED tests/tests/test_helpers.py::test_temp_session_if_session_killed_before_exit 852s FAILED tests/workspace/test_builder.py::test_automatic_rename_option - libtmu... 852s FAILED tests/workspace/test_builder.py::test_start_directory_sets_session_path 852s FAILED tests/workspace/test_builder.py::test_before_script_throw_error_if_retcode_error 852s FAILED tests/workspace/test_builder.py::test_before_script_throw_error_if_file_not_exists 852s FAILED tests/workspace/test_builder.py::test_before_script_true_if_test_passes 852s FAILED tests/workspace/test_builder.py::test_before_script_true_if_test_passes_with_args 852s FAILED tests/workspace/test_builder.py::test_load_configs_same_session - libt... 852s FAILED tests/workspace/test_builder.py::test_load_configs_separate_sessions 852s FAILED tests/workspace/test_builder.py::test_find_current_active_pane - libtm... 852s FAILED tests/workspace/test_builder.py::test_load_workspace_enter[pane_enter_false_shortform] 852s FAILED tests/workspace/test_builder.py::test_load_workspace_enter[pane_enter_false_longform] 852s FAILED tests/workspace/test_builder.py::test_load_workspace_enter[pane_enter_default_shortform] 852s FAILED tests/workspace/test_builder.py::test_load_workspace_enter[pane_enter_default_longform] 852s FAILED tests/workspace/test_builder.py::test_load_workspace_enter[pane_command_enter_false_shortform] 852s FAILED tests/workspace/test_builder.py::test_load_workspace_enter[pane_command_enter_false_longform] 852s FAILED tests/workspace/test_builder.py::test_load_workspace_enter[pane_command_enter_default_shortform] 852s FAILED tests/workspace/test_builder.py::test_load_workspace_enter[pane_command_enter_default_longform] 852s FAILED tests/workspace/test_builder.py::test_load_workspace_sleep[command_level_sleep_shortform] 852s FAILED tests/workspace/test_builder.py::test_load_workspace_sleep[command_level_pane_sleep_longform] 852s FAILED tests/workspace/test_builder.py::test_load_workspace_sleep[pane_sleep_shortform] 852s FAILED tests/workspace/test_builder.py::test_load_workspace_sleep[pane_sleep_longform] 852s FAILED tests/workspace/test_builder.py::test_load_workspace_sleep[shell_before_before_command_level] 852s FAILED tests/workspace/test_builder.py::test_issue_800_default_size_many_windows[default-behavior] 852s FAILED tests/workspace/test_builder.py::test_issue_800_default_size_many_windows[v1.13.1 default-size-breaks] 852s FAILED tests/workspace/test_builder.py::test_issue_800_default_size_many_windows[v1.13.1-option-workaround] 852s ERROR tests/cli/test_load.py::test_load[dir-relative-dot-samedir] - libtmux.e... 852s ERROR tests/cli/test_load.py::test_load[dir-relative-dot-slash-samedir] - lib... 852s ERROR tests/cli/test_load.py::test_load[dir-relative-file-samedir] - libtmux.... 852s ERROR tests/cli/test_load.py::test_load[filename-relative-file-samedir] - lib... 852s ERROR tests/cli/test_load.py::test_load[configdir-session-name] - libtmux.exc... 852s ERROR tests/cli/test_load.py::test_load[configdir-absolute] - libtmux.exc.Lib... 852s ERROR tests/cli/test_load.py::test_load[configdir-session-name-double] - libt... 852s ERROR tests/cli/test_load.py::test_regression_00132_session_name_with_dots - ... 852s ERROR tests/cli/test_shell.py::test_shell[print-socket-name-cli_cmd0] - libtm... 852s ERROR tests/cli/test_shell.py::test_shell[print-socket-name-cli_cmd1] - libtm... 852s ERROR tests/cli/test_shell.py::test_shell[print-session-name-cli_cmd0] - libt... 852s ERROR tests/cli/test_shell.py::test_shell[print-session-name-cli_cmd1] - libt... 852s ERROR tests/cli/test_shell.py::test_shell[print-has-session-cli_cmd0] - libtm... 852s ERROR tests/cli/test_shell.py::test_shell[print-has-session-cli_cmd1] - libtm... 852s ERROR tests/cli/test_shell.py::test_shell[print-window-name-cli_cmd0] - libtm... 852s ERROR tests/cli/test_shell.py::test_shell[print-window-name-cli_cmd1] - libtm... 852s ERROR tests/cli/test_shell.py::test_shell[print-pane-id-cli_cmd0] - libtmux.e... 852s ERROR tests/cli/test_shell.py::test_shell[print-pane-id-cli_cmd1] - libtmux.e... 852s ERROR tests/cli/test_shell.py::test_shell[print-pane-id-obeys-tmux-pane-env-var-cli_cmd0] 852s ERROR tests/cli/test_shell.py::test_shell[print-pane-id-obeys-tmux-pane-env-var-cli_cmd1] 852s ERROR tests/cli/test_shell.py::test_shell_target_missing[cli_args0-inputs0-env0-template_ctx0-CalledProcessError-.*DoesNotExist.*-cli_cmd0] 852s ERROR tests/cli/test_shell.py::test_shell_target_missing[cli_args0-inputs0-env0-template_ctx0-CalledProcessError-.*DoesNotExist.*-cli_cmd1] 852s ERROR tests/cli/test_shell.py::test_shell_target_missing[cli_args1-inputs1-env1-template_ctx1-TmuxpException-Session not found: nonexistent_session-cli_cmd0] 852s ERROR tests/cli/test_shell.py::test_shell_target_missing[cli_args1-inputs1-env1-template_ctx1-TmuxpException-Session not found: nonexistent_session-cli_cmd1] 852s ERROR tests/cli/test_shell.py::test_shell_target_missing[cli_args2-inputs2-env2-template_ctx2-TmuxpException-Window not found: {WINDOW_NAME}-cli_cmd0] 852s ERROR tests/cli/test_shell.py::test_shell_target_missing[cli_args2-inputs2-env2-template_ctx2-TmuxpException-Window not found: {WINDOW_NAME}-cli_cmd1] 852s ERROR tests/cli/test_shell.py::test_shell_interactive[cli_args0-inputs0-env0-(InteractiveConsole)-cli_cmd0] 852s ERROR tests/cli/test_shell.py::test_shell_interactive[cli_args1-inputs1-env1-(InteractiveConsole)-cli_cmd0] 852s ERROR tests/workspace/test_builder.py::test_split_windows - libtmux.exc.LibTm... 852s ERROR tests/workspace/test_builder.py::test_split_windows_three_pane - libtmu... 852s ERROR tests/workspace/test_builder.py::test_focus_pane_index - libtmux.exc.Li... 852s ERROR tests/workspace/test_builder.py::test_session_options - libtmux.exc.Lib... 852s ERROR tests/workspace/test_builder.py::test_global_options - libtmux.exc.LibT... 852s ERROR tests/workspace/test_builder.py::test_global_session_env_options - libt... 852s ERROR tests/workspace/test_builder.py::test_window_options - libtmux.exc.LibT... 852s ERROR tests/workspace/test_builder.py::test_window_options_after - libtmux.ex... 852s ERROR tests/workspace/test_builder.py::test_window_shell - libtmux.exc.LibTmu... 852s ERROR tests/workspace/test_builder.py::test_environment_variables - libtmux.e... 852s ERROR tests/workspace/test_builder.py::test_blank_pane_spawn - libtmux.exc.Li... 852s ERROR tests/workspace/test_builder.py::test_start_directory - libtmux.exc.Lib... 852s ERROR tests/workspace/test_builder.py::test_start_directory_relative - libtmu... 852s ERROR tests/workspace/test_builder.py::test_pane_order - libtmux.exc.LibTmuxE... 852s ERROR tests/workspace/test_builder.py::test_window_index - libtmux.exc.LibTmu... 852s ERROR tests/workspace/test_builder.py::test_plugin_system_before_workspace_builder 852s ERROR tests/workspace/test_builder.py::test_plugin_system_on_window_create - ... 852s ERROR tests/workspace/test_builder.py::test_plugin_system_after_window_finished 852s ERROR tests/workspace/test_builder.py::test_plugin_system_on_window_create_multiple_windows 852s ERROR tests/workspace/test_builder.py::test_plugin_system_after_window_finished_multiple_windows 852s ERROR tests/workspace/test_builder.py::test_plugin_system_multiple_plugins - ... 852s ERROR tests/workspace/test_builder.py::test_first_pane_start_directory - libt... 852s ERROR tests/workspace/test_builder.py::test_layout_main_horizontal - libtmux.... 852s ERROR tests/workspace/test_freezer.py::test_freeze_config - libtmux.exc.LibTm... 852s = 47 failed, 90 passed, 3 skipped, 2 deselected, 106 warnings, 52 errors, 25 rerun in 138.41s (0:02:18) = 852s autopkgtest [15:55:40]: test pytest: -----------------------] 857s pytest FAIL non-zero exit status 1 857s autopkgtest [15:55:45]: test pytest: - - - - - - - - - - results - - - - - - - - - - 861s autopkgtest [15:55:49]: @@@@@@@@@@@@@@@@@@@@ summary 861s pytest FAIL non-zero exit status 1