0s autopkgtest [09:18:31]: starting date and time: 2025-03-13 09:18:31+0000 0s autopkgtest [09:18:31]: git checkout: 325255d2 Merge branch 'pin-any-arch' into 'ubuntu/production' 0s autopkgtest [09:18:31]: host juju-7f2275-prod-proposed-migration-environment-9; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.xxu_x97t/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,keyserver.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,10.24.0.0/24,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com,radosgw.ps5.canonical.com\n" >> /etc/environment' --apt-pocket=proposed=src:poetry,src:dbus-fast,src:poetry-core --apt-upgrade poetry-plugin-export --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 '--env=ADT_TEST_TRIGGERS=poetry/2.1.1+dfsg-1 dbus-fast/2.39.3-1 poetry-core/2.1.1-1' -- lxd -r lxd-armhf-10.145.243.85 lxd-armhf-10.145.243.85:autopkgtest/ubuntu/plucky/armhf 20s autopkgtest [09:18:51]: testbed dpkg architecture: armhf 21s autopkgtest [09:18:52]: testbed apt version: 2.9.32ubuntu1 25s autopkgtest [09:18:56]: @@@@@@@@@@@@@@@@@@@@ test bed setup 27s autopkgtest [09:18:58]: testbed release detected to be: None 34s autopkgtest [09:19:05]: updating testbed package index (apt update) 36s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [110 kB] 36s Get:2 http://ftpmaster.internal/ubuntu plucky InRelease [249 kB] 37s Get:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease [110 kB] 37s Get:4 http://ftpmaster.internal/ubuntu plucky-security InRelease [110 kB] 37s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [429 kB] 37s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [44.2 kB] 37s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [11.5 kB] 37s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/main armhf Packages [59.9 kB] 37s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/universe armhf Packages [336 kB] 37s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse armhf Packages [1712 B] 37s Get:11 http://ftpmaster.internal/ubuntu plucky/universe Sources [21.0 MB] 37s Get:12 http://ftpmaster.internal/ubuntu plucky/main Sources [1399 kB] 37s Get:13 http://ftpmaster.internal/ubuntu plucky/main armhf Packages [1381 kB] 37s Get:14 http://ftpmaster.internal/ubuntu plucky/universe armhf Packages [15.4 MB] 41s Fetched 40.7 MB in 5s (7937 kB/s) 42s Reading package lists... 48s autopkgtest [09:19:19]: upgrading testbed (apt dist-upgrade and autopurge) 49s Reading package lists... 49s Building dependency tree... 49s Reading state information... 50s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 50s Starting 2 pkgProblemResolver with broken count: 0 50s Done 51s Entering ResolveByKeep 51s 51s Calculating upgrade... 52s The following packages will be upgraded: 52s gir1.2-glib-2.0 htop libglib2.0-0t64 libglib2.0-data python3-botocore 52s 5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 52s Need to get 8817 kB of archives. 52s After this operation, 228 kB of additional disk space will be used. 52s Get:1 http://ftpmaster.internal/ubuntu plucky/main armhf gir1.2-glib-2.0 armhf 2.84.0-1 [185 kB] 52s Get:2 http://ftpmaster.internal/ubuntu plucky/main armhf libglib2.0-0t64 armhf 2.84.0-1 [1454 kB] 52s Get:3 http://ftpmaster.internal/ubuntu plucky/main armhf libglib2.0-data all 2.84.0-1 [53.0 kB] 52s Get:4 http://ftpmaster.internal/ubuntu plucky/main armhf htop armhf 3.4.0-2 [143 kB] 52s Get:5 http://ftpmaster.internal/ubuntu plucky/main armhf python3-botocore all 1.37.9+repack-1 [6982 kB] 53s Fetched 8817 kB in 1s (10.4 MB/s) 53s (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 ... 64649 files and directories currently installed.) 53s Preparing to unpack .../gir1.2-glib-2.0_2.84.0-1_armhf.deb ... 53s Unpacking gir1.2-glib-2.0:armhf (2.84.0-1) over (2.83.5-1) ... 53s Preparing to unpack .../libglib2.0-0t64_2.84.0-1_armhf.deb ... 53s Unpacking libglib2.0-0t64:armhf (2.84.0-1) over (2.83.5-1) ... 53s Preparing to unpack .../libglib2.0-data_2.84.0-1_all.deb ... 53s Unpacking libglib2.0-data (2.84.0-1) over (2.83.5-1) ... 53s Preparing to unpack .../htop_3.4.0-2_armhf.deb ... 53s Unpacking htop (3.4.0-2) over (3.4.0-1) ... 53s Preparing to unpack .../python3-botocore_1.37.9+repack-1_all.deb ... 53s Unpacking python3-botocore (1.37.9+repack-1) over (1.36.22+repack-1) ... 54s Setting up htop (3.4.0-2) ... 54s Setting up libglib2.0-0t64:armhf (2.84.0-1) ... 54s No schema files found: doing nothing. 54s Setting up libglib2.0-data (2.84.0-1) ... 54s Setting up python3-botocore (1.37.9+repack-1) ... 55s Setting up gir1.2-glib-2.0:armhf (2.84.0-1) ... 55s Processing triggers for man-db (2.13.0-1) ... 55s Processing triggers for libc-bin (2.41-1ubuntu1) ... 57s Reading package lists... 58s Building dependency tree... 58s Reading state information... 58s Starting pkgProblemResolver with broken count: 0 58s Starting 2 pkgProblemResolver with broken count: 0 58s Done 58s Solving dependencies... 59s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 61s autopkgtest [09:19:32]: rebooting testbed after setup commands that affected boot 100s autopkgtest [09:20:11]: testbed running kernel: Linux 6.8.0-52-generic #53~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jan 15 18:10:51 UTC 2 126s autopkgtest [09:20:37]: @@@@@@@@@@@@@@@@@@@@ apt-source poetry-plugin-export 140s Get:1 http://ftpmaster.internal/ubuntu plucky/universe poetry-plugin-export 1.9.0-1 (dsc) [2323 B] 140s Get:2 http://ftpmaster.internal/ubuntu plucky/universe poetry-plugin-export 1.9.0-1 (tar) [77.4 kB] 140s Get:3 http://ftpmaster.internal/ubuntu plucky/universe poetry-plugin-export 1.9.0-1 (diff) [2336 B] 140s gpgv: Signature made Thu Jan 23 02:44:17 2025 UTC 140s gpgv: using RSA key 13796755BBC72BB8ABE2AEB5FA9DEC5DE11C63F1 140s gpgv: issuer "eamanu@debian.org" 140s gpgv: Can't check signature: No public key 140s dpkg-source: warning: cannot verify inline signature for ./poetry-plugin-export_1.9.0-1.dsc: no acceptable signature found 140s autopkgtest [09:20:51]: testing package poetry-plugin-export version 1.9.0-1 142s autopkgtest [09:20:53]: build not needed 144s autopkgtest [09:20:55]: test pybuild-autopkgtest: preparing testbed 146s Reading package lists... 146s Building dependency tree... 146s Reading state information... 147s Starting pkgProblemResolver with broken count: 0 147s Starting 2 pkgProblemResolver with broken count: 0 147s Done 148s The following NEW packages will be installed: 148s autoconf automake autopoint autotools-dev build-essential cpp cpp-14 148s cpp-14-arm-linux-gnueabihf cpp-arm-linux-gnueabihf debhelper debugedit 148s dh-autoreconf dh-python dh-strip-nondeterminism dwz g++ g++-14 148s g++-14-arm-linux-gnueabihf g++-arm-linux-gnueabihf gcc gcc-14 148s gcc-14-arm-linux-gnueabihf gcc-arm-linux-gnueabihf gettext intltool-debian 148s libarchive-zip-perl libasan8 libc-dev-bin libc6-dev libcc1-0 libcrypt-dev 148s libdebhelper-perl libdw1t64 libfile-stripnondeterminism-perl libgcc-14-dev 148s libgomp1 libisl23 libjs-jquery libjs-jquery-hotkeys libjs-jquery-isonscreen 148s libjs-jquery-metadata libjs-jquery-tablesorter 148s libjs-jquery-throttle-debounce libmpc3 libstdc++-14-dev libtool libubsan1 148s linux-libc-dev m4 po-debconf pybuild-plugin-autopkgtest 148s pybuild-plugin-pyproject python3-all python3-build python3-cachecontrol 148s python3-cleo python3-coverage python3-distlib python3-dulwich 148s python3-execnet python3-fastjsonschema python3-filelock python3-findpython 148s python3-importlib-metadata python3-iniconfig python3-installer 148s python3-jaraco.classes python3-jeepney python3-keyring python3-msgpack 148s python3-pbs-installer python3-pip-whl python3-pkginfo python3-platformdirs 148s python3-pluggy python3-poetry python3-poetry-core 148s python3-poetry-plugin-export python3-pyproject-hooks python3-pytest 148s python3-pytest-cov python3-pytest-mock python3-pytest-xdist 148s python3-rapidfuzz python3-requests-toolbelt python3-secretstorage 148s python3-setuptools-whl python3-shellingham python3-toml python3-tomlkit 148s python3-trove-classifiers python3-virtualenv python3-wheel python3-wheel-whl 148s rpcsvc-proto 148s 0 upgraded, 95 newly installed, 0 to remove and 0 not upgraded. 148s Need to get 61.4 MB of archives. 148s After this operation, 181 MB of additional disk space will be used. 148s Get:1 http://ftpmaster.internal/ubuntu plucky/main armhf m4 armhf 1.4.19-7 [238 kB] 148s Get:2 http://ftpmaster.internal/ubuntu plucky/main armhf autoconf all 2.72-3ubuntu1 [383 kB] 148s Get:3 http://ftpmaster.internal/ubuntu plucky/main armhf autotools-dev all 20220109.1 [44.9 kB] 148s Get:4 http://ftpmaster.internal/ubuntu plucky/main armhf automake all 1:1.17-3ubuntu1 [572 kB] 148s Get:5 http://ftpmaster.internal/ubuntu plucky/main armhf autopoint all 0.23.1-1 [619 kB] 148s Get:6 http://ftpmaster.internal/ubuntu plucky/main armhf libc-dev-bin armhf 2.41-1ubuntu1 [23.0 kB] 148s Get:7 http://ftpmaster.internal/ubuntu plucky/main armhf linux-libc-dev armhf 6.14.0-7.7 [1683 kB] 148s Get:8 http://ftpmaster.internal/ubuntu plucky/main armhf libcrypt-dev armhf 1:4.4.38-1 [120 kB] 148s Get:9 http://ftpmaster.internal/ubuntu plucky/main armhf rpcsvc-proto armhf 1.4.2-0ubuntu7 [62.2 kB] 149s Get:10 http://ftpmaster.internal/ubuntu plucky/main armhf libc6-dev armhf 2.41-1ubuntu1 [1396 kB] 149s Get:11 http://ftpmaster.internal/ubuntu plucky/main armhf libisl23 armhf 0.27-1 [546 kB] 149s Get:12 http://ftpmaster.internal/ubuntu plucky/main armhf libmpc3 armhf 1.3.1-1build2 [47.1 kB] 149s Get:13 http://ftpmaster.internal/ubuntu plucky/main armhf cpp-14-arm-linux-gnueabihf armhf 14.2.0-17ubuntu3 [9220 kB] 150s Get:14 http://ftpmaster.internal/ubuntu plucky/main armhf cpp-14 armhf 14.2.0-17ubuntu3 [1030 B] 150s Get:15 http://ftpmaster.internal/ubuntu plucky/main armhf cpp-arm-linux-gnueabihf armhf 4:14.2.0-1ubuntu1 [5578 B] 150s Get:16 http://ftpmaster.internal/ubuntu plucky/main armhf cpp armhf 4:14.2.0-1ubuntu1 [22.4 kB] 150s Get:17 http://ftpmaster.internal/ubuntu plucky/main armhf libcc1-0 armhf 15-20250222-0ubuntu1 [38.9 kB] 150s Get:18 http://ftpmaster.internal/ubuntu plucky/main armhf libgomp1 armhf 15-20250222-0ubuntu1 [128 kB] 150s Get:19 http://ftpmaster.internal/ubuntu plucky/main armhf libasan8 armhf 15-20250222-0ubuntu1 [2955 kB] 150s Get:20 http://ftpmaster.internal/ubuntu plucky/main armhf libubsan1 armhf 15-20250222-0ubuntu1 [1191 kB] 150s Get:21 http://ftpmaster.internal/ubuntu plucky/main armhf libgcc-14-dev armhf 14.2.0-17ubuntu3 [897 kB] 150s Get:22 http://ftpmaster.internal/ubuntu plucky/main armhf gcc-14-arm-linux-gnueabihf armhf 14.2.0-17ubuntu3 [18.0 MB] 152s Get:23 http://ftpmaster.internal/ubuntu plucky/main armhf gcc-14 armhf 14.2.0-17ubuntu3 [506 kB] 152s Get:24 http://ftpmaster.internal/ubuntu plucky/main armhf gcc-arm-linux-gnueabihf armhf 4:14.2.0-1ubuntu1 [1218 B] 152s Get:25 http://ftpmaster.internal/ubuntu plucky/main armhf gcc armhf 4:14.2.0-1ubuntu1 [5004 B] 152s Get:26 http://ftpmaster.internal/ubuntu plucky/main armhf libstdc++-14-dev armhf 14.2.0-17ubuntu3 [2573 kB] 152s Get:27 http://ftpmaster.internal/ubuntu plucky/main armhf g++-14-arm-linux-gnueabihf armhf 14.2.0-17ubuntu3 [10.5 MB] 153s Get:28 http://ftpmaster.internal/ubuntu plucky/main armhf g++-14 armhf 14.2.0-17ubuntu3 [21.8 kB] 153s Get:29 http://ftpmaster.internal/ubuntu plucky/main armhf g++-arm-linux-gnueabihf armhf 4:14.2.0-1ubuntu1 [966 B] 153s Get:30 http://ftpmaster.internal/ubuntu plucky/main armhf g++ armhf 4:14.2.0-1ubuntu1 [1084 B] 153s Get:31 http://ftpmaster.internal/ubuntu plucky/main armhf build-essential armhf 12.10ubuntu1 [4928 B] 153s Get:32 http://ftpmaster.internal/ubuntu plucky/main armhf libdebhelper-perl all 13.24.1ubuntu2 [95.4 kB] 153s Get:33 http://ftpmaster.internal/ubuntu plucky/main armhf libtool all 2.5.4-4 [168 kB] 153s Get:34 http://ftpmaster.internal/ubuntu plucky/main armhf dh-autoreconf all 20 [16.1 kB] 153s Get:35 http://ftpmaster.internal/ubuntu plucky/main armhf libarchive-zip-perl all 1.68-1 [90.2 kB] 153s Get:36 http://ftpmaster.internal/ubuntu plucky/main armhf libfile-stripnondeterminism-perl all 1.14.1-2 [20.3 kB] 153s Get:37 http://ftpmaster.internal/ubuntu plucky/main armhf dh-strip-nondeterminism all 1.14.1-2 [5064 B] 153s Get:38 http://ftpmaster.internal/ubuntu plucky/main armhf libdw1t64 armhf 0.192-4 [243 kB] 153s Get:39 http://ftpmaster.internal/ubuntu plucky/main armhf debugedit armhf 1:5.1-2 [46.7 kB] 153s Get:40 http://ftpmaster.internal/ubuntu plucky/main armhf dwz armhf 0.15-1build6 [116 kB] 153s Get:41 http://ftpmaster.internal/ubuntu plucky/main armhf gettext armhf 0.23.1-1 [1053 kB] 153s Get:42 http://ftpmaster.internal/ubuntu plucky/main armhf intltool-debian all 0.35.0+20060710.6 [23.2 kB] 153s Get:43 http://ftpmaster.internal/ubuntu plucky/main armhf po-debconf all 1.0.21+nmu1 [233 kB] 153s Get:44 http://ftpmaster.internal/ubuntu plucky/main armhf debhelper all 13.24.1ubuntu2 [895 kB] 153s Get:45 http://ftpmaster.internal/ubuntu plucky/universe armhf dh-python all 6.20250308 [118 kB] 153s Get:46 http://ftpmaster.internal/ubuntu plucky/main armhf libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [328 kB] 153s Get:47 http://ftpmaster.internal/ubuntu plucky/universe armhf libjs-jquery-metadata all 12-4 [6582 B] 153s Get:48 http://ftpmaster.internal/ubuntu plucky/universe armhf libjs-jquery-tablesorter all 1:2.31.3+dfsg1-4 [192 kB] 153s Get:49 http://ftpmaster.internal/ubuntu plucky/universe armhf libjs-jquery-throttle-debounce all 1.1+dfsg.1-2 [12.5 kB] 153s Get:50 http://ftpmaster.internal/ubuntu plucky/universe armhf pybuild-plugin-autopkgtest all 6.20250308 [1744 B] 153s Get:51 http://ftpmaster.internal/ubuntu plucky/main armhf python3-importlib-metadata all 8.6.1-1 [20.7 kB] 153s Get:52 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-pyproject-hooks all 1.2.0-1 [10.2 kB] 153s Get:53 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-toml all 0.10.2-1 [16.5 kB] 153s Get:54 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-wheel all 0.45.1-1 [57.7 kB] 153s Get:55 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-build all 1.2.2-1 [31.0 kB] 153s Get:56 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-installer all 0.7.0+dfsg1-3 [17.4 kB] 153s Get:57 http://ftpmaster.internal/ubuntu plucky/universe armhf pybuild-plugin-pyproject all 6.20250308 [1726 B] 153s Get:58 http://ftpmaster.internal/ubuntu plucky/main armhf python3-all armhf 3.13.2-2 [886 B] 153s Get:59 http://ftpmaster.internal/ubuntu plucky/main armhf python3-msgpack armhf 1.0.3-3build4 [80.6 kB] 153s Get:60 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-cachecontrol all 0.14.2-1 [18.7 kB] 153s Get:61 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-rapidfuzz armhf 3.12.1+ds-1build1 [1235 kB] 153s Get:62 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-cleo all 2.2.1-4 [52.4 kB] 153s Get:63 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-coverage armhf 7.6.0+dfsg1-2build1 [152 kB] 153s Get:64 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-distlib all 0.3.9-1 [267 kB] 153s Get:65 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-dulwich armhf 0.22.7-1 [183 kB] 153s Get:66 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-execnet all 2.1.1-1 [33.4 kB] 153s Get:67 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-fastjsonschema all 2.21.1-1 [20.4 kB] 153s Get:68 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-filelock all 3.17.0-1 [13.0 kB] 153s Get:69 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-findpython all 0.6.2-1 [15.3 kB] 153s Get:70 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-iniconfig all 1.1.1-2 [6024 B] 153s Get:71 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-jaraco.classes all 3.4.0-1 [7664 B] 153s Get:72 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-jeepney all 0.8.0-4 [33.1 kB] 153s Get:73 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-secretstorage all 3.3.3-3 [13.7 kB] 153s Get:74 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-keyring all 25.6.0-1 [40.6 kB] 153s Get:75 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-pbs-installer all 2025.02.12-2 [43.8 kB] 153s Get:76 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-pip-whl all 25.0+dfsg-1 [1446 kB] 153s Get:77 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-pkginfo all 1.12.1.2-2 [17.4 kB] 153s Get:78 http://ftpmaster.internal/ubuntu plucky/main armhf python3-platformdirs all 4.3.6-1 [16.8 kB] 153s Get:79 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-pluggy all 1.5.0-1 [21.0 kB] 153s Get:80 http://ftpmaster.internal/ubuntu plucky-proposed/universe armhf python3-poetry-core all 2.1.1-1 [221 kB] 153s Get:81 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-requests-toolbelt all 1.0.0-4 [37.0 kB] 153s Get:82 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-shellingham all 1.5.4-1 [9482 B] 153s Get:83 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-tomlkit all 0.13.2-1 [37.6 kB] 153s Get:84 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-trove-classifiers all 2025.1.15.22-1 [10.9 kB] 153s Get:85 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-setuptools-whl all 75.8.0-1 [1152 kB] 153s Get:86 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-wheel-whl all 0.45.1-1 [74.6 kB] 153s Get:87 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-virtualenv all 20.29.1+ds-1 [72.6 kB] 153s Get:88 http://ftpmaster.internal/ubuntu plucky-proposed/universe armhf python3-poetry all 2.1.1+dfsg-1 [165 kB] 153s Get:89 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-poetry-plugin-export all 1.9.0-1 [10.3 kB] 153s Get:90 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-pytest all 8.3.4-1 [252 kB] 153s Get:91 http://ftpmaster.internal/ubuntu plucky/universe armhf libjs-jquery-hotkeys all 0.2.0-1 [13.3 kB] 153s Get:92 http://ftpmaster.internal/ubuntu plucky/universe armhf libjs-jquery-isonscreen all 1.2.0-1.1 [3244 B] 154s Get:93 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-pytest-cov all 5.0.0-1 [21.3 kB] 154s Get:94 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-pytest-mock all 3.14.0-2 [11.7 kB] 154s Get:95 http://ftpmaster.internal/ubuntu plucky/universe armhf python3-pytest-xdist all 3.6.1-1 [33.8 kB] 154s Fetched 61.4 MB in 6s (10.3 MB/s) 154s Selecting previously unselected package m4. 154s (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 ... 64656 files and directories currently installed.) 154s Preparing to unpack .../00-m4_1.4.19-7_armhf.deb ... 154s Unpacking m4 (1.4.19-7) ... 154s Selecting previously unselected package autoconf. 154s Preparing to unpack .../01-autoconf_2.72-3ubuntu1_all.deb ... 154s Unpacking autoconf (2.72-3ubuntu1) ... 154s Selecting previously unselected package autotools-dev. 154s Preparing to unpack .../02-autotools-dev_20220109.1_all.deb ... 154s Unpacking autotools-dev (20220109.1) ... 154s Selecting previously unselected package automake. 154s Preparing to unpack .../03-automake_1%3a1.17-3ubuntu1_all.deb ... 154s Unpacking automake (1:1.17-3ubuntu1) ... 154s Selecting previously unselected package autopoint. 154s Preparing to unpack .../04-autopoint_0.23.1-1_all.deb ... 154s Unpacking autopoint (0.23.1-1) ... 154s Selecting previously unselected package libc-dev-bin. 154s Preparing to unpack .../05-libc-dev-bin_2.41-1ubuntu1_armhf.deb ... 154s Unpacking libc-dev-bin (2.41-1ubuntu1) ... 154s Selecting previously unselected package linux-libc-dev:armhf. 154s Preparing to unpack .../06-linux-libc-dev_6.14.0-7.7_armhf.deb ... 154s Unpacking linux-libc-dev:armhf (6.14.0-7.7) ... 155s Selecting previously unselected package libcrypt-dev:armhf. 155s Preparing to unpack .../07-libcrypt-dev_1%3a4.4.38-1_armhf.deb ... 155s Unpacking libcrypt-dev:armhf (1:4.4.38-1) ... 155s Selecting previously unselected package rpcsvc-proto. 155s Preparing to unpack .../08-rpcsvc-proto_1.4.2-0ubuntu7_armhf.deb ... 155s Unpacking rpcsvc-proto (1.4.2-0ubuntu7) ... 155s Selecting previously unselected package libc6-dev:armhf. 155s Preparing to unpack .../09-libc6-dev_2.41-1ubuntu1_armhf.deb ... 155s Unpacking libc6-dev:armhf (2.41-1ubuntu1) ... 155s Selecting previously unselected package libisl23:armhf. 155s Preparing to unpack .../10-libisl23_0.27-1_armhf.deb ... 155s Unpacking libisl23:armhf (0.27-1) ... 155s Selecting previously unselected package libmpc3:armhf. 155s Preparing to unpack .../11-libmpc3_1.3.1-1build2_armhf.deb ... 155s Unpacking libmpc3:armhf (1.3.1-1build2) ... 155s Selecting previously unselected package cpp-14-arm-linux-gnueabihf. 155s Preparing to unpack .../12-cpp-14-arm-linux-gnueabihf_14.2.0-17ubuntu3_armhf.deb ... 155s Unpacking cpp-14-arm-linux-gnueabihf (14.2.0-17ubuntu3) ... 155s Selecting previously unselected package cpp-14. 155s Preparing to unpack .../13-cpp-14_14.2.0-17ubuntu3_armhf.deb ... 155s Unpacking cpp-14 (14.2.0-17ubuntu3) ... 155s Selecting previously unselected package cpp-arm-linux-gnueabihf. 155s Preparing to unpack .../14-cpp-arm-linux-gnueabihf_4%3a14.2.0-1ubuntu1_armhf.deb ... 155s Unpacking cpp-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 155s Selecting previously unselected package cpp. 155s Preparing to unpack .../15-cpp_4%3a14.2.0-1ubuntu1_armhf.deb ... 155s Unpacking cpp (4:14.2.0-1ubuntu1) ... 155s Selecting previously unselected package libcc1-0:armhf. 155s Preparing to unpack .../16-libcc1-0_15-20250222-0ubuntu1_armhf.deb ... 155s Unpacking libcc1-0:armhf (15-20250222-0ubuntu1) ... 155s Selecting previously unselected package libgomp1:armhf. 155s Preparing to unpack .../17-libgomp1_15-20250222-0ubuntu1_armhf.deb ... 155s Unpacking libgomp1:armhf (15-20250222-0ubuntu1) ... 155s Selecting previously unselected package libasan8:armhf. 155s Preparing to unpack .../18-libasan8_15-20250222-0ubuntu1_armhf.deb ... 155s Unpacking libasan8:armhf (15-20250222-0ubuntu1) ... 155s Selecting previously unselected package libubsan1:armhf. 155s Preparing to unpack .../19-libubsan1_15-20250222-0ubuntu1_armhf.deb ... 155s Unpacking libubsan1:armhf (15-20250222-0ubuntu1) ... 155s Selecting previously unselected package libgcc-14-dev:armhf. 155s Preparing to unpack .../20-libgcc-14-dev_14.2.0-17ubuntu3_armhf.deb ... 155s Unpacking libgcc-14-dev:armhf (14.2.0-17ubuntu3) ... 155s Selecting previously unselected package gcc-14-arm-linux-gnueabihf. 155s Preparing to unpack .../21-gcc-14-arm-linux-gnueabihf_14.2.0-17ubuntu3_armhf.deb ... 155s Unpacking gcc-14-arm-linux-gnueabihf (14.2.0-17ubuntu3) ... 156s Selecting previously unselected package gcc-14. 156s Preparing to unpack .../22-gcc-14_14.2.0-17ubuntu3_armhf.deb ... 156s Unpacking gcc-14 (14.2.0-17ubuntu3) ... 156s Selecting previously unselected package gcc-arm-linux-gnueabihf. 156s Preparing to unpack .../23-gcc-arm-linux-gnueabihf_4%3a14.2.0-1ubuntu1_armhf.deb ... 156s Unpacking gcc-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 156s Selecting previously unselected package gcc. 156s Preparing to unpack .../24-gcc_4%3a14.2.0-1ubuntu1_armhf.deb ... 156s Unpacking gcc (4:14.2.0-1ubuntu1) ... 156s Selecting previously unselected package libstdc++-14-dev:armhf. 156s Preparing to unpack .../25-libstdc++-14-dev_14.2.0-17ubuntu3_armhf.deb ... 156s Unpacking libstdc++-14-dev:armhf (14.2.0-17ubuntu3) ... 156s Selecting previously unselected package g++-14-arm-linux-gnueabihf. 156s Preparing to unpack .../26-g++-14-arm-linux-gnueabihf_14.2.0-17ubuntu3_armhf.deb ... 156s Unpacking g++-14-arm-linux-gnueabihf (14.2.0-17ubuntu3) ... 156s Selecting previously unselected package g++-14. 156s Preparing to unpack .../27-g++-14_14.2.0-17ubuntu3_armhf.deb ... 156s Unpacking g++-14 (14.2.0-17ubuntu3) ... 156s Selecting previously unselected package g++-arm-linux-gnueabihf. 156s Preparing to unpack .../28-g++-arm-linux-gnueabihf_4%3a14.2.0-1ubuntu1_armhf.deb ... 156s Unpacking g++-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 156s Selecting previously unselected package g++. 156s Preparing to unpack .../29-g++_4%3a14.2.0-1ubuntu1_armhf.deb ... 156s Unpacking g++ (4:14.2.0-1ubuntu1) ... 156s Selecting previously unselected package build-essential. 156s Preparing to unpack .../30-build-essential_12.10ubuntu1_armhf.deb ... 156s Unpacking build-essential (12.10ubuntu1) ... 156s Selecting previously unselected package libdebhelper-perl. 156s Preparing to unpack .../31-libdebhelper-perl_13.24.1ubuntu2_all.deb ... 156s Unpacking libdebhelper-perl (13.24.1ubuntu2) ... 156s Selecting previously unselected package libtool. 156s Preparing to unpack .../32-libtool_2.5.4-4_all.deb ... 156s Unpacking libtool (2.5.4-4) ... 156s Selecting previously unselected package dh-autoreconf. 156s Preparing to unpack .../33-dh-autoreconf_20_all.deb ... 156s Unpacking dh-autoreconf (20) ... 156s Selecting previously unselected package libarchive-zip-perl. 156s Preparing to unpack .../34-libarchive-zip-perl_1.68-1_all.deb ... 156s Unpacking libarchive-zip-perl (1.68-1) ... 156s Selecting previously unselected package libfile-stripnondeterminism-perl. 156s Preparing to unpack .../35-libfile-stripnondeterminism-perl_1.14.1-2_all.deb ... 156s Unpacking libfile-stripnondeterminism-perl (1.14.1-2) ... 156s Selecting previously unselected package dh-strip-nondeterminism. 156s Preparing to unpack .../36-dh-strip-nondeterminism_1.14.1-2_all.deb ... 156s Unpacking dh-strip-nondeterminism (1.14.1-2) ... 156s Selecting previously unselected package libdw1t64:armhf. 156s Preparing to unpack .../37-libdw1t64_0.192-4_armhf.deb ... 156s Unpacking libdw1t64:armhf (0.192-4) ... 156s Selecting previously unselected package debugedit. 156s Preparing to unpack .../38-debugedit_1%3a5.1-2_armhf.deb ... 156s Unpacking debugedit (1:5.1-2) ... 156s Selecting previously unselected package dwz. 157s Preparing to unpack .../39-dwz_0.15-1build6_armhf.deb ... 157s Unpacking dwz (0.15-1build6) ... 157s Selecting previously unselected package gettext. 157s Preparing to unpack .../40-gettext_0.23.1-1_armhf.deb ... 157s Unpacking gettext (0.23.1-1) ... 157s Selecting previously unselected package intltool-debian. 157s Preparing to unpack .../41-intltool-debian_0.35.0+20060710.6_all.deb ... 157s Unpacking intltool-debian (0.35.0+20060710.6) ... 157s Selecting previously unselected package po-debconf. 157s Preparing to unpack .../42-po-debconf_1.0.21+nmu1_all.deb ... 157s Unpacking po-debconf (1.0.21+nmu1) ... 157s Selecting previously unselected package debhelper. 157s Preparing to unpack .../43-debhelper_13.24.1ubuntu2_all.deb ... 157s Unpacking debhelper (13.24.1ubuntu2) ... 157s Selecting previously unselected package dh-python. 157s Preparing to unpack .../44-dh-python_6.20250308_all.deb ... 157s Unpacking dh-python (6.20250308) ... 157s Selecting previously unselected package libjs-jquery. 157s Preparing to unpack .../45-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ... 157s Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 157s Selecting previously unselected package libjs-jquery-metadata. 157s Preparing to unpack .../46-libjs-jquery-metadata_12-4_all.deb ... 157s Unpacking libjs-jquery-metadata (12-4) ... 157s Selecting previously unselected package libjs-jquery-tablesorter. 157s Preparing to unpack .../47-libjs-jquery-tablesorter_1%3a2.31.3+dfsg1-4_all.deb ... 157s Unpacking libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 157s Selecting previously unselected package libjs-jquery-throttle-debounce. 157s Preparing to unpack .../48-libjs-jquery-throttle-debounce_1.1+dfsg.1-2_all.deb ... 157s Unpacking libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 157s Selecting previously unselected package pybuild-plugin-autopkgtest. 157s Preparing to unpack .../49-pybuild-plugin-autopkgtest_6.20250308_all.deb ... 157s Unpacking pybuild-plugin-autopkgtest (6.20250308) ... 157s Selecting previously unselected package python3-importlib-metadata. 157s Preparing to unpack .../50-python3-importlib-metadata_8.6.1-1_all.deb ... 157s Unpacking python3-importlib-metadata (8.6.1-1) ... 157s Selecting previously unselected package python3-pyproject-hooks. 157s Preparing to unpack .../51-python3-pyproject-hooks_1.2.0-1_all.deb ... 157s Unpacking python3-pyproject-hooks (1.2.0-1) ... 157s Selecting previously unselected package python3-toml. 157s Preparing to unpack .../52-python3-toml_0.10.2-1_all.deb ... 157s Unpacking python3-toml (0.10.2-1) ... 157s Selecting previously unselected package python3-wheel. 157s Preparing to unpack .../53-python3-wheel_0.45.1-1_all.deb ... 157s Unpacking python3-wheel (0.45.1-1) ... 157s Selecting previously unselected package python3-build. 157s Preparing to unpack .../54-python3-build_1.2.2-1_all.deb ... 157s Unpacking python3-build (1.2.2-1) ... 157s Selecting previously unselected package python3-installer. 157s Preparing to unpack .../55-python3-installer_0.7.0+dfsg1-3_all.deb ... 157s Unpacking python3-installer (0.7.0+dfsg1-3) ... 157s Selecting previously unselected package pybuild-plugin-pyproject. 157s Preparing to unpack .../56-pybuild-plugin-pyproject_6.20250308_all.deb ... 157s Unpacking pybuild-plugin-pyproject (6.20250308) ... 157s Selecting previously unselected package python3-all. 157s Preparing to unpack .../57-python3-all_3.13.2-2_armhf.deb ... 157s Unpacking python3-all (3.13.2-2) ... 157s Selecting previously unselected package python3-msgpack. 157s Preparing to unpack .../58-python3-msgpack_1.0.3-3build4_armhf.deb ... 157s Unpacking python3-msgpack (1.0.3-3build4) ... 157s Selecting previously unselected package python3-cachecontrol. 157s Preparing to unpack .../59-python3-cachecontrol_0.14.2-1_all.deb ... 157s Unpacking python3-cachecontrol (0.14.2-1) ... 157s Selecting previously unselected package python3-rapidfuzz. 157s Preparing to unpack .../60-python3-rapidfuzz_3.12.1+ds-1build1_armhf.deb ... 157s Unpacking python3-rapidfuzz (3.12.1+ds-1build1) ... 157s Selecting previously unselected package python3-cleo. 157s Preparing to unpack .../61-python3-cleo_2.2.1-4_all.deb ... 157s Unpacking python3-cleo (2.2.1-4) ... 157s Selecting previously unselected package python3-coverage. 157s Preparing to unpack .../62-python3-coverage_7.6.0+dfsg1-2build1_armhf.deb ... 157s Unpacking python3-coverage (7.6.0+dfsg1-2build1) ... 157s Selecting previously unselected package python3-distlib. 157s Preparing to unpack .../63-python3-distlib_0.3.9-1_all.deb ... 157s Unpacking python3-distlib (0.3.9-1) ... 157s Selecting previously unselected package python3-dulwich. 157s Preparing to unpack .../64-python3-dulwich_0.22.7-1_armhf.deb ... 157s Unpacking python3-dulwich (0.22.7-1) ... 157s Selecting previously unselected package python3-execnet. 157s Preparing to unpack .../65-python3-execnet_2.1.1-1_all.deb ... 157s Unpacking python3-execnet (2.1.1-1) ... 157s Selecting previously unselected package python3-fastjsonschema. 157s Preparing to unpack .../66-python3-fastjsonschema_2.21.1-1_all.deb ... 157s Unpacking python3-fastjsonschema (2.21.1-1) ... 158s Selecting previously unselected package python3-filelock. 158s Preparing to unpack .../67-python3-filelock_3.17.0-1_all.deb ... 158s Unpacking python3-filelock (3.17.0-1) ... 158s Selecting previously unselected package python3-findpython. 158s Preparing to unpack .../68-python3-findpython_0.6.2-1_all.deb ... 158s Unpacking python3-findpython (0.6.2-1) ... 158s Selecting previously unselected package python3-iniconfig. 158s Preparing to unpack .../69-python3-iniconfig_1.1.1-2_all.deb ... 158s Unpacking python3-iniconfig (1.1.1-2) ... 158s Selecting previously unselected package python3-jaraco.classes. 158s Preparing to unpack .../70-python3-jaraco.classes_3.4.0-1_all.deb ... 158s Unpacking python3-jaraco.classes (3.4.0-1) ... 158s Selecting previously unselected package python3-jeepney. 158s Preparing to unpack .../71-python3-jeepney_0.8.0-4_all.deb ... 158s Unpacking python3-jeepney (0.8.0-4) ... 158s Selecting previously unselected package python3-secretstorage. 158s Preparing to unpack .../72-python3-secretstorage_3.3.3-3_all.deb ... 158s Unpacking python3-secretstorage (3.3.3-3) ... 158s Selecting previously unselected package python3-keyring. 158s Preparing to unpack .../73-python3-keyring_25.6.0-1_all.deb ... 158s Unpacking python3-keyring (25.6.0-1) ... 158s Selecting previously unselected package python3-pbs-installer. 158s Preparing to unpack .../74-python3-pbs-installer_2025.02.12-2_all.deb ... 158s Unpacking python3-pbs-installer (2025.02.12-2) ... 158s Selecting previously unselected package python3-pip-whl. 158s Preparing to unpack .../75-python3-pip-whl_25.0+dfsg-1_all.deb ... 158s Unpacking python3-pip-whl (25.0+dfsg-1) ... 158s Selecting previously unselected package python3-pkginfo. 158s Preparing to unpack .../76-python3-pkginfo_1.12.1.2-2_all.deb ... 158s Unpacking python3-pkginfo (1.12.1.2-2) ... 158s Selecting previously unselected package python3-platformdirs. 158s Preparing to unpack .../77-python3-platformdirs_4.3.6-1_all.deb ... 158s Unpacking python3-platformdirs (4.3.6-1) ... 158s Selecting previously unselected package python3-pluggy. 158s Preparing to unpack .../78-python3-pluggy_1.5.0-1_all.deb ... 158s Unpacking python3-pluggy (1.5.0-1) ... 158s Selecting previously unselected package python3-poetry-core. 158s Preparing to unpack .../79-python3-poetry-core_2.1.1-1_all.deb ... 158s Unpacking python3-poetry-core (2.1.1-1) ... 158s Selecting previously unselected package python3-requests-toolbelt. 158s Preparing to unpack .../80-python3-requests-toolbelt_1.0.0-4_all.deb ... 158s Unpacking python3-requests-toolbelt (1.0.0-4) ... 158s Selecting previously unselected package python3-shellingham. 158s Preparing to unpack .../81-python3-shellingham_1.5.4-1_all.deb ... 158s Unpacking python3-shellingham (1.5.4-1) ... 158s Selecting previously unselected package python3-tomlkit. 158s Preparing to unpack .../82-python3-tomlkit_0.13.2-1_all.deb ... 158s Unpacking python3-tomlkit (0.13.2-1) ... 158s Selecting previously unselected package python3-trove-classifiers. 158s Preparing to unpack .../83-python3-trove-classifiers_2025.1.15.22-1_all.deb ... 158s Unpacking python3-trove-classifiers (2025.1.15.22-1) ... 158s Selecting previously unselected package python3-setuptools-whl. 158s Preparing to unpack .../84-python3-setuptools-whl_75.8.0-1_all.deb ... 158s Unpacking python3-setuptools-whl (75.8.0-1) ... 158s Selecting previously unselected package python3-wheel-whl. 158s Preparing to unpack .../85-python3-wheel-whl_0.45.1-1_all.deb ... 158s Unpacking python3-wheel-whl (0.45.1-1) ... 158s Selecting previously unselected package python3-virtualenv. 158s Preparing to unpack .../86-python3-virtualenv_20.29.1+ds-1_all.deb ... 158s Unpacking python3-virtualenv (20.29.1+ds-1) ... 158s Selecting previously unselected package python3-poetry. 158s Preparing to unpack .../87-python3-poetry_2.1.1+dfsg-1_all.deb ... 158s Unpacking python3-poetry (2.1.1+dfsg-1) ... 158s Selecting previously unselected package python3-poetry-plugin-export. 158s Preparing to unpack .../88-python3-poetry-plugin-export_1.9.0-1_all.deb ... 158s Unpacking python3-poetry-plugin-export (1.9.0-1) ... 158s Selecting previously unselected package python3-pytest. 158s Preparing to unpack .../89-python3-pytest_8.3.4-1_all.deb ... 158s Unpacking python3-pytest (8.3.4-1) ... 158s Selecting previously unselected package libjs-jquery-hotkeys. 158s Preparing to unpack .../90-libjs-jquery-hotkeys_0.2.0-1_all.deb ... 158s Unpacking libjs-jquery-hotkeys (0.2.0-1) ... 158s Selecting previously unselected package libjs-jquery-isonscreen. 158s Preparing to unpack .../91-libjs-jquery-isonscreen_1.2.0-1.1_all.deb ... 158s Unpacking libjs-jquery-isonscreen (1.2.0-1.1) ... 158s Selecting previously unselected package python3-pytest-cov. 158s Preparing to unpack .../92-python3-pytest-cov_5.0.0-1_all.deb ... 158s Unpacking python3-pytest-cov (5.0.0-1) ... 158s Selecting previously unselected package python3-pytest-mock. 158s Preparing to unpack .../93-python3-pytest-mock_3.14.0-2_all.deb ... 158s Unpacking python3-pytest-mock (3.14.0-2) ... 158s Selecting previously unselected package python3-pytest-xdist. 158s Preparing to unpack .../94-python3-pytest-xdist_3.6.1-1_all.deb ... 158s Unpacking python3-pytest-xdist (3.6.1-1) ... 158s Setting up dh-python (6.20250308) ... 159s Setting up python3-iniconfig (1.1.1-2) ... 159s Setting up python3-rapidfuzz (3.12.1+ds-1build1) ... 159s Setting up python3-setuptools-whl (75.8.0-1) ... 159s Setting up python3-filelock (3.17.0-1) ... 159s Setting up python3-findpython (0.6.2-1) ... 159s Setting up python3-jaraco.classes (3.4.0-1) ... 159s Setting up python3-requests-toolbelt (1.0.0-4) ... 159s Setting up python3-importlib-metadata (8.6.1-1) ... 159s Setting up python3-pkginfo (1.12.1.2-2) ... 160s Setting up python3-pip-whl (25.0+dfsg-1) ... 160s Setting up libarchive-zip-perl (1.68-1) ... 160s Setting up libdebhelper-perl (13.24.1ubuntu2) ... 160s Setting up linux-libc-dev:armhf (6.14.0-7.7) ... 160s Setting up m4 (1.4.19-7) ... 160s Setting up python3-all (3.13.2-2) ... 160s Setting up python3-coverage (7.6.0+dfsg1-2build1) ... 160s Setting up libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 160s Setting up python3-distlib (0.3.9-1) ... 160s Setting up libgomp1:armhf (15-20250222-0ubuntu1) ... 160s Setting up python3-wheel (0.45.1-1) ... 160s Setting up python3-platformdirs (4.3.6-1) ... 160s Setting up libdw1t64:armhf (0.192-4) ... 160s Setting up autotools-dev (20220109.1) ... 160s Setting up rpcsvc-proto (1.4.2-0ubuntu7) ... 160s Setting up python3-pyproject-hooks (1.2.0-1) ... 160s Setting up python3-poetry-core (2.1.1-1) ... 161s Setting up libmpc3:armhf (1.3.1-1build2) ... 161s Setting up autopoint (0.23.1-1) ... 161s Setting up python3-toml (0.10.2-1) ... 161s Setting up python3-jeepney (0.8.0-4) ... 161s Setting up python3-installer (0.7.0+dfsg1-3) ... 161s Setting up autoconf (2.72-3ubuntu1) ... 161s Setting up python3-pluggy (1.5.0-1) ... 161s Setting up libubsan1:armhf (15-20250222-0ubuntu1) ... 161s Setting up python3-fastjsonschema (2.21.1-1) ... 161s Setting up dwz (0.15-1build6) ... 161s Setting up python3-trove-classifiers (2025.1.15.22-1) ... 161s Setting up python3-pbs-installer (2025.02.12-2) ... 162s Setting up python3-dulwich (0.22.7-1) ... 162s Setting up libcrypt-dev:armhf (1:4.4.38-1) ... 162s Setting up libasan8:armhf (15-20250222-0ubuntu1) ... 162s Setting up debugedit (1:5.1-2) ... 162s Setting up python3-cleo (2.2.1-4) ... 162s Setting up python3-msgpack (1.0.3-3build4) ... 162s Setting up python3-cachecontrol (0.14.2-1) ... 162s Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 162s Setting up libgcc-14-dev:armhf (14.2.0-17ubuntu3) ... 162s Setting up libjs-jquery-hotkeys (0.2.0-1) ... 162s Setting up libisl23:armhf (0.27-1) ... 162s Setting up python3-build (1.2.2-1) ... 162s Setting up libc-dev-bin (2.41-1ubuntu1) ... 162s Setting up python3-execnet (2.1.1-1) ... 163s Setting up python3-shellingham (1.5.4-1) ... 163s Setting up python3-tomlkit (0.13.2-1) ... 163s Setting up python3-wheel-whl (0.45.1-1) ... 163s Setting up libcc1-0:armhf (15-20250222-0ubuntu1) ... 163s Setting up cpp-14-arm-linux-gnueabihf (14.2.0-17ubuntu3) ... 163s Setting up automake (1:1.17-3ubuntu1) ... 163s update-alternatives: using /usr/bin/automake-1.17 to provide /usr/bin/automake (automake) in auto mode 163s Setting up libfile-stripnondeterminism-perl (1.14.1-2) ... 163s Setting up gettext (0.23.1-1) ... 163s Setting up pybuild-plugin-pyproject (6.20250308) ... 163s Setting up python3-pytest (8.3.4-1) ... 163s Setting up python3-virtualenv (20.29.1+ds-1) ... 163s Setting up gcc-14-arm-linux-gnueabihf (14.2.0-17ubuntu3) ... 163s Setting up intltool-debian (0.35.0+20060710.6) ... 163s Setting up python3-secretstorage (3.3.3-3) ... 163s Setting up libjs-jquery-metadata (12-4) ... 163s Setting up libjs-jquery-isonscreen (1.2.0-1.1) ... 163s Setting up cpp-14 (14.2.0-17ubuntu3) ... 163s Setting up dh-strip-nondeterminism (1.14.1-2) ... 163s Setting up libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 163s Setting up python3-pytest-mock (3.14.0-2) ... 164s Setting up python3-keyring (25.6.0-1) ... 164s Setting up libc6-dev:armhf (2.41-1ubuntu1) ... 164s Setting up libstdc++-14-dev:armhf (14.2.0-17ubuntu3) ... 164s Setting up cpp-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 164s Setting up gcc-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 164s Setting up g++-14-arm-linux-gnueabihf (14.2.0-17ubuntu3) ... 164s Setting up python3-pytest-xdist (3.6.1-1) ... 164s Setting up po-debconf (1.0.21+nmu1) ... 164s Setting up python3-pytest-cov (5.0.0-1) ... 164s Setting up gcc-14 (14.2.0-17ubuntu3) ... 164s Setting up python3-poetry (2.1.1+dfsg-1) ... 164s Setting up cpp (4:14.2.0-1ubuntu1) ... 164s Setting up g++-14 (14.2.0-17ubuntu3) ... 164s Setting up g++-arm-linux-gnueabihf (4:14.2.0-1ubuntu1) ... 164s Setting up python3-poetry-plugin-export (1.9.0-1) ... 164s Setting up libtool (2.5.4-4) ... 164s Setting up gcc (4:14.2.0-1ubuntu1) ... 164s Setting up dh-autoreconf (20) ... 164s Setting up g++ (4:14.2.0-1ubuntu1) ... 164s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 164s Setting up build-essential (12.10ubuntu1) ... 164s Setting up debhelper (13.24.1ubuntu2) ... 164s Setting up pybuild-plugin-autopkgtest (6.20250308) ... 164s Processing triggers for install-info (7.1.1-1) ... 165s Processing triggers for libc-bin (2.41-1ubuntu1) ... 165s Processing triggers for man-db (2.13.0-1) ... 173s autopkgtest [09:21:24]: test pybuild-autopkgtest: pybuild-autopkgtest 173s autopkgtest [09:21:24]: test pybuild-autopkgtest: [----------------------- 175s pybuild-autopkgtest 176s I: pybuild base:311: cd /tmp/autopkgtest.C8nkQ3/autopkgtest_tmp/build; python3.13 -m pytest tests 178s ============================= test session starts ============================== 178s platform linux -- Python 3.13.2, pytest-8.3.4, pluggy-1.5.0 178s rootdir: /tmp/autopkgtest.C8nkQ3/autopkgtest_tmp/build 178s configfile: pyproject.toml 178s plugins: typeguard-4.4.2, cov-5.0.0, mock-3.14.0, xdist-3.6.1 178s created: 8/8 workers 178s 8 workers [141 items] 178s 180s FFFFFFFF.F.FF.FFFF..FFFFFFFF..FF.FFFFFFFFF.FF.FFFF.FFFFF.FF.FFFF.FF..F.F [ 51%] 182s F.FFF.FFFFFFFFFFFFF..FF.F.....F.FFFF.F..F.FF.FF.FFF.FFFFFFF.F.F.FFFFF [100%] 182s =================================== FAILURES =================================== 182s ____ test_exporter_can_export_requirements_txt_with_standard_packages[1.1] _____ 182s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_can_export_requi0') 182s poetry = , lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_standard_packages( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": [], "bar": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s bar==4.5.6 ; {MARKER_PY} 182s foo==1.2.3 ; {MARKER_PY} 182s """ 182s 182s > assert content == expected 182s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 182s E 182s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 182s E 182s E ...Full output truncated (2 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:159: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s ____ test_exporter_can_export_requirements_txt_with_standard_packages[2.1] _____ 182s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_can_export_requi1') 182s poetry = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_standard_packages( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": [], "bar": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s bar==4.5.6 ; {MARKER_PY} 182s foo==1.2.3 ; {MARKER_PY} 182s """ 182s 182s > assert content == expected 182s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 182s E 182s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 182s E 182s E ...Full output truncated (2 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:159: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s ___________________ test_export_prints_to_stdout_by_default ____________________ 182s [gw3] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tester = 182s do_lock = None 182s 182s def test_export_prints_to_stdout_by_default( 182s tester: CommandTester, do_lock: None 182s ) -> None: 182s tester.execute("--format requirements.txt") 182s expected = f"""\ 182s foo==1.0.0 ; {MARKER_PY} 182s """ 182s > assert tester.io.fetch_output() == expected 182s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 182s E 182s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s 182s tests/command/test_command_export.py:157: AssertionError 182s _________________________ test_export_with_all_extras __________________________ 182s [gw2] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tester = 182s do_lock = None 182s 182s def test_export_with_all_extras(tester: CommandTester, do_lock: None) -> None: 182s tester.execute("--format requirements.txt --all-extras") 182s output = tester.io.fetch_output() 182s > assert f"bar==1.1.0 ; {MARKER_PY}" in output 182s E assert 'bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"' in 'bar==1.1.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0"\nfoo==1.0.0 ; python_versi...d python_version < "4.0"\nqux==1.2.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0"\n' 182s 182s tests/command/test_command_export.py:239: AssertionError 182s _ test_export_groups[--without opt-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 182s [gw5] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tester = 182s do_lock = None, options = '--without opt' 182s expected = 'foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 182s 182s @pytest.mark.parametrize( 182s "options, expected", 182s [ 182s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 182s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 182s ( 182s "--with dev,opt", 182s ( 182s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 182s f" {MARKER_PY}\n" 182s ), 182s ), 182s (f"--without {MAIN_GROUP}", "\n"), 182s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s (f"--without {MAIN_GROUP},dev,opt", "\n"), 182s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 182s ( 182s f"--only {MAIN_GROUP},dev", 182s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 182s ), 182s ], 182s ) 182s def test_export_groups( 182s tester: CommandTester, do_lock: None, options: str, expected: str 182s ) -> None: 182s tester.execute(options) 182s > assert tester.io.fetch_output() == expected 182s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 182s E 182s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s 182s tests/command/test_command_export.py:199: AssertionError 182s _ test_export_groups[--with opt-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nopt==2.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 182s [gw4] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tester = 182s do_lock = None, options = '--with opt' 182s expected = 'foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nopt==2.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 182s 182s @pytest.mark.parametrize( 182s "options, expected", 182s [ 182s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 182s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 182s ( 182s "--with dev,opt", 182s ( 182s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 182s f" {MARKER_PY}\n" 182s ), 182s ), 182s (f"--without {MAIN_GROUP}", "\n"), 182s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s (f"--without {MAIN_GROUP},dev,opt", "\n"), 182s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 182s ( 182s f"--only {MAIN_GROUP},dev", 182s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 182s ), 182s ], 182s ) 182s def test_export_groups( 182s tester: CommandTester, do_lock: None, options: str, expected: str 182s ) -> None: 182s tester.execute(options) 182s > assert tester.io.fetch_output() == expected 182s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 182s E 182s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - opt==2.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 182s E 182s E ...Full output truncated (2 lines hidden), use '-vv' to show 182s 182s tests/command/test_command_export.py:199: AssertionError 182s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_markers[1.1] _ 182s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_can_export_requi2') 182s poetry = , lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_standard_packages_and_markers( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "baz", 182s "version": "7.8.9", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": [], "bar": [], "baz": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][0]["markers"] = "python_version < '3.7'" 182s lock_data["package"][2]["markers"] = "sys_platform == 'win32'" 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s markers = { 182s "foo": "python_version < '3.7'", 182s "bar": "extra =='foo'", 182s "baz": "sys_platform == 'win32'", 182s } 182s set_package_requires(poetry, markers=markers) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s bar==4.5.6 ; {MARKER_PY} 182s baz==7.8.9 ; {MARKER_PY_WIN32} 182s foo==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_ONLY)} 182s """ 182s 182s > assert content == expected 182s E assert 'bar==4.5.6 ;...on == "3.6"\n' == 'bar==4.5.6 ;...on == "3.6"\n' 182s E 182s E Skipping 57 identical trailing characters in diff, use -v to show 182s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - baz==7.8.9 ; (python_version >= "3.6" or python_version == "2.7") and sys_platform == "win32" and python_version < "4.0"... 182s E 182s E ...Full output truncated (2 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:218: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_export_groups[--only main,dev-baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 182s [gw7] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tester = 182s do_lock = None, options = '--only main,dev' 182s expected = 'baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 182s 182s @pytest.mark.parametrize( 182s "options, expected", 182s [ 182s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 182s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 182s ( 182s "--with dev,opt", 182s ( 182s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 182s f" {MARKER_PY}\n" 182s ), 182s ), 182s (f"--without {MAIN_GROUP}", "\n"), 182s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s (f"--without {MAIN_GROUP},dev,opt", "\n"), 182s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 182s ( 182s f"--only {MAIN_GROUP},dev", 182s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 182s ), 182s ], 182s ) 182s def test_export_groups( 182s tester: CommandTester, do_lock: None, options: str, expected: str 182s ) -> None: 182s tester.execute(options) 182s > assert tester.io.fetch_output() == expected 182s E assert 'baz==2.0.0 ;...ion < "4.0"\n' == 'baz==2.0.0 ;...on == "2.7"\n' 182s E 182s E - baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + baz==2.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 182s E 182s E ...Full output truncated (2 lines hidden), use '-vv' to show 182s 182s tests/command/test_command_export.py:199: AssertionError 182s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_markers[2.1] _ 182s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_can_export_requi3') 182s poetry = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_standard_packages_and_markers( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "baz", 182s "version": "7.8.9", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": [], "bar": [], "baz": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][0]["markers"] = "python_version < '3.7'" 182s lock_data["package"][2]["markers"] = "sys_platform == 'win32'" 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s markers = { 182s "foo": "python_version < '3.7'", 182s "bar": "extra =='foo'", 182s "baz": "sys_platform == 'win32'", 182s } 182s set_package_requires(poetry, markers=markers) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s bar==4.5.6 ; {MARKER_PY} 182s baz==7.8.9 ; {MARKER_PY_WIN32} 182s foo==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_ONLY)} 182s """ 182s 182s > assert content == expected 182s E assert 'bar==4.5.6 ;...on == "3.6"\n' == 'bar==4.5.6 ;...on == "3.6"\n' 182s E 182s E Skipping 57 identical trailing characters in diff, use -v to show 182s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - baz==7.8.9 ; (python_version >= "3.6" or python_version == "2.7") and sys_platform == "win32" and python_version < "4.0"... 182s E 182s E ...Full output truncated (2 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:218: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_export_groups[--with dev,opt-baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nopt==2.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 182s [gw4] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tester = 182s do_lock = None, options = '--with dev,opt' 182s expected = 'baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_versi... python_version == "2.7"\nopt==2.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 182s 182s @pytest.mark.parametrize( 182s "options, expected", 182s [ 182s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 182s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 182s ( 182s "--with dev,opt", 182s ( 182s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 182s f" {MARKER_PY}\n" 182s ), 182s ), 182s (f"--without {MAIN_GROUP}", "\n"), 182s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s (f"--without {MAIN_GROUP},dev,opt", "\n"), 182s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 182s ( 182s f"--only {MAIN_GROUP},dev", 182s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 182s ), 182s ], 182s ) 182s def test_export_groups( 182s tester: CommandTester, do_lock: None, options: str, expected: str 182s ) -> None: 182s tester.execute(options) 182s > assert tester.io.fetch_output() == expected 182s E assert 'baz==2.0.0 ;...ion < "4.0"\n' == 'baz==2.0.0 ;...on == "2.7"\n' 182s E 182s E - baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + baz==2.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 182s E 182s E ...Full output truncated (6 lines hidden), use '-vv' to show 182s 182s tests/command/test_command_export.py:199: AssertionError 182s _____________ test_export_uses_requirements_txt_format_by_default ______________ 182s [gw3] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tester = 182s do_lock = None 182s 182s def test_export_uses_requirements_txt_format_by_default( 182s tester: CommandTester, do_lock: None 182s ) -> None: 182s tester.execute() 182s expected = f"""\ 182s foo==1.0.0 ; {MARKER_PY} 182s """ 182s > assert tester.io.fetch_output() == expected 182s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 182s E 182s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s 182s tests/command/test_command_export.py:167: AssertionError 182s ____________ test_exporter_can_export_requirements_txt_poetry[1.1] _____________ 182s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_can_export_requi4') 182s poetry = , lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_poetry( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s """Regression test for #3254""" 182s 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "poetry", 182s "version": "1.1.4", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": {"keyring": "*"}, 182s }, 182s { 182s "name": "junit-xml", 182s "version": "1.9", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": {"six": "*"}, 182s }, 182s { 182s "name": "keyring", 182s "version": "21.8.0", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": { 182s "SecretStorage": { 182s "version": "*", 182s "markers": "sys_platform == 'linux'", 182s } 182s }, 182s }, 182s { 182s "name": "secretstorage", 182s "version": "3.3.0", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": {"cryptography": "*"}, 182s }, 182s { 182s "name": "cryptography", 182s "version": "3.2", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": {"six": "*"}, 182s }, 182s { 182s "name": "six", 182s "version": "1.15.0", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "poetry": [], 182s "keyring": [], 182s "secretstorage": [], 182s "cryptography": [], 182s "six": [], 182s "junit-xml": [], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][3]["markers"] = "sys_platform == 'linux'" 182s lock_data["package"][4]["markers"] = "sys_platform == 'linux'" 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires( 182s poetry, skip={"keyring", "secretstorage", "cryptography", "six"} 182s ) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s # The dependency graph: 182s # junit-xml 1.9 Creates JUnit XML test result documents that can be read by tools 182s # └── six * such as Jenkins 182s # poetry 1.1.4 Python dependency management and packaging made easy. 182s # ├── keyring >=21.2.0,<22.0.0 182s # │ ├── importlib-metadata >=1 182s # │ │ └── zipp >=0.5 182s # │ ├── jeepney >=0.4.2 182s # │ ├── pywin32-ctypes <0.1.0 || >0.1.0,<0.1.1 || >0.1.1 182s # │ └── secretstorage >=3.2 -- On linux only 182s # │ ├── cryptography >=2.0 182s # │ │ └── six >=1.4.1 182s # │ └── jeepney >=0.6 (circular dependency aborted here) 182s expected = { 182s "poetry": Dependency.create_from_pep_508(f"poetry==1.1.4; {MARKER_PY}"), 182s "junit-xml": Dependency.create_from_pep_508(f"junit-xml==1.9 ; {MARKER_PY}"), 182s "keyring": Dependency.create_from_pep_508(f"keyring==21.8.0 ; {MARKER_PY}"), 182s "secretstorage": Dependency.create_from_pep_508( 182s f"secretstorage==3.3.0 ; {MARKER_PY_LINUX}" 182s ), 182s "cryptography": Dependency.create_from_pep_508( 182s f"cryptography==3.2 ; {MARKER_PY_LINUX}" 182s ), 182s "six": Dependency.create_from_pep_508( 182s f"six==1.15.0 ; {MARKER_PY.union(MARKER_PY_LINUX)}" 182s ), 182s } 182s 182s for line in content.strip().split("\n"): 182s dependency = Dependency.create_from_pep_508(line) 182s assert dependency.name in expected 182s expected_dependency = expected.pop(dependency.name) 182s assert dependency == expected_dependency 182s > assert dependency.marker == expected_dependency.marker 182s E assert = "3.6") and python_version < "4.0" and sys_platform == "linux"> == = "3.6" or python_version == "2.7") and sys_platform == "linux" and python_version < "4.0"> 182s E + where = "3.6") and python_version < "4.0" and sys_platform == "linux"> = .marker 182s E + and = "3.6" or python_version == "2.7") and sys_platform == "linux" and python_version < "4.0"> = .marker 182s 182s tests/test_exporter.py:338: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s ____________ test_exporter_can_export_requirements_txt_poetry[2.1] _____________ 182s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_can_export_requi5') 182s poetry = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_poetry( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s """Regression test for #3254""" 182s 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "poetry", 182s "version": "1.1.4", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": {"keyring": "*"}, 182s }, 182s { 182s "name": "junit-xml", 182s "version": "1.9", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": {"six": "*"}, 182s }, 182s { 182s "name": "keyring", 182s "version": "21.8.0", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": { 182s "SecretStorage": { 182s "version": "*", 182s "markers": "sys_platform == 'linux'", 182s } 182s }, 182s }, 182s { 182s "name": "secretstorage", 182s "version": "3.3.0", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": {"cryptography": "*"}, 182s }, 182s { 182s "name": "cryptography", 182s "version": "3.2", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": {"six": "*"}, 182s }, 182s { 182s "name": "six", 182s "version": "1.15.0", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "poetry": [], 182s "keyring": [], 182s "secretstorage": [], 182s "cryptography": [], 182s "six": [], 182s "junit-xml": [], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][3]["markers"] = "sys_platform == 'linux'" 182s lock_data["package"][4]["markers"] = "sys_platform == 'linux'" 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires( 182s poetry, skip={"keyring", "secretstorage", "cryptography", "six"} 182s ) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s # The dependency graph: 182s # junit-xml 1.9 Creates JUnit XML test result documents that can be read by tools 182s # └── six * such as Jenkins 182s # poetry 1.1.4 Python dependency management and packaging made easy. 182s # ├── keyring >=21.2.0,<22.0.0 182s # │ ├── importlib-metadata >=1 182s # │ │ └── zipp >=0.5 182s # │ ├── jeepney >=0.4.2 182s # │ ├── pywin32-ctypes <0.1.0 || >0.1.0,<0.1.1 || >0.1.1 182s # │ └── secretstorage >=3.2 -- On linux only 182s # │ ├── cryptography >=2.0 182s # │ │ └── six >=1.4.1 182s # │ └── jeepney >=0.6 (circular dependency aborted here) 182s expected = { 182s "poetry": Dependency.create_from_pep_508(f"poetry==1.1.4; {MARKER_PY}"), 182s "junit-xml": Dependency.create_from_pep_508(f"junit-xml==1.9 ; {MARKER_PY}"), 182s "keyring": Dependency.create_from_pep_508(f"keyring==21.8.0 ; {MARKER_PY}"), 182s "secretstorage": Dependency.create_from_pep_508( 182s f"secretstorage==3.3.0 ; {MARKER_PY_LINUX}" 182s ), 182s "cryptography": Dependency.create_from_pep_508( 182s f"cryptography==3.2 ; {MARKER_PY_LINUX}" 182s ), 182s "six": Dependency.create_from_pep_508( 182s f"six==1.15.0 ; {MARKER_PY.union(MARKER_PY_LINUX)}" 182s ), 182s } 182s 182s for line in content.strip().split("\n"): 182s dependency = Dependency.create_from_pep_508(line) 182s assert dependency.name in expected 182s expected_dependency = expected.pop(dependency.name) 182s assert dependency == expected_dependency 182s > assert dependency.marker == expected_dependency.marker 182s E assert = "3.6") and python_version < "4.0" and sys_platform == "linux"> == = "3.6" or python_version == "2.7") and sys_platform == "linux" and python_version < "4.0"> 182s E + where = "3.6") and python_version < "4.0" and sys_platform == "linux"> = .marker 182s E + and = "3.6" or python_version == "2.7") and sys_platform == "linux" and python_version < "4.0"> = .marker 182s 182s tests/test_exporter.py:338: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_export_groups[--only main-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 182s [gw5] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tester = 182s do_lock = None, options = '--only main' 182s expected = 'foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 182s 182s @pytest.mark.parametrize( 182s "options, expected", 182s [ 182s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 182s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 182s ( 182s "--with dev,opt", 182s ( 182s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 182s f" {MARKER_PY}\n" 182s ), 182s ), 182s (f"--without {MAIN_GROUP}", "\n"), 182s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s (f"--without {MAIN_GROUP},dev,opt", "\n"), 182s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 182s ( 182s f"--only {MAIN_GROUP},dev", 182s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 182s ), 182s ], 182s ) 182s def test_export_groups( 182s tester: CommandTester, do_lock: None, options: str, expected: str 182s ) -> None: 182s tester.execute(options) 182s > assert tester.io.fetch_output() == expected 182s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 182s E 182s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s 182s tests/command/test_command_export.py:199: AssertionError 182s _ test_export_groups[-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 182s [gw3] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tester = 182s do_lock = None, options = '' 182s expected = 'foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 182s 182s @pytest.mark.parametrize( 182s "options, expected", 182s [ 182s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 182s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 182s ( 182s "--with dev,opt", 182s ( 182s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 182s f" {MARKER_PY}\n" 182s ), 182s ), 182s (f"--without {MAIN_GROUP}", "\n"), 182s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s (f"--without {MAIN_GROUP},dev,opt", "\n"), 182s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 182s ( 182s f"--only {MAIN_GROUP},dev", 182s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 182s ), 182s ], 182s ) 182s def test_export_groups( 182s tester: CommandTester, do_lock: None, options: str, expected: str 182s ) -> None: 182s tester.execute(options) 182s > assert tester.io.fetch_output() == expected 182s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 182s E 182s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s 182s tests/command/test_command_export.py:199: AssertionError 182s _ test_export_includes_extras_by_flag[feature_bar-bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 182s [gw7] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tester = 182s do_lock = None, extras = 'feature_bar' 182s expected = 'bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 182s 182s @pytest.mark.parametrize( 182s "extras, expected", 182s [ 182s ( 182s "feature_bar", 182s f"""\ 182s bar==1.1.0 ; {MARKER_PY} 182s foo==1.0.0 ; {MARKER_PY} 182s """, 182s ), 182s ( 182s "feature_bar feature_qux", 182s f"""\ 182s bar==1.1.0 ; {MARKER_PY} 182s foo==1.0.0 ; {MARKER_PY} 182s qux==1.2.0 ; {MARKER_PY} 182s """, 182s ), 182s ], 182s ) 182s def test_export_includes_extras_by_flag( 182s tester: CommandTester, do_lock: None, extras: str, expected: str 182s ) -> None: 182s tester.execute(f"--format requirements.txt --extras '{extras}'") 182s > assert tester.io.fetch_output() == expected 182s E assert 'bar==1.1.0 ;...ion < "4.0"\n' == 'bar==1.1.0 ;...on == "2.7"\n' 182s E 182s E - bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==1.1.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 182s E 182s E ...Full output truncated (2 lines hidden), use '-vv' to show 182s 182s tests/command/test_command_export.py:226: AssertionError 182s __________ test_exporter_can_export_requirements_txt_pyinstaller[1.1] __________ 182s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_can_export_requi6') 182s poetry = , lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_pyinstaller( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s """Regression test for #3254""" 182s 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "pyinstaller", 182s "version": "4.0", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": { 182s "altgraph": "*", 182s "macholib": { 182s "version": "*", 182s "markers": "sys_platform == 'darwin'", 182s }, 182s }, 182s }, 182s { 182s "name": "altgraph", 182s "version": "0.17", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "macholib", 182s "version": "1.8", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": {"altgraph": ">=0.15"}, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"pyinstaller": [], "altgraph": [], "macholib": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][2]["markers"] = "sys_platform == 'darwin'" 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, skip={"altgraph", "macholib"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s # Rationale for the results: 182s # * PyInstaller has an explicit dependency on altgraph, so it must always be 182s # installed. 182s # * PyInstaller requires macholib on Darwin, which in turn requires altgraph. 182s # The dependency graph: 182s # pyinstaller 4.0 PyInstaller bundles a Python application and all its 182s # ├── altgraph * dependencies into a single package. 182s # ├── macholib >=1.8 -- only on Darwin 182s # │ └── altgraph >=0.15 182s expected = { 182s "pyinstaller": Dependency.create_from_pep_508( 182s f"pyinstaller==4.0 ; {MARKER_PY}" 182s ), 182s "altgraph": Dependency.create_from_pep_508( 182s f"altgraph==0.17 ; {MARKER_PY.union(MARKER_PY_DARWIN)}" 182s ), 182s "macholib": Dependency.create_from_pep_508( 182s f"macholib==1.8 ; {MARKER_PY_DARWIN}" 182s ), 182s } 182s 182s for line in content.strip().split("\n"): 182s dependency = Dependency.create_from_pep_508(line) 182s assert dependency.name in expected 182s expected_dependency = expected.pop(dependency.name) 182s assert dependency == expected_dependency 182s > assert dependency.marker == expected_dependency.marker 182s E assert = "3.6" and python_version < "4.0"> == = "3.6" and python_version < "4.0" or python_version == "2.7"> 182s E + where = "3.6" and python_version < "4.0"> = .marker 182s E + and = "3.6" and python_version < "4.0" or python_version == "2.7"> = .marker 182s 182s tests/test_exporter.py:421: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _________________________ test_export_with_all_groups __________________________ 182s [gw2] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tester = 182s do_lock = None 182s 182s def test_export_with_all_groups(tester: CommandTester, do_lock: None) -> None: 182s tester.execute("--format requirements.txt --all-groups") 182s output = tester.io.fetch_output() 182s > assert f"baz==2.0.0 ; {MARKER_PY}" in output 182s E assert 'baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"' in 'baz==2.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0"\nfoo==1.0.0 ; python_versi...d python_version < "4.0"\nopt==2.2.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0"\n' 182s 182s tests/command/test_command_export.py:256: AssertionError 182s __________ test_exporter_can_export_requirements_txt_pyinstaller[2.1] __________ 182s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_can_export_requi7') 182s poetry = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_pyinstaller( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s """Regression test for #3254""" 182s 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "pyinstaller", 182s "version": "4.0", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": { 182s "altgraph": "*", 182s "macholib": { 182s "version": "*", 182s "markers": "sys_platform == 'darwin'", 182s }, 182s }, 182s }, 182s { 182s "name": "altgraph", 182s "version": "0.17", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "macholib", 182s "version": "1.8", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": {"altgraph": ">=0.15"}, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"pyinstaller": [], "altgraph": [], "macholib": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][2]["markers"] = "sys_platform == 'darwin'" 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, skip={"altgraph", "macholib"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s # Rationale for the results: 182s # * PyInstaller has an explicit dependency on altgraph, so it must always be 182s # installed. 182s # * PyInstaller requires macholib on Darwin, which in turn requires altgraph. 182s # The dependency graph: 182s # pyinstaller 4.0 PyInstaller bundles a Python application and all its 182s # ├── altgraph * dependencies into a single package. 182s # ├── macholib >=1.8 -- only on Darwin 182s # │ └── altgraph >=0.15 182s expected = { 182s "pyinstaller": Dependency.create_from_pep_508( 182s f"pyinstaller==4.0 ; {MARKER_PY}" 182s ), 182s "altgraph": Dependency.create_from_pep_508( 182s f"altgraph==0.17 ; {MARKER_PY.union(MARKER_PY_DARWIN)}" 182s ), 182s "macholib": Dependency.create_from_pep_508( 182s f"macholib==1.8 ; {MARKER_PY_DARWIN}" 182s ), 182s } 182s 182s for line in content.strip().split("\n"): 182s dependency = Dependency.create_from_pep_508(line) 182s assert dependency.name in expected 182s expected_dependency = expected.pop(dependency.name) 182s assert dependency == expected_dependency 182s > assert dependency.marker == expected_dependency.marker 182s E assert = "3.6" and python_version < "4.0"> == = "3.6" and python_version < "4.0" or python_version == "2.7"> 182s E + where = "3.6" and python_version < "4.0"> = .marker 182s E + and = "3.6" and python_version < "4.0" or python_version == "2.7"> = .marker 182s 182s tests/test_exporter.py:421: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_export_groups[--only dev-baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 182s [gw5] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tester = 182s do_lock = None, options = '--only dev' 182s expected = 'baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 182s 182s @pytest.mark.parametrize( 182s "options, expected", 182s [ 182s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 182s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 182s ( 182s "--with dev,opt", 182s ( 182s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 182s f" {MARKER_PY}\n" 182s ), 182s ), 182s (f"--without {MAIN_GROUP}", "\n"), 182s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s (f"--without {MAIN_GROUP},dev,opt", "\n"), 182s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 182s ( 182s f"--only {MAIN_GROUP},dev", 182s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 182s ), 182s ], 182s ) 182s def test_export_groups( 182s tester: CommandTester, do_lock: None, options: str, expected: str 182s ) -> None: 182s tester.execute(options) 182s > assert tester.io.fetch_output() == expected 182s E assert 'baz==2.0.0 ;...ion < "4.0"\n' == 'baz==2.0.0 ;...on == "2.7"\n' 182s E 182s E - baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + baz==2.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s 182s tests/command/test_command_export.py:199: AssertionError 182s _ test_export_groups[--with dev-baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 182s [gw3] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tester = 182s do_lock = None, options = '--with dev' 182s expected = 'baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 182s 182s @pytest.mark.parametrize( 182s "options, expected", 182s [ 182s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 182s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 182s ( 182s "--with dev,opt", 182s ( 182s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 182s f" {MARKER_PY}\n" 182s ), 182s ), 182s (f"--without {MAIN_GROUP}", "\n"), 182s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s (f"--without {MAIN_GROUP},dev,opt", "\n"), 182s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 182s ( 182s f"--only {MAIN_GROUP},dev", 182s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 182s ), 182s ], 182s ) 182s def test_export_groups( 182s tester: CommandTester, do_lock: None, options: str, expected: str 182s ) -> None: 182s tester.execute(options) 182s > assert tester.io.fetch_output() == expected 182s E assert 'baz==2.0.0 ;...ion < "4.0"\n' == 'baz==2.0.0 ;...on == "2.7"\n' 182s E 182s E - baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + baz==2.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 182s E 182s E ...Full output truncated (2 lines hidden), use '-vv' to show 182s 182s tests/command/test_command_export.py:199: AssertionError 182s _ test_export_groups[--without dev-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 182s [gw4] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tester = 182s do_lock = None, options = '--without dev' 182s expected = 'foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 182s 182s @pytest.mark.parametrize( 182s "options, expected", 182s [ 182s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 182s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 182s ( 182s "--with dev,opt", 182s ( 182s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 182s f" {MARKER_PY}\n" 182s ), 182s ), 182s (f"--without {MAIN_GROUP}", "\n"), 182s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s (f"--without {MAIN_GROUP},dev,opt", "\n"), 182s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 182s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 182s ( 182s f"--only {MAIN_GROUP},dev", 182s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 182s ), 182s ], 182s ) 182s def test_export_groups( 182s tester: CommandTester, do_lock: None, options: str, expected: str 182s ) -> None: 182s tester.execute(options) 182s > assert tester.io.fetch_output() == expected 182s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 182s E 182s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s 182s tests/command/test_command_export.py:199: AssertionError 182s _______ test_export_exports_requirements_txt_file_locks_if_no_lock_file ________ 182s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tester = 182s poetry = 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_export_exports_requiremen0') 182s 182s def test_export_exports_requirements_txt_file_locks_if_no_lock_file( 182s tester: CommandTester, poetry: Poetry, tmp_path: Path 182s ) -> None: 182s assert not poetry.locker.lock.exists() 182s > _export_requirements(tester, poetry, tmp_path) 182s 182s tests/command/test_command_export.py:122: 182s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 182s 182s tester = 182s poetry = 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_export_exports_requiremen0') 182s 182s def _export_requirements(tester: CommandTester, poetry: Poetry, tmp_path: Path) -> None: 182s from tests.helpers import as_cwd 182s 182s with as_cwd(tmp_path): 182s tester.execute("--format requirements.txt --output requirements.txt") 182s 182s requirements = tmp_path / "requirements.txt" 182s assert requirements.exists() 182s 182s with requirements.open(encoding="utf-8") as f: 182s content = f.read() 182s 182s assert poetry.locker.lock.exists() 182s 182s expected = f"""\ 182s foo==1.0.0 ; {MARKER_PY} 182s """ 182s 182s > assert content == expected 182s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 182s E 182s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s 182s tests/command/test_command_export.py:115: AssertionError 182s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes[1.1] _ 182s [gw3] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw3/test_exporter_can_export_requi0') 182s poetry = , lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s bar==4.5.6 ; {MARKER_PY} \\ 182s --hash=sha256:67890 182s foo==1.2.3 ; {MARKER_PY} \\ 182s --hash=sha256:12345 182s """ 182s 182s > assert content == expected 182s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 182s E 182s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:67890 182s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 182s E 182s E ...Full output truncated (4 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:641: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled[2.1] _ 182s [gw4] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw4/test_exporter_can_export_requi0') 182s poetry = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.with_hashes(False) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s bar==4.5.6 ; {MARKER_PY} 182s foo==1.2.3 ; {MARKER_PY} 182s """ 182s 182s > assert content == expected 182s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 182s E 182s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 182s E 182s E ...Full output truncated (2 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:746: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s ____ test_exporter_exports_requirements_txt_without_optional_packages[2.1] _____ 182s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_exports_requirem0') 182s poetry = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_without_optional_packages( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": True, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][1]["groups"] = ["dev"] 182s lock_data["package"][1]["markers"] = 'extra == "feature-bar"' 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, dev={"bar"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s foo==1.2.3 ; {MARKER_PY} \\ 182s --hash=sha256:12345 182s """ 182s 182s > assert content == expected 182s E assert 'foo==1.2.3 ;...ha256:12345\n' == 'foo==1.2.3 ;...ha256:12345\n' 182s E 182s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:12345 182s 182s tests/test_exporter.py:943: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[1.1-False-lines0] _ 182s [gw5] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw5/test_exporter_can_export_requi1') 182s poetry = , dev = False 182s lines = ['a==1.2.3 ; python_version >= "3.6" and python_version < "3.8" or python_version == "2.7"'] 182s lock_version = '1.1' 182s 182s @pytest.mark.parametrize( 182s ["dev", "lines"], 182s [ 182s ( 182s False, 182s [f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38)}"], 182s ), 182s ( 182s True, 182s [ 182s f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38).union(MARKER_PY36)}", 182s f"b==4.5.6 ; {MARKER_PY}", 182s ], 182s ), 182s ], 182s ) 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any( 182s tmp_path: Path, poetry: Poetry, dev: bool, lines: list[str], lock_version: str 182s ) -> None: 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "a", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "b", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": {"a": ">=1.2.3"}, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"a": [], "b": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][0]["groups"] = ["main", "dev"] 182s lock_data["package"][0]["markers"] = {"main": "python_version < '3.8'"} 182s lock_data["package"][1]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s 182s root = poetry.package.with_dependency_groups([], only=True) 182s root.add_dependency( 182s Factory.create_dependency( 182s name="a", constraint={"version": "^1.2.3", "python": "<3.8"} 182s ) 182s ) 182s root.add_dependency( 182s Factory.create_dependency( 182s name="b", constraint={"version": "^4.5.6"}, groups=["dev"] 182s ) 182s ) 182s poetry._package = root 182s 182s exporter = Exporter(poetry, NullIO()) 182s if dev: 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s > assert content.strip() == "\n".join(lines) 182s E assert 'a==1.2.3 ; p...rsion < "3.8"' == 'a==1.2.3 ; p...sion == "2.7"' 182s E 182s E - a==1.2.3 ; python_version >= "3.6" and python_version < "3.8" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^^ ^^ ^ ^ 182s E + a==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "3.8" 182s E ? + ^ ^ ^^ ^^ ^ ^^^ ^ ^ ^ 182s 182s tests/test_exporter.py:592: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes[2.1] _ 182s [gw3] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw3/test_exporter_can_export_requi1') 182s poetry = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s bar==4.5.6 ; {MARKER_PY} \\ 182s --hash=sha256:67890 182s foo==1.2.3 ; {MARKER_PY} \\ 182s --hash=sha256:12345 182s """ 182s 182s > assert content == expected 182s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 182s E 182s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:67890 182s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 182s E 182s E ...Full output truncated (4 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:641: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_exports_requirements_txt_without_dev_packages_by_default[1.1] __ 182s [gw4] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw4/test_exporter_exports_requirem0') 182s poetry = , lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_without_dev_packages_by_default( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][1]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, dev={"bar"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s foo==1.2.3 ; {MARKER_PY} \\ 182s --hash=sha256:12345 182s """ 182s 182s > assert content == expected 182s E assert 'foo==1.2.3 ;...ha256:12345\n' == 'foo==1.2.3 ;...ha256:12345\n' 182s E 182s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:12345 182s 182s tests/test_exporter.py:795: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_export_includes_extras_by_flag[feature_bar feature_qux-bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nqux==1.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 182s [gw7] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tester = 182s do_lock = None, extras = 'feature_bar feature_qux' 182s expected = 'bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_versi... python_version == "2.7"\nqux==1.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 182s 182s @pytest.mark.parametrize( 182s "extras, expected", 182s [ 182s ( 182s "feature_bar", 182s f"""\ 182s bar==1.1.0 ; {MARKER_PY} 182s foo==1.0.0 ; {MARKER_PY} 182s """, 182s ), 182s ( 182s "feature_bar feature_qux", 182s f"""\ 182s bar==1.1.0 ; {MARKER_PY} 182s foo==1.0.0 ; {MARKER_PY} 182s qux==1.2.0 ; {MARKER_PY} 182s """, 182s ), 182s ], 182s ) 182s def test_export_includes_extras_by_flag( 182s tester: CommandTester, do_lock: None, extras: str, expected: str 182s ) -> None: 182s tester.execute(f"--format requirements.txt --extras '{extras}'") 182s > assert tester.io.fetch_output() == expected 182s E assert 'bar==1.1.0 ;...ion < "4.0"\n' == 'bar==1.1.0 ;...on == "2.7"\n' 182s E 182s E - bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==1.1.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 182s E 182s E ...Full output truncated (6 lines hidden), use '-vv' to show 182s 182s tests/command/test_command_export.py:226: AssertionError 182s __ test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in[2.1] ___ 182s [gw2] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw2/test_exporter_exports_requirem0') 182s poetry = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][1]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, dev={"bar"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s bar==4.5.6 ; {MARKER_PY} \\ 182s --hash=sha256:67890 182s foo==1.2.3 ; {MARKER_PY} \\ 182s --hash=sha256:12345 182s """ 182s 182s > assert content == expected 182s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 182s E 182s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:67890 182s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 182s E 182s E ...Full output truncated (4 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:847: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_exports_requirements_txt_with_optional_packages[1.1-extras0-lines0] _ 182s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_exports_requirem1') 182s poetry = , extras = ['feature-bar'] 182s lines = ['bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'foo==1.2.3 ; python_ve...ython_version == "2.7"', 'spam==0.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 182s lock_version = '1.1' 182s 182s @pytest.mark.parametrize( 182s ["extras", "lines"], 182s [ 182s ( 182s ["feature-bar"], 182s [ 182s f"bar==4.5.6 ; {MARKER_PY}", 182s f"foo==1.2.3 ; {MARKER_PY}", 182s f"spam==0.1.0 ; {MARKER_PY}", 182s ], 182s ), 182s ], 182s ) 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_with_optional_packages( 182s tmp_path: Path, 182s poetry: Poetry, 182s extras: Collection[NormalizedName], 182s lines: list[str], 182s lock_version: str, 182s ) -> None: 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": True, 182s "python-versions": "*", 182s "dependencies": {"spam": ">=0.1"}, 182s }, 182s { 182s "name": "spam", 182s "version": "0.1.0", 182s "optional": True, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s "spam": [{"name": "spam.whl", "hash": "abcde"}], 182s }, 182s }, 182s "extras": {"feature_bar": ["bar"]}, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][1]["markers"] = 'extra == "feature-bar"' 182s lock_data["package"][2]["markers"] = 'extra == "feature-bar"' 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.with_hashes(False) 182s exporter.with_extras(extras) 182s exporter.export( 182s "requirements.txt", 182s tmp_path, 182s "requirements.txt", 182s ) 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = "\n".join(lines) 182s 182s > assert content.strip() == expected 182s E assert 'bar==4.5.6 ;...rsion < "4.0"' == 'bar==4.5.6 ;...sion == "2.7"' 182s E 182s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 182s E 182s E ...Full output truncated (6 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:1023: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[1.1-True-lines1] _ 182s [gw5] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw5/test_exporter_can_export_requi2') 182s poetry = , dev = True 182s lines = ['a==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'b==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 182s lock_version = '1.1' 182s 182s @pytest.mark.parametrize( 182s ["dev", "lines"], 182s [ 182s ( 182s False, 182s [f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38)}"], 182s ), 182s ( 182s True, 182s [ 182s f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38).union(MARKER_PY36)}", 182s f"b==4.5.6 ; {MARKER_PY}", 182s ], 182s ), 182s ], 182s ) 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any( 182s tmp_path: Path, poetry: Poetry, dev: bool, lines: list[str], lock_version: str 182s ) -> None: 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "a", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "b", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": {"a": ">=1.2.3"}, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"a": [], "b": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][0]["groups"] = ["main", "dev"] 182s lock_data["package"][0]["markers"] = {"main": "python_version < '3.8'"} 182s lock_data["package"][1]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s 182s root = poetry.package.with_dependency_groups([], only=True) 182s root.add_dependency( 182s Factory.create_dependency( 182s name="a", constraint={"version": "^1.2.3", "python": "<3.8"} 182s ) 182s ) 182s root.add_dependency( 182s Factory.create_dependency( 182s name="b", constraint={"version": "^4.5.6"}, groups=["dev"] 182s ) 182s ) 182s poetry._package = root 182s 182s exporter = Exporter(poetry, NullIO()) 182s if dev: 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s > assert content.strip() == "\n".join(lines) 182s E assert 'a==1.2.3 ; p...rsion < "4.0"' == 'a==1.2.3 ; p...sion == "2.7"' 182s E 182s E - a==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + a==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - b==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 182s E 182s E ...Full output truncated (2 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:592: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes[1.1] _ 182s [gw3] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw3/test_exporter_can_export_requi2') 182s poetry = , lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [ 182s {"name": "foo1.whl", "hash": "67890"}, 182s {"name": "foo2.whl", "hash": "12345"}, 182s ], 182s "bar": [ 182s {"name": "bar1.whl", "hash": "67890"}, 182s {"name": "bar2.whl", "hash": "12345"}, 182s ], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s bar==4.5.6 ; {MARKER_PY} \\ 182s --hash=sha256:12345 \\ 182s --hash=sha256:67890 182s foo==1.2.3 ; {MARKER_PY} \\ 182s --hash=sha256:12345 \\ 182s --hash=sha256:67890 182s """ 182s 182s > assert content == expected 182s E assert 'bar==4.5.6 ;...ha256:67890\n' == 'bar==4.5.6 ;...ha256:67890\n' 182s E 182s E Skipping 45 identical trailing characters in diff, use -v to show 182s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:12345 \... 182s E 182s E ...Full output truncated (6 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:698: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_exports_requirements_txt_without_dev_packages_by_default[2.1] __ 182s [gw4] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw4/test_exporter_exports_requirem1') 182s poetry = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_without_dev_packages_by_default( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][1]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, dev={"bar"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s foo==1.2.3 ; {MARKER_PY} \\ 182s --hash=sha256:12345 182s """ 182s 182s > assert content == expected 182s E assert 'foo==1.2.3 ;...ha256:12345\n' == 'foo==1.2.3 ;...ha256:12345\n' 182s E 182s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:12345 182s 182s tests/test_exporter.py:795: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_exports_requirements_txt_with_optional_packages[2.1-extras0-lines0] _ 182s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_exports_requirem2') 182s poetry = , extras = ['feature-bar'] 182s lines = ['bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'foo==1.2.3 ; python_ve...ython_version == "2.7"', 'spam==0.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 182s lock_version = '2.1' 182s 182s @pytest.mark.parametrize( 182s ["extras", "lines"], 182s [ 182s ( 182s ["feature-bar"], 182s [ 182s f"bar==4.5.6 ; {MARKER_PY}", 182s f"foo==1.2.3 ; {MARKER_PY}", 182s f"spam==0.1.0 ; {MARKER_PY}", 182s ], 182s ), 182s ], 182s ) 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_with_optional_packages( 182s tmp_path: Path, 182s poetry: Poetry, 182s extras: Collection[NormalizedName], 182s lines: list[str], 182s lock_version: str, 182s ) -> None: 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": True, 182s "python-versions": "*", 182s "dependencies": {"spam": ">=0.1"}, 182s }, 182s { 182s "name": "spam", 182s "version": "0.1.0", 182s "optional": True, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s "spam": [{"name": "spam.whl", "hash": "abcde"}], 182s }, 182s }, 182s "extras": {"feature_bar": ["bar"]}, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][1]["markers"] = 'extra == "feature-bar"' 182s lock_data["package"][2]["markers"] = 'extra == "feature-bar"' 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.with_hashes(False) 182s exporter.with_extras(extras) 182s exporter.export( 182s "requirements.txt", 182s tmp_path, 182s "requirements.txt", 182s ) 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = "\n".join(lines) 182s 182s > assert content.strip() == expected 182s E assert 'bar==4.5.6 ;...rsion < "4.0"' == 'bar==4.5.6 ;...sion == "2.7"' 182s E 182s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 182s E 182s E ...Full output truncated (6 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:1023: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[2.1-False-lines0] _ 182s [gw5] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw5/test_exporter_can_export_requi3') 182s poetry = , dev = False 182s lines = ['a==1.2.3 ; python_version >= "3.6" and python_version < "3.8" or python_version == "2.7"'] 182s lock_version = '2.1' 182s 182s @pytest.mark.parametrize( 182s ["dev", "lines"], 182s [ 182s ( 182s False, 182s [f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38)}"], 182s ), 182s ( 182s True, 182s [ 182s f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38).union(MARKER_PY36)}", 182s f"b==4.5.6 ; {MARKER_PY}", 182s ], 182s ), 182s ], 182s ) 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any( 182s tmp_path: Path, poetry: Poetry, dev: bool, lines: list[str], lock_version: str 182s ) -> None: 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "a", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "b", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": {"a": ">=1.2.3"}, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"a": [], "b": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][0]["groups"] = ["main", "dev"] 182s lock_data["package"][0]["markers"] = {"main": "python_version < '3.8'"} 182s lock_data["package"][1]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s 182s root = poetry.package.with_dependency_groups([], only=True) 182s root.add_dependency( 182s Factory.create_dependency( 182s name="a", constraint={"version": "^1.2.3", "python": "<3.8"} 182s ) 182s ) 182s root.add_dependency( 182s Factory.create_dependency( 182s name="b", constraint={"version": "^4.5.6"}, groups=["dev"] 182s ) 182s ) 182s poetry._package = root 182s 182s exporter = Exporter(poetry, NullIO()) 182s if dev: 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s > assert content.strip() == "\n".join(lines) 182s E assert 'a==1.2.3 ; p...rsion < "3.8"' == 'a==1.2.3 ; p...sion == "2.7"' 182s E 182s E - a==1.2.3 ; python_version >= "3.6" and python_version < "3.8" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^^ ^^ ^ ^ 182s E + a==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "3.8" 182s E ? + ^ ^ ^^ ^^ ^ ^^^ ^ ^ ^ 182s 182s tests/test_exporter.py:592: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes[2.1] _ 182s [gw3] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw3/test_exporter_can_export_requi3') 182s poetry = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [ 182s {"name": "foo1.whl", "hash": "67890"}, 182s {"name": "foo2.whl", "hash": "12345"}, 182s ], 182s "bar": [ 182s {"name": "bar1.whl", "hash": "67890"}, 182s {"name": "bar2.whl", "hash": "12345"}, 182s ], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s bar==4.5.6 ; {MARKER_PY} \\ 182s --hash=sha256:12345 \\ 182s --hash=sha256:67890 182s foo==1.2.3 ; {MARKER_PY} \\ 182s --hash=sha256:12345 \\ 182s --hash=sha256:67890 182s """ 182s 182s > assert content == expected 182s E assert 'bar==4.5.6 ;...ha256:67890\n' == 'bar==4.5.6 ;...ha256:67890\n' 182s E 182s E Skipping 45 identical trailing characters in diff, use -v to show 182s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:12345 \... 182s E 182s E ...Full output truncated (6 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:698: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _____________ test_export_exports_requirements_txt_uses_lock_file ______________ 182s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tester = 182s poetry = 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_export_exports_requiremen1') 182s do_lock = None 182s 182s def test_export_exports_requirements_txt_uses_lock_file( 182s tester: CommandTester, poetry: Poetry, tmp_path: Path, do_lock: None 182s ) -> None: 182s > _export_requirements(tester, poetry, tmp_path) 182s 182s tests/command/test_command_export.py:129: 182s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 182s 182s tester = 182s poetry = 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_export_exports_requiremen1') 182s 182s def _export_requirements(tester: CommandTester, poetry: Poetry, tmp_path: Path) -> None: 182s from tests.helpers import as_cwd 182s 182s with as_cwd(tmp_path): 182s tester.execute("--format requirements.txt --output requirements.txt") 182s 182s requirements = tmp_path / "requirements.txt" 182s assert requirements.exists() 182s 182s with requirements.open(encoding="utf-8") as f: 182s content = f.read() 182s 182s assert poetry.locker.lock.exists() 182s 182s expected = f"""\ 182s foo==1.0.0 ; {MARKER_PY} 182s """ 182s 182s > assert content == expected 182s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 182s E 182s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s 182s tests/command/test_command_export.py:115: AssertionError 182s __ test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in[1.1] ___ 182s [gw4] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw4/test_exporter_exports_requirem2') 182s poetry = , lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][1]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, dev={"bar"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s bar==4.5.6 ; {MARKER_PY} \\ 182s --hash=sha256:67890 182s foo==1.2.3 ; {MARKER_PY} \\ 182s --hash=sha256:12345 182s """ 182s 182s > assert content == expected 182s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 182s E 182s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:67890 182s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 182s E 182s E ...Full output truncated (4 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:847: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _______ test_exporter_can_export_requirements_txt_with_git_packages[1.1] _______ 182s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_can_export_requi9') 182s poetry = , lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_git_packages( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "git", 182s "url": "https://github.com/foo/foo.git", 182s "reference": "123456", 182s "resolved_reference": "abcdef", 182s }, 182s } 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s foo @ git+https://github.com/foo/foo.git@abcdef ; {MARKER_PY} 182s """ 182s 182s > assert content == expected 182s E assert 'foo @ git+ht...ion < "4.0"\n' == 'foo @ git+ht...on == "2.7"\n' 182s E 182s E Skipping 55 identical leading characters in diff, use -v to show 182s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s 182s tests/test_exporter.py:1066: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s ____ test_exporter_exports_requirements_txt_without_optional_packages[1.1] _____ 182s [gw2] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw2/test_exporter_exports_requirem3') 182s poetry = , lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_without_optional_packages( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": True, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][1]["groups"] = ["dev"] 182s lock_data["package"][1]["markers"] = 'extra == "feature-bar"' 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, dev={"bar"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s foo==1.2.3 ; {MARKER_PY} \\ 182s --hash=sha256:12345 182s """ 182s 182s > assert content == expected 182s E assert 'foo==1.2.3 ;...ha256:12345\n' == 'foo==1.2.3 ;...ha256:12345\n' 182s E 182s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:12345 182s 182s tests/test_exporter.py:943: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[2.1-True-lines1] _ 182s [gw5] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw5/test_exporter_can_export_requi4') 182s poetry = , dev = True 182s lines = ['a==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'b==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 182s lock_version = '2.1' 182s 182s @pytest.mark.parametrize( 182s ["dev", "lines"], 182s [ 182s ( 182s False, 182s [f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38)}"], 182s ), 182s ( 182s True, 182s [ 182s f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38).union(MARKER_PY36)}", 182s f"b==4.5.6 ; {MARKER_PY}", 182s ], 182s ), 182s ], 182s ) 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any( 182s tmp_path: Path, poetry: Poetry, dev: bool, lines: list[str], lock_version: str 182s ) -> None: 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "a", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "b", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": {"a": ">=1.2.3"}, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"a": [], "b": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][0]["groups"] = ["main", "dev"] 182s lock_data["package"][0]["markers"] = {"main": "python_version < '3.8'"} 182s lock_data["package"][1]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s 182s root = poetry.package.with_dependency_groups([], only=True) 182s root.add_dependency( 182s Factory.create_dependency( 182s name="a", constraint={"version": "^1.2.3", "python": "<3.8"} 182s ) 182s ) 182s root.add_dependency( 182s Factory.create_dependency( 182s name="b", constraint={"version": "^4.5.6"}, groups=["dev"] 182s ) 182s ) 182s poetry._package = root 182s 182s exporter = Exporter(poetry, NullIO()) 182s if dev: 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s > assert content.strip() == "\n".join(lines) 182s E assert 'a==1.2.3 ; p...rsion < "4.0"' == 'a==1.2.3 ; p...sion == "2.7"' 182s E 182s E - a==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + a==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - b==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 182s E 182s E ...Full output truncated (2 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:592: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled[1.1] _ 182s [gw3] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw3/test_exporter_can_export_requi4') 182s poetry = , lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.with_hashes(False) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s bar==4.5.6 ; {MARKER_PY} 182s foo==1.2.3 ; {MARKER_PY} 182s """ 182s 182s > assert content == expected 182s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 182s E 182s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 182s E 182s E ...Full output truncated (2 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:746: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s __ test_exporter_can_export_requirements_txt_with_nested_packages_cyclic[2.1] __ 182s [gw4] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw4/test_exporter_can_export_requi1') 182s poetry = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_nested_packages_cyclic( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": {"bar": {"version": "4.5.6"}}, 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": {"baz": {"version": "7.8.9"}}, 182s }, 182s { 182s "name": "baz", 182s "version": "7.8.9", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": {"foo": {"version": "1.2.3"}}, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": [], "bar": [], "baz": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, skip={"bar", "baz"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s bar==4.5.6 ; {MARKER_PY} 182s baz==7.8.9 ; {MARKER_PY} 182s foo==1.2.3 ; {MARKER_PY} 182s """ 182s 182s > assert content == expected 182s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 182s E 182s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - baz==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 182s E 182s E ...Full output truncated (6 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:1176: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers[1.1] _ 182s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_can_export_requi10') 182s poetry = , lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": { 182s "bar": [ 182s { 182s "version": ">=1.2.3,<7.8.10", 182s "markers": 'platform_system != "Windows"', 182s }, 182s { 182s "version": ">=4.5.6,<7.8.10", 182s "markers": 'platform_system == "Windows"', 182s }, 182s ] 182s }, 182s }, 182s { 182s "name": "bar", 182s "version": "7.8.9", 182s "optional": True, 182s "python-versions": "*", 182s "dependencies": { 182s "baz": { 182s "version": "!=10.11.12", 182s "markers": 'platform_system == "Windows"', 182s } 182s }, 182s }, 182s { 182s "name": "baz", 182s "version": "10.11.13", 182s "optional": True, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": [], "bar": [], "baz": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][2]["markers"] = 'platform_system == "Windows"' 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.with_hashes(False) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s marker_py_not_windows = MARKER_PY.intersect( 182s parse_marker('platform_system != "Windows"') 182s ) 182s expected = f"""\ 182s bar==7.8.9 ; {marker_py_not_windows.union(MARKER_PY_WINDOWS)} 182s baz==10.11.13 ; {MARKER_PY_WINDOWS} 182s foo==1.2.3 ; {MARKER_PY} 182s """ 182s 182s > assert content == expected 182s E assert 'bar==7.8.9 ;...ion < "4.0"\n' == 'bar==7.8.9 ;...on == "2.7"\n' 182s E 182s E - bar==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==7.8.9 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - baz==10.11.13 ; (python_version >= "3.6" or python_version == "2.7") and platform_system == "Windows" and python_version < "4.0" 182s E + baz==10.11.13 ; (python_version == "2.7" or python_version >= "3.6") and python_version < "4.0" and platform_system == "Windows"... 182s E 182s E ...Full output truncated (4 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:1289: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_can_export_requirements_txt_with_directory_packages_editable[1.1] _ 182s [gw5] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw5/test_exporter_can_export_requi5') 182s poetry = 182s fixture_root_uri = 'file:///tmp/autopkgtest.C8nkQ3/autopkgtest_tmp/build/tests/fixtures' 182s lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_directory_packages_editable( 182s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 182s ) -> None: 182s lock_data = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s "develop": True, 182s "source": { 182s "type": "directory", 182s "url": "sample_project", 182s "reference": "", 182s }, 182s } 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s -e {fixture_root_uri}/sample_project ; {MARKER_PY} 182s """ 182s 182s > assert content == expected 182s E assert '-e file:///t...ion < "4.0"\n' == '-e file:///t...on == "2.7"\n' 182s E 182s E Skipping 93 identical leading characters in diff, use -v to show 182s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s 182s tests/test_exporter.py:1419: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_can_export_requirements_txt_with_nested_directory_packages[2.1] _ 182s [gw3] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw3/test_exporter_can_export_requi5') 182s poetry = 182s fixture_root_uri = 'file:///tmp/autopkgtest.C8nkQ3/autopkgtest_tmp/build/tests/fixtures' 182s lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_nested_directory_packages( 182s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 182s ) -> None: 182s lock_data = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "directory", 182s "url": "sample_project", 182s "reference": "", 182s }, 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "directory", 182s "url": "sample_project/../project_with_nested_local/bar", 182s "reference": "", 182s }, 182s }, 182s { 182s "name": "baz", 182s "version": "7.8.9", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "directory", 182s "url": "sample_project/../project_with_nested_local/bar/..", 182s "reference": "", 182s }, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": [], "bar": [], "baz": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s bar @ {fixture_root_uri}/project_with_nested_local/bar ; {MARKER_PY} 182s baz @ {fixture_root_uri}/project_with_nested_local ; {MARKER_PY} 182s foo @ {fixture_root_uri}/sample_project ; {MARKER_PY} 182s """ 182s 182s > assert content == expected 182s E assert 'bar @ file:/...ion < "4.0"\n' == 'bar @ file:/...on == "2.7"\n' 182s E 182s E Skipping 111 identical leading characters in diff, use -v to show 182s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - baz @ file:///tmp/autopkgtest.C8nkQ3/autopkgtest_tmp/build/tests/fixtures/project_with_nested_local ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"... 182s E 182s E ...Full output truncated (7 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:1485: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_can_export_requirements_txt_with_circular_root_dependency[1.1] _ 182s [gw4] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw4/test_exporter_can_export_requi2') 182s poetry = , lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_circular_root_dependency( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": {poetry.package.pretty_name: {"version": "1.2.3"}}, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s foo==1.2.3 ; {MARKER_PY} 182s """ 182s 182s > assert content == expected 182s E assert 'foo==1.2.3 ;...ion < "4.0"\n' == 'foo==1.2.3 ;...on == "2.7"\n' 182s E 182s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s 182s tests/test_exporter.py:1214: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s ____ test_exporter_can_export_requirements_txt_with_directory_packages[1.1] ____ 182s [gw2] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw2/test_exporter_can_export_requi1') 182s poetry = 182s fixture_root_uri = 'file:///tmp/autopkgtest.C8nkQ3/autopkgtest_tmp/build/tests/fixtures' 182s lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_directory_packages( 182s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 182s ) -> None: 182s lock_data = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "directory", 182s "url": "sample_project", 182s "reference": "", 182s }, 182s } 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s foo @ {fixture_root_uri}/sample_project ; {MARKER_PY} 182s """ 182s 182s > assert content == expected 182s E assert 'foo @ file:/...ion < "4.0"\n' == 'foo @ file:/...on == "2.7"\n' 182s E 182s E Skipping 96 identical leading characters in diff, use -v to show 182s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s 182s tests/test_exporter.py:1376: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers[2.1] _ 182s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_can_export_requi11') 182s poetry = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": { 182s "bar": [ 182s { 182s "version": ">=1.2.3,<7.8.10", 182s "markers": 'platform_system != "Windows"', 182s }, 182s { 182s "version": ">=4.5.6,<7.8.10", 182s "markers": 'platform_system == "Windows"', 182s }, 182s ] 182s }, 182s }, 182s { 182s "name": "bar", 182s "version": "7.8.9", 182s "optional": True, 182s "python-versions": "*", 182s "dependencies": { 182s "baz": { 182s "version": "!=10.11.12", 182s "markers": 'platform_system == "Windows"', 182s } 182s }, 182s }, 182s { 182s "name": "baz", 182s "version": "10.11.13", 182s "optional": True, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": [], "bar": [], "baz": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][2]["markers"] = 'platform_system == "Windows"' 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.with_hashes(False) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s marker_py_not_windows = MARKER_PY.intersect( 182s parse_marker('platform_system != "Windows"') 182s ) 182s expected = f"""\ 182s bar==7.8.9 ; {marker_py_not_windows.union(MARKER_PY_WINDOWS)} 182s baz==10.11.13 ; {MARKER_PY_WINDOWS} 182s foo==1.2.3 ; {MARKER_PY} 182s """ 182s 182s > assert content == expected 182s E assert 'bar==7.8.9 ;...ion < "4.0"\n' == 'bar==7.8.9 ;...on == "2.7"\n' 182s E 182s E - bar==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==7.8.9 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - baz==10.11.13 ; (python_version >= "3.6" or python_version == "2.7") and platform_system == "Windows" and python_version < "4.0" 182s E + baz==10.11.13 ; (python_version == "2.7" or python_version >= "3.6") and python_version < "4.0" and platform_system == "Windows"... 182s E 182s E ...Full output truncated (4 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:1289: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_can_export_requirements_txt_with_directory_packages_editable[2.1] _ 182s [gw5] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw5/test_exporter_can_export_requi6') 182s poetry = 182s fixture_root_uri = 'file:///tmp/autopkgtest.C8nkQ3/autopkgtest_tmp/build/tests/fixtures' 182s lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_directory_packages_editable( 182s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 182s ) -> None: 182s lock_data = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s "develop": True, 182s "source": { 182s "type": "directory", 182s "url": "sample_project", 182s "reference": "", 182s }, 182s } 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s -e {fixture_root_uri}/sample_project ; {MARKER_PY} 182s """ 182s 182s > assert content == expected 182s E assert '-e file:///t...ion < "4.0"\n' == '-e file:///t...on == "2.7"\n' 182s E 182s E Skipping 93 identical leading characters in diff, use -v to show 182s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s 182s tests/test_exporter.py:1419: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_can_export_requirements_txt_with_circular_root_dependency[2.1] _ 182s [gw4] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw4/test_exporter_can_export_requi3') 182s poetry = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_circular_root_dependency( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": {poetry.package.pretty_name: {"version": "1.2.3"}}, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s foo==1.2.3 ; {MARKER_PY} 182s """ 182s 182s > assert content == expected 182s E assert 'foo==1.2.3 ;...ion < "4.0"\n' == 'foo==1.2.3 ;...on == "2.7"\n' 182s E 182s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s 182s tests/test_exporter.py:1214: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s ____ test_exporter_can_export_requirements_txt_with_directory_packages[2.1] ____ 182s [gw2] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw2/test_exporter_can_export_requi2') 182s poetry = 182s fixture_root_uri = 'file:///tmp/autopkgtest.C8nkQ3/autopkgtest_tmp/build/tests/fixtures' 182s lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_directory_packages( 182s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 182s ) -> None: 182s lock_data = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "directory", 182s "url": "sample_project", 182s "reference": "", 182s }, 182s } 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s foo @ {fixture_root_uri}/sample_project ; {MARKER_PY} 182s """ 182s 182s > assert content == expected 182s E assert 'foo @ file:/...ion < "4.0"\n' == 'foo @ file:/...on == "2.7"\n' 182s E 182s E Skipping 96 identical leading characters in diff, use -v to show 182s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s 182s tests/test_exporter.py:1376: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _______ test_exporter_can_export_requirements_txt_with_git_packages[2.1] _______ 182s [gw7] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw7/test_exporter_can_export_requi0') 182s poetry = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_git_packages( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "git", 182s "url": "https://github.com/foo/foo.git", 182s "reference": "123456", 182s "resolved_reference": "abcdef", 182s }, 182s } 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s foo @ git+https://github.com/foo/foo.git@abcdef ; {MARKER_PY} 182s """ 182s 182s > assert content == expected 182s E assert 'foo @ git+ht...ion < "4.0"\n' == 'foo @ git+ht...on == "2.7"\n' 182s E 182s E Skipping 55 identical leading characters in diff, use -v to show 182s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s 182s tests/test_exporter.py:1066: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_can_export_requirements_txt_with_nested_directory_packages[1.1] _ 182s [gw5] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw5/test_exporter_can_export_requi7') 182s poetry = 182s fixture_root_uri = 'file:///tmp/autopkgtest.C8nkQ3/autopkgtest_tmp/build/tests/fixtures' 182s lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_nested_directory_packages( 182s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 182s ) -> None: 182s lock_data = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "directory", 182s "url": "sample_project", 182s "reference": "", 182s }, 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "directory", 182s "url": "sample_project/../project_with_nested_local/bar", 182s "reference": "", 182s }, 182s }, 182s { 182s "name": "baz", 182s "version": "7.8.9", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "directory", 182s "url": "sample_project/../project_with_nested_local/bar/..", 182s "reference": "", 182s }, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": [], "bar": [], "baz": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s bar @ {fixture_root_uri}/project_with_nested_local/bar ; {MARKER_PY} 182s baz @ {fixture_root_uri}/project_with_nested_local ; {MARKER_PY} 182s foo @ {fixture_root_uri}/sample_project ; {MARKER_PY} 182s """ 182s 182s > assert content == expected 182s E assert 'bar @ file:/...ion < "4.0"\n' == 'bar @ file:/...on == "2.7"\n' 182s E 182s E Skipping 111 identical leading characters in diff, use -v to show 182s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - baz @ file:///tmp/autopkgtest.C8nkQ3/autopkgtest_tmp/build/tests/fixtures/project_with_nested_local ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"... 182s E 182s E ...Full output truncated (7 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:1485: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s __________ test_exporter_exports_requirements_txt_with_url_false[1.1] __________ 182s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_exports_requirem3') 182s poetry = , lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_with_url_false( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s poetry.pool.add_repository( 182s LegacyRepository( 182s "custom", 182s "https://example.com/simple", 182s ) 182s ) 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "legacy", 182s "url": "https://example.com/simple", 182s "reference": "", 182s }, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][1]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, dev={"bar"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.with_urls(False) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s bar==4.5.6 ; {MARKER_PY} \\ 182s --hash=sha256:67890 182s foo==1.2.3 ; {MARKER_PY} \\ 182s --hash=sha256:12345 182s """ 182s 182s > assert content == expected 182s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 182s E 182s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:67890 182s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 182s E 182s E ...Full output truncated (4 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:1747: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host[1.1] _ 182s [gw3] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw3/test_exporter_exports_requirem0') 182s poetry = , lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s poetry.pool.add_repository( 182s LegacyRepository( 182s "custom", 182s "http://example.com/simple", 182s ) 182s ) 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "legacy", 182s "url": "http://example.com/simple", 182s "reference": "", 182s }, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][0]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, dev={"bar"}) 182s exporter = Exporter(poetry, NullIO()) 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s --trusted-host example.com 182s --extra-index-url http://example.com/simple 182s 182s bar==4.5.6 ; {MARKER_PY} \\ 182s --hash=sha256:67890 182s """ 182s 182s > assert content == expected 182s E assert '--trusted-ho...ha256:67890\n' == '--trusted-ho...ha256:67890\n' 182s E 182s E Skipping 90 identical leading characters in diff, use -v to show 182s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:67890 182s 182s tests/test_exporter.py:1803: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _______ test_exporter_exports_requirements_txt_with_legacy_packages[1.1] _______ 182s [gw2] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw2/test_exporter_exports_requirem4') 182s poetry = , lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_with_legacy_packages( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s poetry.pool.add_repository( 182s LegacyRepository( 182s "custom", 182s "https://example.com/simple", 182s ) 182s ) 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "legacy", 182s "url": "https://example.com/simple", 182s "reference": "", 182s }, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][1]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, dev={"bar"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s --extra-index-url https://example.com/simple 182s 182s bar==4.5.6 ; {MARKER_PY} \\ 182s --hash=sha256:67890 182s foo==1.2.3 ; {MARKER_PY} \\ 182s --hash=sha256:12345 182s """ 182s 182s > assert content == expected 182s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 182s E 182s E Skipping 64 identical leading characters in diff, use -v to show 182s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:67890... 182s E 182s E ...Full output truncated (5 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:1683: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s __ test_exporter_exports_requirements_txt_with_dev_extras[1.1-True-expected0] __ 182s [gw5] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw5/test_exporter_exports_requirem0') 182s poetry = , dev = True 182s expected = ['bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'baz==1.2.3 ; python_ve...python_version == "2.7"', 'foo==1.2.1 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 182s lock_version = '1.1' 182s 182s @pytest.mark.parametrize( 182s ["dev", "expected"], 182s [ 182s ( 182s True, 182s [ 182s f"bar==1.2.2 ; {MARKER_PY}", 182s f"baz==1.2.3 ; {MARKER_PY}", 182s f"foo==1.2.1 ; {MARKER_PY}", 182s ], 182s ), 182s ( 182s False, 182s [ 182s f"bar==1.2.2 ; {MARKER_PY}", 182s f"foo==1.2.1 ; {MARKER_PY}", 182s ], 182s ), 182s ], 182s ) 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_with_dev_extras( 182s tmp_path: Path, poetry: Poetry, dev: bool, expected: list[str], lock_version: str 182s ) -> None: 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.1", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "1.2.2", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": { 182s "baz": { 182s "version": ">=0.1.0", 182s "optional": True, 182s "markers": "extra == 'baz'", 182s } 182s }, 182s "extras": {"baz": ["baz (>=0.1.0)"]}, 182s }, 182s { 182s "name": "baz", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": [], "bar": [], "baz": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][2]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, dev={"baz"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s if dev: 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s > assert content == "\n".join(expected) + "\n" 182s E assert 'bar==1.2.2 ;...ion < "4.0"\n' == 'bar==1.2.2 ;...on == "2.7"\n' 182s E 182s E - bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==1.2.2 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - baz==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 182s E 182s E ...Full output truncated (6 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:1880: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s __________ test_exporter_exports_requirements_txt_with_url_false[2.1] __________ 182s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_exports_requirem4') 182s poetry = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_with_url_false( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s poetry.pool.add_repository( 182s LegacyRepository( 182s "custom", 182s "https://example.com/simple", 182s ) 182s ) 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "legacy", 182s "url": "https://example.com/simple", 182s "reference": "", 182s }, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][1]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, dev={"bar"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.with_urls(False) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s bar==4.5.6 ; {MARKER_PY} \\ 182s --hash=sha256:67890 182s foo==1.2.3 ; {MARKER_PY} \\ 182s --hash=sha256:12345 182s """ 182s 182s > assert content == expected 182s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 182s E 182s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:67890 182s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 182s E 182s E ...Full output truncated (4 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:1747: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host[2.1] _ 182s [gw3] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw3/test_exporter_exports_requirem1') 182s poetry = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s poetry.pool.add_repository( 182s LegacyRepository( 182s "custom", 182s "http://example.com/simple", 182s ) 182s ) 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "legacy", 182s "url": "http://example.com/simple", 182s "reference": "", 182s }, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][0]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, dev={"bar"}) 182s exporter = Exporter(poetry, NullIO()) 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s --trusted-host example.com 182s --extra-index-url http://example.com/simple 182s 182s bar==4.5.6 ; {MARKER_PY} \\ 182s --hash=sha256:67890 182s """ 182s 182s > assert content == expected 182s E assert '--trusted-ho...ha256:67890\n' == '--trusted-ho...ha256:67890\n' 182s E 182s E Skipping 90 identical leading characters in diff, use -v to show 182s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:67890 182s 182s tests/test_exporter.py:1803: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _______ test_exporter_exports_requirements_txt_with_legacy_packages[2.1] _______ 182s [gw2] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw2/test_exporter_exports_requirem5') 182s poetry = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_with_legacy_packages( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s poetry.pool.add_repository( 182s LegacyRepository( 182s "custom", 182s "https://example.com/simple", 182s ) 182s ) 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "legacy", 182s "url": "https://example.com/simple", 182s "reference": "", 182s }, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][1]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, dev={"bar"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s --extra-index-url https://example.com/simple 182s 182s bar==4.5.6 ; {MARKER_PY} \\ 182s --hash=sha256:67890 182s foo==1.2.3 ; {MARKER_PY} \\ 182s --hash=sha256:12345 182s """ 182s 182s > assert content == expected 182s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 182s E 182s E Skipping 64 identical leading characters in diff, use -v to show 182s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:67890... 182s E 182s E ...Full output truncated (5 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:1683: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _____ test_exporter_can_export_requirements_txt_with_nested_packages[1.1] ______ 182s [gw7] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw7/test_exporter_can_export_requi1') 182s poetry = , lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_nested_packages( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "git", 182s "url": "https://github.com/foo/foo.git", 182s "reference": "123456", 182s "resolved_reference": "abcdef", 182s }, 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": { 182s "foo": { 182s "git": "https://github.com/foo/foo.git", 182s "rev": "123456", 182s } 182s }, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": [], "bar": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, skip={"foo"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s bar==4.5.6 ; {MARKER_PY} 182s foo @ git+https://github.com/foo/foo.git@abcdef ; {MARKER_PY} 182s """ 182s 182s > assert content == expected 182s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 182s E 182s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - foo @ git+https://github.com/foo/foo.git@abcdef ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 182s E 182s E ...Full output truncated (2 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:1122: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources[1.1] _ 182s [gw4] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw4/test_exporter_exports_requirem3') 182s poetry = , lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s poetry.pool.add_repository( 182s LegacyRepository( 182s "custom-example", 182s "https://example.com/simple", 182s ) 182s ) 182s poetry.pool.add_repository( 182s LegacyRepository( 182s "custom-foobaz", 182s "https://foobaz.com/simple", 182s ) 182s ) 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "legacy", 182s "url": "https://example.com/simple", 182s "reference": "", 182s }, 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "legacy", 182s "url": "https://example.com/simple", 182s "reference": "", 182s }, 182s }, 182s { 182s "name": "baz", 182s "version": "7.8.9", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "legacy", 182s "url": "https://foobaz.com/simple", 182s "reference": "", 182s }, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s "baz": [{"name": "baz.whl", "hash": "24680"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][1]["groups"] = ["dev"] 182s lock_data["package"][2]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, dev={"bar", "baz"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s --extra-index-url https://example.com/simple 182s --extra-index-url https://foobaz.com/simple 182s 182s bar==4.5.6 ; {MARKER_PY} \\ 182s --hash=sha256:67890 182s baz==7.8.9 ; {MARKER_PY} \\ 182s --hash=sha256:24680 182s foo==1.2.3 ; {MARKER_PY} \\ 182s --hash=sha256:12345 182s """ 182s 182s > assert content == expected 182s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 182s E 182s E Skipping 108 identical leading characters in diff, use -v to show 182s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:67890... 182s E 182s E ...Full output truncated (10 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:1972: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_exports_requirements_txt_with_dev_extras[1.1-False-expected1] __ 182s [gw5] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw5/test_exporter_exports_requirem1') 182s poetry = , dev = False 182s expected = ['bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'foo==1.2.1 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 182s lock_version = '1.1' 182s 182s @pytest.mark.parametrize( 182s ["dev", "expected"], 182s [ 182s ( 182s True, 182s [ 182s f"bar==1.2.2 ; {MARKER_PY}", 182s f"baz==1.2.3 ; {MARKER_PY}", 182s f"foo==1.2.1 ; {MARKER_PY}", 182s ], 182s ), 182s ( 182s False, 182s [ 182s f"bar==1.2.2 ; {MARKER_PY}", 182s f"foo==1.2.1 ; {MARKER_PY}", 182s ], 182s ), 182s ], 182s ) 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_with_dev_extras( 182s tmp_path: Path, poetry: Poetry, dev: bool, expected: list[str], lock_version: str 182s ) -> None: 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.1", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "1.2.2", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": { 182s "baz": { 182s "version": ">=0.1.0", 182s "optional": True, 182s "markers": "extra == 'baz'", 182s } 182s }, 182s "extras": {"baz": ["baz (>=0.1.0)"]}, 182s }, 182s { 182s "name": "baz", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": [], "bar": [], "baz": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][2]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, dev={"baz"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s if dev: 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s > assert content == "\n".join(expected) + "\n" 182s E assert 'bar==1.2.2 ;...ion < "4.0"\n' == 'bar==1.2.2 ;...on == "2.7"\n' 182s E 182s E - bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==1.2.2 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - foo==1.2.1 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 182s E 182s E ...Full output truncated (2 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:1880: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _____ test_exporter_exports_requirements_txt_with_two_primary_sources[1.1] _____ 182s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_exports_requirem5') 182s poetry = , lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_with_two_primary_sources( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s poetry.pool.remove_repository("PyPI") 182s poetry.config.merge( 182s { 182s "repositories": { 182s "custom-a": {"url": "https://a.example.com/simple"}, 182s "custom-b": {"url": "https://b.example.com/simple"}, 182s }, 182s "http-basic": { 182s "custom-a": {"username": "foo", "password": "bar"}, 182s "custom-b": {"username": "baz", "password": "qux"}, 182s }, 182s } 182s ) 182s poetry.pool.add_repository( 182s LegacyRepository( 182s "custom-b", 182s "https://b.example.com/simple", 182s config=poetry.config, 182s ), 182s ) 182s poetry.pool.add_repository( 182s LegacyRepository( 182s "custom-a", 182s "https://a.example.com/simple", 182s config=poetry.config, 182s ), 182s ) 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "legacy", 182s "url": "https://a.example.com/simple", 182s "reference": "", 182s }, 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "legacy", 182s "url": "https://b.example.com/simple", 182s "reference": "", 182s }, 182s }, 182s { 182s "name": "baz", 182s "version": "7.8.9", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "legacy", 182s "url": "https://b.example.com/simple", 182s "reference": "", 182s }, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s "baz": [{"name": "baz.whl", "hash": "24680"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][1]["groups"] = ["dev"] 182s lock_data["package"][2]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, dev={"bar", "baz"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.with_credentials() 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s --index-url https://baz:qux@b.example.com/simple 182s --extra-index-url https://foo:bar@a.example.com/simple 182s 182s bar==4.5.6 ; {MARKER_PY} \\ 182s --hash=sha256:67890 182s baz==7.8.9 ; {MARKER_PY} \\ 182s --hash=sha256:24680 182s foo==1.2.3 ; {MARKER_PY} \\ 182s --hash=sha256:12345 182s """ 182s 182s > assert content == expected 182s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 182s E 182s E Skipping 123 identical leading characters in diff, use -v to show 182s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:67890... 182s E 182s E ...Full output truncated (10 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:2080: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _____ test_exporter_exports_requirements_txt_with_two_primary_sources[2.1] _____ 182s [gw3] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw3/test_exporter_exports_requirem2') 182s poetry = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_with_two_primary_sources( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s poetry.pool.remove_repository("PyPI") 182s poetry.config.merge( 182s { 182s "repositories": { 182s "custom-a": {"url": "https://a.example.com/simple"}, 182s "custom-b": {"url": "https://b.example.com/simple"}, 182s }, 182s "http-basic": { 182s "custom-a": {"username": "foo", "password": "bar"}, 182s "custom-b": {"username": "baz", "password": "qux"}, 182s }, 182s } 182s ) 182s poetry.pool.add_repository( 182s LegacyRepository( 182s "custom-b", 182s "https://b.example.com/simple", 182s config=poetry.config, 182s ), 182s ) 182s poetry.pool.add_repository( 182s LegacyRepository( 182s "custom-a", 182s "https://a.example.com/simple", 182s config=poetry.config, 182s ), 182s ) 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "legacy", 182s "url": "https://a.example.com/simple", 182s "reference": "", 182s }, 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "legacy", 182s "url": "https://b.example.com/simple", 182s "reference": "", 182s }, 182s }, 182s { 182s "name": "baz", 182s "version": "7.8.9", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "legacy", 182s "url": "https://b.example.com/simple", 182s "reference": "", 182s }, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s "baz": [{"name": "baz.whl", "hash": "24680"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][1]["groups"] = ["dev"] 182s lock_data["package"][2]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, dev={"bar", "baz"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.with_credentials() 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s --index-url https://baz:qux@b.example.com/simple 182s --extra-index-url https://foo:bar@a.example.com/simple 182s 182s bar==4.5.6 ; {MARKER_PY} \\ 182s --hash=sha256:67890 182s baz==7.8.9 ; {MARKER_PY} \\ 182s --hash=sha256:24680 182s foo==1.2.3 ; {MARKER_PY} \\ 182s --hash=sha256:12345 182s """ 182s 182s > assert content == expected 182s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 182s E 182s E Skipping 123 identical leading characters in diff, use -v to show 182s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:67890... 182s E 182s E ...Full output truncated (10 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:2080: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials[1.1] _ 182s [gw2] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw2/test_exporter_exports_requirem6') 182s poetry = 182s config = , lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials( 182s tmp_path: Path, poetry: Poetry, config: Config, lock_version: str 182s ) -> None: 182s poetry.config.merge( 182s { 182s "repositories": {"custom": {"url": "https://example.com/simple"}}, 182s "http-basic": {"custom": {"username": "foo", "password": "bar"}}, 182s } 182s ) 182s poetry.pool.add_repository( 182s LegacyRepository("custom", "https://example.com/simple", config=poetry.config) 182s ) 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "legacy", 182s "url": "https://example.com/simple", 182s "reference": "", 182s }, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][1]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, dev={"bar"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.with_credentials() 182s exporter.export( 182s "requirements.txt", 182s tmp_path, 182s "requirements.txt", 182s ) 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s --extra-index-url https://foo:bar@example.com/simple 182s 182s bar==4.5.6 ; {MARKER_PY} \\ 182s --hash=sha256:67890 182s foo==1.2.3 ; {MARKER_PY} \\ 182s --hash=sha256:12345 182s """ 182s 182s > assert content == expected 182s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 182s E 182s E Skipping 72 identical leading characters in diff, use -v to show 182s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:67890... 182s E 182s E ...Full output truncated (5 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:2153: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources[2.1] _ 182s [gw4] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw4/test_exporter_exports_requirem4') 182s poetry = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s poetry.pool.add_repository( 182s LegacyRepository( 182s "custom-example", 182s "https://example.com/simple", 182s ) 182s ) 182s poetry.pool.add_repository( 182s LegacyRepository( 182s "custom-foobaz", 182s "https://foobaz.com/simple", 182s ) 182s ) 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "legacy", 182s "url": "https://example.com/simple", 182s "reference": "", 182s }, 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "legacy", 182s "url": "https://example.com/simple", 182s "reference": "", 182s }, 182s }, 182s { 182s "name": "baz", 182s "version": "7.8.9", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "legacy", 182s "url": "https://foobaz.com/simple", 182s "reference": "", 182s }, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s "baz": [{"name": "baz.whl", "hash": "24680"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][1]["groups"] = ["dev"] 182s lock_data["package"][2]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, dev={"bar", "baz"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s --extra-index-url https://example.com/simple 182s --extra-index-url https://foobaz.com/simple 182s 182s bar==4.5.6 ; {MARKER_PY} \\ 182s --hash=sha256:67890 182s baz==7.8.9 ; {MARKER_PY} \\ 182s --hash=sha256:24680 182s foo==1.2.3 ; {MARKER_PY} \\ 182s --hash=sha256:12345 182s """ 182s 182s > assert content == expected 182s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 182s E 182s E Skipping 108 identical leading characters in diff, use -v to show 182s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:67890... 182s E 182s E ...Full output truncated (10 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:1972: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _ test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials[2.1] _ 182s [gw5] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw5/test_exporter_exports_requirem2') 182s poetry = 182s config = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials( 182s tmp_path: Path, poetry: Poetry, config: Config, lock_version: str 182s ) -> None: 182s poetry.config.merge( 182s { 182s "repositories": {"custom": {"url": "https://example.com/simple"}}, 182s "http-basic": {"custom": {"username": "foo", "password": "bar"}}, 182s } 182s ) 182s poetry.pool.add_repository( 182s LegacyRepository("custom", "https://example.com/simple", config=poetry.config) 182s ) 182s lock_data: dict[str, Any] = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "legacy", 182s "url": "https://example.com/simple", 182s "reference": "", 182s }, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": { 182s "foo": [{"name": "foo.whl", "hash": "12345"}], 182s "bar": [{"name": "bar.whl", "hash": "67890"}], 182s }, 182s }, 182s } 182s fix_lock_data(lock_data) 182s if lock_version == "2.1": 182s lock_data["package"][1]["groups"] = ["dev"] 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, dev={"bar"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.only_groups([MAIN_GROUP, "dev"]) 182s exporter.with_credentials() 182s exporter.export( 182s "requirements.txt", 182s tmp_path, 182s "requirements.txt", 182s ) 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s --extra-index-url https://foo:bar@example.com/simple 182s 182s bar==4.5.6 ; {MARKER_PY} \\ 182s --hash=sha256:67890 182s foo==1.2.3 ; {MARKER_PY} \\ 182s --hash=sha256:12345 182s """ 182s 182s > assert content == expected 182s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 182s E 182s E Skipping 72 identical leading characters in diff, use -v to show 182s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E --hash=sha256:67890... 182s E 182s E ...Full output truncated (5 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:2153: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s _____ test_exporter_can_export_requirements_txt_with_nested_packages[2.1] ______ 182s [gw7] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw7/test_exporter_can_export_requi2') 182s poetry = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_can_export_requirements_txt_with_nested_packages( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s "source": { 182s "type": "git", 182s "url": "https://github.com/foo/foo.git", 182s "reference": "123456", 182s "resolved_reference": "abcdef", 182s }, 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s "dependencies": { 182s "foo": { 182s "git": "https://github.com/foo/foo.git", 182s "rev": "123456", 182s } 182s }, 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": [], "bar": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry, skip={"foo"}) 182s 182s exporter = Exporter(poetry, NullIO()) 182s exporter.export("requirements.txt", tmp_path, "requirements.txt") 182s 182s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 182s content = f.read() 182s 182s expected = f"""\ 182s bar==4.5.6 ; {MARKER_PY} 182s foo @ git+https://github.com/foo/foo.git@abcdef ; {MARKER_PY} 182s """ 182s 182s > assert content == expected 182s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 182s E 182s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - foo @ git+https://github.com/foo/foo.git@abcdef ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 182s E 182s E ...Full output truncated (2 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:1122: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s ________ test_exporter_exports_requirements_txt_to_standard_output[2.1] ________ 182s [gw3] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw3/test_exporter_exports_requirem3') 182s poetry = , lock_version = '2.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_to_standard_output( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s ], 182s "metadata": { 182s "lock-version": lock_version, 182s "python-versions": "*", 182s "content-hash": "123456789", 182s "files": {"foo": [], "bar": []}, 182s }, 182s } 182s fix_lock_data(lock_data) 182s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 182s set_package_requires(poetry) 182s 182s exporter = Exporter(poetry, NullIO()) 182s io = BufferedIO() 182s exporter.export("requirements.txt", tmp_path, io) 182s 182s expected = f"""\ 182s bar==4.5.6 ; {MARKER_PY} 182s foo==1.2.3 ; {MARKER_PY} 182s """ 182s 182s > assert io.fetch_output() == expected 182s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 182s E 182s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 182s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 182s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 182s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 182s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 182s E 182s E ...Full output truncated (2 lines hidden), use '-vv' to show 182s 182s tests/test_exporter.py:2195: AssertionError 182s ------------------------------ Captured log setup ------------------------------ 182s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 182s ________ test_exporter_exports_requirements_txt_to_standard_output[1.1] ________ 182s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 182s 182s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_exports_requirem6') 182s poetry = , lock_version = '1.1' 182s 182s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 182s def test_exporter_exports_requirements_txt_to_standard_output( 182s tmp_path: Path, poetry: Poetry, lock_version: str 182s ) -> None: 182s lock_data = { 182s "package": [ 182s { 182s "name": "foo", 182s "version": "1.2.3", 182s "optional": False, 182s "python-versions": "*", 182s }, 182s { 182s "name": "bar", 182s "version": "4.5.6", 182s "optional": False, 183s "python-versions": "*", 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": {"foo": [], "bar": []}, 183s }, 183s } 183s fix_lock_data(lock_data) 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry) 183s 183s exporter = Exporter(poetry, NullIO()) 183s io = BufferedIO() 183s exporter.export("requirements.txt", tmp_path, io) 183s 183s expected = f"""\ 183s bar==4.5.6 ; {MARKER_PY} 183s foo==1.2.3 ; {MARKER_PY} 183s """ 183s 183s > assert io.fetch_output() == expected 183s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 183s E 183s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 183s E 183s E ...Full output truncated (2 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:2195: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _____________ test_exporter_doesnt_confuse_repeated_packages[1.1] ______________ 183s [gw2] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw2/test_exporter_doesnt_confuse_r0') 183s poetry = , lock_version = '1.1' 183s 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_doesnt_confuse_repeated_packages( 183s tmp_path: Path, poetry: Poetry, lock_version: str 183s ) -> None: 183s # Testcase derived from . 183s lock_data: dict[str, Any] = { 183s "package": [ 183s { 183s "name": "celery", 183s "version": "5.1.2", 183s "optional": False, 183s "python-versions": "<3.7", 183s "dependencies": { 183s "click": ">=7.0,<8.0", 183s "click-didyoumean": ">=0.0.3", 183s "click-plugins": ">=1.1.1", 183s }, 183s }, 183s { 183s "name": "celery", 183s "version": "5.2.3", 183s "optional": False, 183s "python-versions": ">=3.7", 183s "dependencies": { 183s "click": ">=8.0.3,<9.0", 183s "click-didyoumean": ">=0.0.3", 183s "click-plugins": ">=1.1.1", 183s }, 183s }, 183s { 183s "name": "click", 183s "version": "7.1.2", 183s "optional": False, 183s "python-versions": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", 183s }, 183s { 183s "name": "click", 183s "version": "8.0.3", 183s "optional": False, 183s "python-versions": ">=3.6", 183s "dependencies": {}, 183s }, 183s { 183s "name": "click-didyoumean", 183s "version": "0.0.3", 183s "optional": False, 183s "python-versions": "*", 183s "dependencies": {"click": "*"}, 183s }, 183s { 183s "name": "click-didyoumean", 183s "version": "0.3.0", 183s "optional": False, 183s "python-versions": ">=3.6.2,<4.0.0", 183s "dependencies": {"click": ">=7"}, 183s }, 183s { 183s "name": "click-plugins", 183s "version": "1.1.1", 183s "optional": False, 183s "python-versions": "*", 183s "dependencies": {"click": ">=4.0"}, 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "^3.6", 183s "content-hash": ( 183s "832b13a88e5020c27cbcd95faa577bf0dbf054a65c023b45dc9442b640d414e6" 183s ), 183s "files": { 183s "celery": [], 183s "click-didyoumean": [], 183s "click-plugins": [], 183s "click": [], 183s }, 183s }, 183s } 183s fix_lock_data(lock_data) 183s if lock_version == "2.1": 183s lock_data["package"][0]["markers"] = "python_version < '3.7'" 183s lock_data["package"][1]["markers"] = "python_version >= '3.7'" 183s lock_data["package"][2]["markers"] = "python_version < '3.7'" 183s lock_data["package"][3]["markers"] = "python_version >= '3.7'" 183s lock_data["package"][4]["markers"] = "python_full_version < '3.6.2'" 183s lock_data["package"][5]["markers"] = "python_full_version >= '3.6.2'" 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s root = poetry.package.with_dependency_groups([], only=True) 183s root.python_versions = "^3.6" 183s root.add_dependency( 183s Factory.create_dependency( 183s name="celery", constraint={"version": "5.1.2", "python": "<3.7"} 183s ) 183s ) 183s root.add_dependency( 183s Factory.create_dependency( 183s name="celery", constraint={"version": "5.2.3", "python": ">=3.7"} 183s ) 183s ) 183s poetry._package = root 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.only_groups([MAIN_GROUP, "dev"]) 183s io = BufferedIO() 183s exporter.export("requirements.txt", tmp_path, io) 183s 183s expected = f"""\ 183s celery==5.1.2 ; {MARKER_PY36_ONLY} 183s celery==5.2.3 ; {MARKER_PY37} 183s click-didyoumean==0.0.3 ; {MARKER_PY36_PY362} 183s click-didyoumean==0.3.0 ; {MARKER_PY362_PY40} 183s click-plugins==1.1.1 ; {MARKER_PY36} 183s click==7.1.2 ; {MARKER_PY36_ONLY} 183s click==8.0.3 ; {MARKER_PY37} 183s """ 183s 183s > assert io.fetch_output() == expected 183s E assert 'celery==5.1....ion < "4.0"\n' == 'celery==5.1....ion < "4.0"\n' 183s E 183s E Skipping 130 identical leading characters in diff, use -v to show 183s E Skipping 256 identical trailing characters in diff, use -v to show 183s E - ; python_version >= "3.6" and python_full_version < "3.6.2" 183s E + ; python_full_version < "3.6.2" and python_version == "3.6" 183s E click-d 183s 183s tests/test_exporter.py:2314: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s __ test_exporter_can_export_requirements_txt_with_nested_packages_cyclic[1.1] __ 183s [gw7] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw7/test_exporter_can_export_requi3') 183s poetry = , lock_version = '1.1' 183s 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_can_export_requirements_txt_with_nested_packages_cyclic( 183s tmp_path: Path, poetry: Poetry, lock_version: str 183s ) -> None: 183s lock_data = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "dependencies": {"bar": {"version": "4.5.6"}}, 183s }, 183s { 183s "name": "bar", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "dependencies": {"baz": {"version": "7.8.9"}}, 183s }, 183s { 183s "name": "baz", 183s "version": "7.8.9", 183s "optional": False, 183s "python-versions": "*", 183s "dependencies": {"foo": {"version": "1.2.3"}}, 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": {"foo": [], "bar": [], "baz": []}, 183s }, 183s } 183s fix_lock_data(lock_data) 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry, skip={"bar", "baz"}) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s expected = f"""\ 183s bar==4.5.6 ; {MARKER_PY} 183s baz==7.8.9 ; {MARKER_PY} 183s foo==1.2.3 ; {MARKER_PY} 183s """ 183s 183s > assert content == expected 183s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 183s E 183s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E - baz==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 183s E 183s E ...Full output truncated (6 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:1176: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _ test_exporter_omits_and_includes_extras_for_txt_formats[2.1-constraints.txt-expected0] _ 183s [gw5] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw5/test_exporter_omits_and_includ0') 183s poetry = , fmt = 'constraints.txt' 183s expected = ['bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'baz==7.8.9 ; python_ve...python_version == "2.7"', 'foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 183s lock_version = '2.1' 183s 183s @pytest.mark.parametrize( 183s ["fmt", "expected"], 183s [ 183s ( 183s "constraints.txt", 183s [ 183s f"bar==4.5.6 ; {MARKER_PY}", 183s f"baz==7.8.9 ; {MARKER_PY}", 183s f"foo==1.2.3 ; {MARKER_PY}", 183s ], 183s ), 183s ( 183s "requirements.txt", 183s [ 183s f"bar==4.5.6 ; {MARKER_PY}", 183s f"bar[baz]==4.5.6 ; {MARKER_PY}", 183s f"baz==7.8.9 ; {MARKER_PY}", 183s f"foo==1.2.3 ; {MARKER_PY}", 183s ], 183s ), 183s ], 183s ) 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_omits_and_includes_extras_for_txt_formats( 183s tmp_path: Path, poetry: Poetry, fmt: str, expected: list[str], lock_version: str 183s ) -> None: 183s lock_data = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "dependencies": { 183s "bar": { 183s "extras": ["baz"], 183s "version": ">=0.1.0", 183s } 183s }, 183s }, 183s { 183s "name": "bar", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "dependencies": { 183s "baz": { 183s "version": ">=0.1.0", 183s "optional": True, 183s "markers": "extra == 'baz'", 183s } 183s }, 183s "extras": {"baz": ["baz (>=0.1.0)"]}, 183s }, 183s { 183s "name": "baz", 183s "version": "7.8.9", 183s "optional": False, 183s "python-versions": "*", 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": {"foo": [], "bar": [], "baz": []}, 183s }, 183s } 183s fix_lock_data(lock_data) 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.export(fmt, tmp_path, "exported.txt") 183s 183s with (tmp_path / "exported.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s # It does not matter whether packages are exported with extras or not 183s # because all dependencies are listed explicitly. 183s if lock_version == "2.1": 183s expected = [req for req in expected if not req.startswith("bar[baz]")] 183s > assert content == "\n".join(expected) + "\n" 183s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 183s E 183s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E - baz==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 183s E 183s E ...Full output truncated (6 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:2703: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s __ test_exporter_exports_requirements_txt_with_dev_extras[2.1-True-expected0] __ 183s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem0') 183s poetry = , dev = True 183s expected = ['bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'baz==1.2.3 ; python_ve...python_version == "2.7"', 'foo==1.2.1 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 183s lock_version = '2.1' 183s 183s @pytest.mark.parametrize( 183s ["dev", "expected"], 183s [ 183s ( 183s True, 183s [ 183s f"bar==1.2.2 ; {MARKER_PY}", 183s f"baz==1.2.3 ; {MARKER_PY}", 183s f"foo==1.2.1 ; {MARKER_PY}", 183s ], 183s ), 183s ( 183s False, 183s [ 183s f"bar==1.2.2 ; {MARKER_PY}", 183s f"foo==1.2.1 ; {MARKER_PY}", 183s ], 183s ), 183s ], 183s ) 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_exports_requirements_txt_with_dev_extras( 183s tmp_path: Path, poetry: Poetry, dev: bool, expected: list[str], lock_version: str 183s ) -> None: 183s lock_data: dict[str, Any] = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.1", 183s "optional": False, 183s "python-versions": "*", 183s }, 183s { 183s "name": "bar", 183s "version": "1.2.2", 183s "optional": False, 183s "python-versions": "*", 183s "dependencies": { 183s "baz": { 183s "version": ">=0.1.0", 183s "optional": True, 183s "markers": "extra == 'baz'", 183s } 183s }, 183s "extras": {"baz": ["baz (>=0.1.0)"]}, 183s }, 183s { 183s "name": "baz", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": {"foo": [], "bar": [], "baz": []}, 183s }, 183s } 183s fix_lock_data(lock_data) 183s if lock_version == "2.1": 183s lock_data["package"][2]["groups"] = ["dev"] 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry, dev={"baz"}) 183s 183s exporter = Exporter(poetry, NullIO()) 183s if dev: 183s exporter.only_groups([MAIN_GROUP, "dev"]) 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s > assert content == "\n".join(expected) + "\n" 183s E assert 'bar==1.2.2 ;...ion < "4.0"\n' == 'bar==1.2.2 ;...on == "2.7"\n' 183s E 183s E - bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + bar==1.2.2 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E - baz==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 183s E 183s E ...Full output truncated (6 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:1880: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _ test_exporter_omits_and_includes_extras_for_txt_formats[1.1-requirements.txt-expected1] _ 183s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_omits_and_includ0') 183s poetry = , fmt = 'requirements.txt' 183s expected = ['bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'bar[baz]==4.5.6 ; pyth...python_version == "2.7"', 'foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 183s lock_version = '1.1' 183s 183s @pytest.mark.parametrize( 183s ["fmt", "expected"], 183s [ 183s ( 183s "constraints.txt", 183s [ 183s f"bar==4.5.6 ; {MARKER_PY}", 183s f"baz==7.8.9 ; {MARKER_PY}", 183s f"foo==1.2.3 ; {MARKER_PY}", 183s ], 183s ), 183s ( 183s "requirements.txt", 183s [ 183s f"bar==4.5.6 ; {MARKER_PY}", 183s f"bar[baz]==4.5.6 ; {MARKER_PY}", 183s f"baz==7.8.9 ; {MARKER_PY}", 183s f"foo==1.2.3 ; {MARKER_PY}", 183s ], 183s ), 183s ], 183s ) 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_omits_and_includes_extras_for_txt_formats( 183s tmp_path: Path, poetry: Poetry, fmt: str, expected: list[str], lock_version: str 183s ) -> None: 183s lock_data = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "dependencies": { 183s "bar": { 183s "extras": ["baz"], 183s "version": ">=0.1.0", 183s } 183s }, 183s }, 183s { 183s "name": "bar", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "dependencies": { 183s "baz": { 183s "version": ">=0.1.0", 183s "optional": True, 183s "markers": "extra == 'baz'", 183s } 183s }, 183s "extras": {"baz": ["baz (>=0.1.0)"]}, 183s }, 183s { 183s "name": "baz", 183s "version": "7.8.9", 183s "optional": False, 183s "python-versions": "*", 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": {"foo": [], "bar": [], "baz": []}, 183s }, 183s } 183s fix_lock_data(lock_data) 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.export(fmt, tmp_path, "exported.txt") 183s 183s with (tmp_path / "exported.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s # It does not matter whether packages are exported with extras or not 183s # because all dependencies are listed explicitly. 183s if lock_version == "2.1": 183s expected = [req for req in expected if not req.startswith("bar[baz]")] 183s > assert content == "\n".join(expected) + "\n" 183s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 183s E 183s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E - bar[baz]==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 183s E 183s E ...Full output truncated (10 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:2703: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _ test_exporter_omits_and_includes_extras_for_txt_formats[1.1-constraints.txt-expected0] _ 183s [gw3] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw3/test_exporter_omits_and_includ0') 183s poetry = , fmt = 'constraints.txt' 183s expected = ['bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'baz==7.8.9 ; python_ve...python_version == "2.7"', 'foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 183s lock_version = '1.1' 183s 183s @pytest.mark.parametrize( 183s ["fmt", "expected"], 183s [ 183s ( 183s "constraints.txt", 183s [ 183s f"bar==4.5.6 ; {MARKER_PY}", 183s f"baz==7.8.9 ; {MARKER_PY}", 183s f"foo==1.2.3 ; {MARKER_PY}", 183s ], 183s ), 183s ( 183s "requirements.txt", 183s [ 183s f"bar==4.5.6 ; {MARKER_PY}", 183s f"bar[baz]==4.5.6 ; {MARKER_PY}", 183s f"baz==7.8.9 ; {MARKER_PY}", 183s f"foo==1.2.3 ; {MARKER_PY}", 183s ], 183s ), 183s ], 183s ) 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_omits_and_includes_extras_for_txt_formats( 183s tmp_path: Path, poetry: Poetry, fmt: str, expected: list[str], lock_version: str 183s ) -> None: 183s lock_data = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "dependencies": { 183s "bar": { 183s "extras": ["baz"], 183s "version": ">=0.1.0", 183s } 183s }, 183s }, 183s { 183s "name": "bar", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "dependencies": { 183s "baz": { 183s "version": ">=0.1.0", 183s "optional": True, 183s "markers": "extra == 'baz'", 183s } 183s }, 183s "extras": {"baz": ["baz (>=0.1.0)"]}, 183s }, 183s { 183s "name": "baz", 183s "version": "7.8.9", 183s "optional": False, 183s "python-versions": "*", 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": {"foo": [], "bar": [], "baz": []}, 183s }, 183s } 183s fix_lock_data(lock_data) 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.export(fmt, tmp_path, "exported.txt") 183s 183s with (tmp_path / "exported.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s # It does not matter whether packages are exported with extras or not 183s # because all dependencies are listed explicitly. 183s if lock_version == "2.1": 183s expected = [req for req in expected if not req.startswith("bar[baz]")] 183s > assert content == "\n".join(expected) + "\n" 183s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 183s E 183s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E - baz==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 183s E 183s E ...Full output truncated (6 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:2703: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _ test_exporter_omits_and_includes_extras_for_txt_formats[2.1-requirements.txt-expected1] _ 183s [gw2] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw2/test_exporter_omits_and_includ0') 183s poetry = , fmt = 'requirements.txt' 183s expected = ['bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'baz==7.8.9 ; python_ve...python_version == "2.7"', 'foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 183s lock_version = '2.1' 183s 183s @pytest.mark.parametrize( 183s ["fmt", "expected"], 183s [ 183s ( 183s "constraints.txt", 183s [ 183s f"bar==4.5.6 ; {MARKER_PY}", 183s f"baz==7.8.9 ; {MARKER_PY}", 183s f"foo==1.2.3 ; {MARKER_PY}", 183s ], 183s ), 183s ( 183s "requirements.txt", 183s [ 183s f"bar==4.5.6 ; {MARKER_PY}", 183s f"bar[baz]==4.5.6 ; {MARKER_PY}", 183s f"baz==7.8.9 ; {MARKER_PY}", 183s f"foo==1.2.3 ; {MARKER_PY}", 183s ], 183s ), 183s ], 183s ) 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_omits_and_includes_extras_for_txt_formats( 183s tmp_path: Path, poetry: Poetry, fmt: str, expected: list[str], lock_version: str 183s ) -> None: 183s lock_data = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "dependencies": { 183s "bar": { 183s "extras": ["baz"], 183s "version": ">=0.1.0", 183s } 183s }, 183s }, 183s { 183s "name": "bar", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "dependencies": { 183s "baz": { 183s "version": ">=0.1.0", 183s "optional": True, 183s "markers": "extra == 'baz'", 183s } 183s }, 183s "extras": {"baz": ["baz (>=0.1.0)"]}, 183s }, 183s { 183s "name": "baz", 183s "version": "7.8.9", 183s "optional": False, 183s "python-versions": "*", 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": {"foo": [], "bar": [], "baz": []}, 183s }, 183s } 183s fix_lock_data(lock_data) 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.export(fmt, tmp_path, "exported.txt") 183s 183s with (tmp_path / "exported.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s # It does not matter whether packages are exported with extras or not 183s # because all dependencies are listed explicitly. 183s if lock_version == "2.1": 183s expected = [req for req in expected if not req.startswith("bar[baz]")] 183s > assert content == "\n".join(expected) + "\n" 183s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 183s E 183s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E - baz==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 183s E 183s E ...Full output truncated (6 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:2703: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _ test_exporter_prints_warning_for_constraints_txt_with_editable_packages[2.1] _ 183s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_prints_warning_f0') 183s poetry = , lock_version = '2.1' 183s 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_prints_warning_for_constraints_txt_with_editable_packages( 183s tmp_path: Path, poetry: Poetry, lock_version: str 183s ) -> None: 183s lock_data = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "git", 183s "url": "https://github.com/foo/foo.git", 183s "reference": "123456", 183s }, 183s "develop": True, 183s }, 183s { 183s "name": "bar", 183s "version": "7.8.9", 183s "optional": False, 183s "python-versions": "*", 183s }, 183s { 183s "name": "baz", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "directory", 183s "url": "sample_project", 183s "reference": "", 183s }, 183s "develop": True, 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": {"foo": [], "bar": [], "baz": []}, 183s }, 183s } 183s fix_lock_data(lock_data) 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry) 183s 183s io = BufferedIO() 183s exporter = Exporter(poetry, io) 183s exporter.export("constraints.txt", tmp_path, "constraints.txt") 183s 183s expected_error_out = ( 183s "Warning: foo is locked in develop (editable) mode, which is " 183s "incompatible with the constraints.txt format.\n" 183s "Warning: baz is locked in develop (editable) mode, which is " 183s "incompatible with the constraints.txt format.\n" 183s ) 183s 183s assert io.fetch_error() == expected_error_out 183s 183s with (tmp_path / "constraints.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s > assert content == f"bar==7.8.9 ; {MARKER_PY}\n" 183s E assert 'bar==7.8.9 ;...ion < "4.0"\n' == 'bar==7.8.9 ;...on == "2.7"\n' 183s E 183s E - bar==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + bar==7.8.9 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s 183s tests/test_exporter.py:2770: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _ test_exporter_prints_warning_for_constraints_txt_with_editable_packages[1.1] _ 183s [gw3] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw3/test_exporter_prints_warning_f0') 183s poetry = , lock_version = '1.1' 183s 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_prints_warning_for_constraints_txt_with_editable_packages( 183s tmp_path: Path, poetry: Poetry, lock_version: str 183s ) -> None: 183s lock_data = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "git", 183s "url": "https://github.com/foo/foo.git", 183s "reference": "123456", 183s }, 183s "develop": True, 183s }, 183s { 183s "name": "bar", 183s "version": "7.8.9", 183s "optional": False, 183s "python-versions": "*", 183s }, 183s { 183s "name": "baz", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "directory", 183s "url": "sample_project", 183s "reference": "", 183s }, 183s "develop": True, 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": {"foo": [], "bar": [], "baz": []}, 183s }, 183s } 183s fix_lock_data(lock_data) 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry) 183s 183s io = BufferedIO() 183s exporter = Exporter(poetry, io) 183s exporter.export("constraints.txt", tmp_path, "constraints.txt") 183s 183s expected_error_out = ( 183s "Warning: foo is locked in develop (editable) mode, which is " 183s "incompatible with the constraints.txt format.\n" 183s "Warning: baz is locked in develop (editable) mode, which is " 183s "incompatible with the constraints.txt format.\n" 183s ) 183s 183s assert io.fetch_error() == expected_error_out 183s 183s with (tmp_path / "constraints.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s > assert content == f"bar==7.8.9 ; {MARKER_PY}\n" 183s E assert 'bar==7.8.9 ;...ion < "4.0"\n' == 'bar==7.8.9 ;...on == "2.7"\n' 183s E 183s E - bar==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + bar==7.8.9 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s 183s tests/test_exporter.py:2770: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _________ test_exporter_exports_extra_index_url_and_trusted_host[1.1] __________ 183s [gw4] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw4/test_exporter_exports_extra_in0') 183s poetry = , lock_version = '1.1' 183s 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_exports_extra_index_url_and_trusted_host( 183s tmp_path: Path, poetry: Poetry, lock_version: str 183s ) -> None: 183s poetry.pool.add_repository( 183s LegacyRepository( 183s "custom", 183s "http://example.com/simple", 183s ), 183s priority=Priority.EXPLICIT, 183s ) 183s lock_data = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "dependencies": {"bar": "*"}, 183s }, 183s { 183s "name": "bar", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "http://example.com/simple", 183s "reference": "", 183s }, 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": {"foo": [], "bar": []}, 183s }, 183s } 183s fix_lock_data(lock_data) 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s expected = f"""\ 183s --trusted-host example.com 183s --extra-index-url http://example.com/simple 183s 183s bar==4.5.6 ; {MARKER_PY} 183s foo==1.2.3 ; {MARKER_PY} 183s """ 183s > assert content == expected 183s E assert '--trusted-ho...ion < "4.0"\n' == '--trusted-ho...on == "2.7"\n' 183s E 183s E Skipping 90 identical leading characters in diff, use -v to show 183s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"... 183s E 183s E ...Full output truncated (3 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:2965: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _ test_exporter_exports_requirements_txt_with_dev_extras[2.1-False-expected1] __ 183s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem1') 183s poetry = , dev = False 183s expected = ['bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"', 'foo==1.2.1 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"'] 183s lock_version = '2.1' 183s 183s @pytest.mark.parametrize( 183s ["dev", "expected"], 183s [ 183s ( 183s True, 183s [ 183s f"bar==1.2.2 ; {MARKER_PY}", 183s f"baz==1.2.3 ; {MARKER_PY}", 183s f"foo==1.2.1 ; {MARKER_PY}", 183s ], 183s ), 183s ( 183s False, 183s [ 183s f"bar==1.2.2 ; {MARKER_PY}", 183s f"foo==1.2.1 ; {MARKER_PY}", 183s ], 183s ), 183s ], 183s ) 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_exports_requirements_txt_with_dev_extras( 183s tmp_path: Path, poetry: Poetry, dev: bool, expected: list[str], lock_version: str 183s ) -> None: 183s lock_data: dict[str, Any] = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.1", 183s "optional": False, 183s "python-versions": "*", 183s }, 183s { 183s "name": "bar", 183s "version": "1.2.2", 183s "optional": False, 183s "python-versions": "*", 183s "dependencies": { 183s "baz": { 183s "version": ">=0.1.0", 183s "optional": True, 183s "markers": "extra == 'baz'", 183s } 183s }, 183s "extras": {"baz": ["baz (>=0.1.0)"]}, 183s }, 183s { 183s "name": "baz", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": {"foo": [], "bar": [], "baz": []}, 183s }, 183s } 183s fix_lock_data(lock_data) 183s if lock_version == "2.1": 183s lock_data["package"][2]["groups"] = ["dev"] 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry, dev={"baz"}) 183s 183s exporter = Exporter(poetry, NullIO()) 183s if dev: 183s exporter.only_groups([MAIN_GROUP, "dev"]) 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s > assert content == "\n".join(expected) + "\n" 183s E assert 'bar==1.2.2 ;...ion < "4.0"\n' == 'bar==1.2.2 ;...on == "2.7"\n' 183s E 183s E - bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + bar==1.2.2 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E - foo==1.2.1 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 183s E 183s E ...Full output truncated (2 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:1880: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _________ test_exporter_exports_extra_index_url_and_trusted_host[2.1] __________ 183s [gw5] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw5/test_exporter_exports_extra_in0') 183s poetry = , lock_version = '2.1' 183s 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_exports_extra_index_url_and_trusted_host( 183s tmp_path: Path, poetry: Poetry, lock_version: str 183s ) -> None: 183s poetry.pool.add_repository( 183s LegacyRepository( 183s "custom", 183s "http://example.com/simple", 183s ), 183s priority=Priority.EXPLICIT, 183s ) 183s lock_data = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "dependencies": {"bar": "*"}, 183s }, 183s { 183s "name": "bar", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "http://example.com/simple", 183s "reference": "", 183s }, 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": {"foo": [], "bar": []}, 183s }, 183s } 183s fix_lock_data(lock_data) 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s expected = f"""\ 183s --trusted-host example.com 183s --extra-index-url http://example.com/simple 183s 183s bar==4.5.6 ; {MARKER_PY} 183s foo==1.2.3 ; {MARKER_PY} 183s """ 183s > assert content == expected 183s E assert '--trusted-ho...ion < "4.0"\n' == '--trusted-ho...on == "2.7"\n' 183s E 183s E Skipping 90 identical leading characters in diff, use -v to show 183s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"... 183s E 183s E ...Full output truncated (3 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:2965: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _____________ test_exporter_index_urls[1.1-priorities2-expected2] ______________ 183s [gw2] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw2/test_exporter_index_urls_1_1_p0') 183s poetry = 183s priorities = [('custom-b', ), ('custom-a', )] 183s expected = ('a', 'b'), lock_version = '1.1' 183s 183s @pytest.mark.parametrize( 183s ("priorities", "expected"), 183s [ 183s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 183s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 183s ( 183s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 183s ("a", "b"), 183s ), 183s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 183s ( 183s [ 183s ("PyPI", Priority.PRIMARY), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("PyPI", Priority.EXPLICIT), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ("PyPI", Priority.SUPPLEMENTAL), 183s ], 183s ("", "a", "b"), 183s ), 183s ], 183s ) 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_index_urls( 183s tmp_path: Path, 183s poetry: Poetry, 183s priorities: list[tuple[str, Priority]], 183s expected: tuple[str, ...], 183s lock_version: str, 183s ) -> None: 183s pypi = poetry.pool.repository("PyPI") 183s poetry.pool.remove_repository("PyPI") 183s for name, prio in priorities: 183s if name.lower() == "pypi": 183s repo = pypi 183s else: 183s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 183s poetry.pool.add_repository(repo, priority=prio) 183s 183s lock_data: dict[str, Any] = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://a.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s { 183s "name": "bar", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://b.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": { 183s "foo": [{"name": "foo.whl", "hash": "12345"}], 183s "bar": [{"name": "bar.whl", "hash": "67890"}], 183s }, 183s }, 183s } 183s fix_lock_data(lock_data) 183s if lock_version == "2.1": 183s lock_data["package"][0]["groups"] = ["dev"] 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry, dev={"bar"}) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.only_groups([MAIN_GROUP, "dev"]) 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s expected_urls = [ 183s f"--extra-index-url https://{name[-1]}.example.com/simple" 183s for name in expected[1:] 183s ] 183s if expected[0]: 183s expected_urls = [ 183s f"--index-url https://{expected[0]}.example.com/simple", 183s *expected_urls, 183s ] 183s url_string = "\n".join(expected_urls) 183s 183s expected_content = f"""\ 183s {url_string} 183s 183s bar==4.5.6 ; {MARKER_PY} \\ 183s --hash=sha256:67890 183s foo==1.2.3 ; {MARKER_PY} \\ 183s --hash=sha256:12345 183s """ 183s 183s > assert content == expected_content 183s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 183s E 183s E Skipping 107 identical leading characters in diff, use -v to show 183s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E --hash=sha256:67890... 183s E 183s E ...Full output truncated (5 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:3175: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _____________ test_exporter_index_urls[1.1-priorities0-expected0] ______________ 183s [gw3] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw3/test_exporter_index_urls_1_1_p0') 183s poetry = 183s priorities = [('custom-a', ), ('custom-b', )] 183s expected = ('a', 'b'), lock_version = '1.1' 183s 183s @pytest.mark.parametrize( 183s ("priorities", "expected"), 183s [ 183s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 183s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 183s ( 183s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 183s ("a", "b"), 183s ), 183s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 183s ( 183s [ 183s ("PyPI", Priority.PRIMARY), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("PyPI", Priority.EXPLICIT), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ("PyPI", Priority.SUPPLEMENTAL), 183s ], 183s ("", "a", "b"), 183s ), 183s ], 183s ) 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_index_urls( 183s tmp_path: Path, 183s poetry: Poetry, 183s priorities: list[tuple[str, Priority]], 183s expected: tuple[str, ...], 183s lock_version: str, 183s ) -> None: 183s pypi = poetry.pool.repository("PyPI") 183s poetry.pool.remove_repository("PyPI") 183s for name, prio in priorities: 183s if name.lower() == "pypi": 183s repo = pypi 183s else: 183s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 183s poetry.pool.add_repository(repo, priority=prio) 183s 183s lock_data: dict[str, Any] = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://a.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s { 183s "name": "bar", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://b.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": { 183s "foo": [{"name": "foo.whl", "hash": "12345"}], 183s "bar": [{"name": "bar.whl", "hash": "67890"}], 183s }, 183s }, 183s } 183s fix_lock_data(lock_data) 183s if lock_version == "2.1": 183s lock_data["package"][0]["groups"] = ["dev"] 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry, dev={"bar"}) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.only_groups([MAIN_GROUP, "dev"]) 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s expected_urls = [ 183s f"--extra-index-url https://{name[-1]}.example.com/simple" 183s for name in expected[1:] 183s ] 183s if expected[0]: 183s expected_urls = [ 183s f"--index-url https://{expected[0]}.example.com/simple", 183s *expected_urls, 183s ] 183s url_string = "\n".join(expected_urls) 183s 183s expected_content = f"""\ 183s {url_string} 183s 183s bar==4.5.6 ; {MARKER_PY} \\ 183s --hash=sha256:67890 183s foo==1.2.3 ; {MARKER_PY} \\ 183s --hash=sha256:12345 183s """ 183s 183s > assert content == expected_content 183s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 183s E 183s E Skipping 107 identical leading characters in diff, use -v to show 183s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E --hash=sha256:67890... 183s E 183s E ...Full output truncated (5 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:3175: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _____________ test_exporter_index_urls[1.1-priorities1-expected1] ______________ 183s [gw4] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw4/test_exporter_index_urls_1_1_p0') 183s poetry = 183s priorities = [('custom-b', ), ('custom-a', )] 183s expected = ('b', 'a'), lock_version = '1.1' 183s 183s @pytest.mark.parametrize( 183s ("priorities", "expected"), 183s [ 183s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 183s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 183s ( 183s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 183s ("a", "b"), 183s ), 183s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 183s ( 183s [ 183s ("PyPI", Priority.PRIMARY), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("PyPI", Priority.EXPLICIT), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ("PyPI", Priority.SUPPLEMENTAL), 183s ], 183s ("", "a", "b"), 183s ), 183s ], 183s ) 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_index_urls( 183s tmp_path: Path, 183s poetry: Poetry, 183s priorities: list[tuple[str, Priority]], 183s expected: tuple[str, ...], 183s lock_version: str, 183s ) -> None: 183s pypi = poetry.pool.repository("PyPI") 183s poetry.pool.remove_repository("PyPI") 183s for name, prio in priorities: 183s if name.lower() == "pypi": 183s repo = pypi 183s else: 183s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 183s poetry.pool.add_repository(repo, priority=prio) 183s 183s lock_data: dict[str, Any] = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://a.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s { 183s "name": "bar", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://b.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": { 183s "foo": [{"name": "foo.whl", "hash": "12345"}], 183s "bar": [{"name": "bar.whl", "hash": "67890"}], 183s }, 183s }, 183s } 183s fix_lock_data(lock_data) 183s if lock_version == "2.1": 183s lock_data["package"][0]["groups"] = ["dev"] 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry, dev={"bar"}) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.only_groups([MAIN_GROUP, "dev"]) 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s expected_urls = [ 183s f"--extra-index-url https://{name[-1]}.example.com/simple" 183s for name in expected[1:] 183s ] 183s if expected[0]: 183s expected_urls = [ 183s f"--index-url https://{expected[0]}.example.com/simple", 183s *expected_urls, 183s ] 183s url_string = "\n".join(expected_urls) 183s 183s expected_content = f"""\ 183s {url_string} 183s 183s bar==4.5.6 ; {MARKER_PY} \\ 183s --hash=sha256:67890 183s foo==1.2.3 ; {MARKER_PY} \\ 183s --hash=sha256:12345 183s """ 183s 183s > assert content == expected_content 183s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 183s E 183s E Skipping 107 identical leading characters in diff, use -v to show 183s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E --hash=sha256:67890... 183s E 183s E ...Full output truncated (5 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:3175: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _____________ test_exporter_index_urls[1.1-priorities4-expected4] ______________ 183s [gw5] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw5/test_exporter_index_urls_1_1_p0') 183s poetry = 183s priorities = [('PyPI', ), ('custom-a', ), ('custom-b', )] 183s expected = ('', 'a', 'b'), lock_version = '1.1' 183s 183s @pytest.mark.parametrize( 183s ("priorities", "expected"), 183s [ 183s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 183s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 183s ( 183s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 183s ("a", "b"), 183s ), 183s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 183s ( 183s [ 183s ("PyPI", Priority.PRIMARY), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("PyPI", Priority.EXPLICIT), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ("PyPI", Priority.SUPPLEMENTAL), 183s ], 183s ("", "a", "b"), 183s ), 183s ], 183s ) 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_index_urls( 183s tmp_path: Path, 183s poetry: Poetry, 183s priorities: list[tuple[str, Priority]], 183s expected: tuple[str, ...], 183s lock_version: str, 183s ) -> None: 183s pypi = poetry.pool.repository("PyPI") 183s poetry.pool.remove_repository("PyPI") 183s for name, prio in priorities: 183s if name.lower() == "pypi": 183s repo = pypi 183s else: 183s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 183s poetry.pool.add_repository(repo, priority=prio) 183s 183s lock_data: dict[str, Any] = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://a.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s { 183s "name": "bar", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://b.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": { 183s "foo": [{"name": "foo.whl", "hash": "12345"}], 183s "bar": [{"name": "bar.whl", "hash": "67890"}], 183s }, 183s }, 183s } 183s fix_lock_data(lock_data) 183s if lock_version == "2.1": 183s lock_data["package"][0]["groups"] = ["dev"] 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry, dev={"bar"}) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.only_groups([MAIN_GROUP, "dev"]) 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s expected_urls = [ 183s f"--extra-index-url https://{name[-1]}.example.com/simple" 183s for name in expected[1:] 183s ] 183s if expected[0]: 183s expected_urls = [ 183s f"--index-url https://{expected[0]}.example.com/simple", 183s *expected_urls, 183s ] 183s url_string = "\n".join(expected_urls) 183s 183s expected_content = f"""\ 183s {url_string} 183s 183s bar==4.5.6 ; {MARKER_PY} \\ 183s --hash=sha256:67890 183s foo==1.2.3 ; {MARKER_PY} \\ 183s --hash=sha256:12345 183s """ 183s 183s > assert content == expected_content 183s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 183s E 183s E Skipping 113 identical leading characters in diff, use -v to show 183s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E --hash=sha256:67890... 183s E 183s E ...Full output truncated (5 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:3175: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _____________ test_exporter_index_urls[1.1-priorities6-expected6] ______________ 183s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_index_urls_1_1_p0') 183s poetry = 183s priorities = [('custom-a', ), ('custom-b', ), ('PyPI', )] 183s expected = ('', 'a', 'b'), lock_version = '1.1' 183s 183s @pytest.mark.parametrize( 183s ("priorities", "expected"), 183s [ 183s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 183s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 183s ( 183s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 183s ("a", "b"), 183s ), 183s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 183s ( 183s [ 183s ("PyPI", Priority.PRIMARY), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("PyPI", Priority.EXPLICIT), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ("PyPI", Priority.SUPPLEMENTAL), 183s ], 183s ("", "a", "b"), 183s ), 183s ], 183s ) 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_index_urls( 183s tmp_path: Path, 183s poetry: Poetry, 183s priorities: list[tuple[str, Priority]], 183s expected: tuple[str, ...], 183s lock_version: str, 183s ) -> None: 183s pypi = poetry.pool.repository("PyPI") 183s poetry.pool.remove_repository("PyPI") 183s for name, prio in priorities: 183s if name.lower() == "pypi": 183s repo = pypi 183s else: 183s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 183s poetry.pool.add_repository(repo, priority=prio) 183s 183s lock_data: dict[str, Any] = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://a.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s { 183s "name": "bar", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://b.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": { 183s "foo": [{"name": "foo.whl", "hash": "12345"}], 183s "bar": [{"name": "bar.whl", "hash": "67890"}], 183s }, 183s }, 183s } 183s fix_lock_data(lock_data) 183s if lock_version == "2.1": 183s lock_data["package"][0]["groups"] = ["dev"] 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry, dev={"bar"}) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.only_groups([MAIN_GROUP, "dev"]) 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s expected_urls = [ 183s f"--extra-index-url https://{name[-1]}.example.com/simple" 183s for name in expected[1:] 183s ] 183s if expected[0]: 183s expected_urls = [ 183s f"--index-url https://{expected[0]}.example.com/simple", 183s *expected_urls, 183s ] 183s url_string = "\n".join(expected_urls) 183s 183s expected_content = f"""\ 183s {url_string} 183s 183s bar==4.5.6 ; {MARKER_PY} \\ 183s --hash=sha256:67890 183s foo==1.2.3 ; {MARKER_PY} \\ 183s --hash=sha256:12345 183s """ 183s 183s > assert content == expected_content 183s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 183s E 183s E Skipping 113 identical leading characters in diff, use -v to show 183s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E --hash=sha256:67890... 183s E 183s E ...Full output truncated (5 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:3175: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _____________ test_exporter_index_urls[1.1-priorities3-expected3] ______________ 183s [gw7] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw7/test_exporter_index_urls_1_1_p0') 183s poetry = 183s priorities = [('custom-b', ), ('custom-a', )] 183s expected = ('a', 'b'), lock_version = '1.1' 183s 183s @pytest.mark.parametrize( 183s ("priorities", "expected"), 183s [ 183s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 183s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 183s ( 183s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 183s ("a", "b"), 183s ), 183s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 183s ( 183s [ 183s ("PyPI", Priority.PRIMARY), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("PyPI", Priority.EXPLICIT), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ("PyPI", Priority.SUPPLEMENTAL), 183s ], 183s ("", "a", "b"), 183s ), 183s ], 183s ) 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_index_urls( 183s tmp_path: Path, 183s poetry: Poetry, 183s priorities: list[tuple[str, Priority]], 183s expected: tuple[str, ...], 183s lock_version: str, 183s ) -> None: 183s pypi = poetry.pool.repository("PyPI") 183s poetry.pool.remove_repository("PyPI") 183s for name, prio in priorities: 183s if name.lower() == "pypi": 183s repo = pypi 183s else: 183s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 183s poetry.pool.add_repository(repo, priority=prio) 183s 183s lock_data: dict[str, Any] = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://a.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s { 183s "name": "bar", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://b.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": { 183s "foo": [{"name": "foo.whl", "hash": "12345"}], 183s "bar": [{"name": "bar.whl", "hash": "67890"}], 183s }, 183s }, 183s } 183s fix_lock_data(lock_data) 183s if lock_version == "2.1": 183s lock_data["package"][0]["groups"] = ["dev"] 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry, dev={"bar"}) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.only_groups([MAIN_GROUP, "dev"]) 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s expected_urls = [ 183s f"--extra-index-url https://{name[-1]}.example.com/simple" 183s for name in expected[1:] 183s ] 183s if expected[0]: 183s expected_urls = [ 183s f"--index-url https://{expected[0]}.example.com/simple", 183s *expected_urls, 183s ] 183s url_string = "\n".join(expected_urls) 183s 183s expected_content = f"""\ 183s {url_string} 183s 183s bar==4.5.6 ; {MARKER_PY} \\ 183s --hash=sha256:67890 183s foo==1.2.3 ; {MARKER_PY} \\ 183s --hash=sha256:12345 183s """ 183s 183s > assert content == expected_content 183s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 183s E 183s E Skipping 107 identical leading characters in diff, use -v to show 183s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E --hash=sha256:67890... 183s E 183s E ...Full output truncated (5 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:3175: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _____________ test_exporter_index_urls[2.1-priorities0-expected0] ______________ 183s [gw3] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw3/test_exporter_index_urls_2_1_p0') 183s poetry = 183s priorities = [('custom-a', ), ('custom-b', )] 183s expected = ('a', 'b'), lock_version = '2.1' 183s 183s @pytest.mark.parametrize( 183s ("priorities", "expected"), 183s [ 183s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 183s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 183s ( 183s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 183s ("a", "b"), 183s ), 183s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 183s ( 183s [ 183s ("PyPI", Priority.PRIMARY), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("PyPI", Priority.EXPLICIT), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ("PyPI", Priority.SUPPLEMENTAL), 183s ], 183s ("", "a", "b"), 183s ), 183s ], 183s ) 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_index_urls( 183s tmp_path: Path, 183s poetry: Poetry, 183s priorities: list[tuple[str, Priority]], 183s expected: tuple[str, ...], 183s lock_version: str, 183s ) -> None: 183s pypi = poetry.pool.repository("PyPI") 183s poetry.pool.remove_repository("PyPI") 183s for name, prio in priorities: 183s if name.lower() == "pypi": 183s repo = pypi 183s else: 183s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 183s poetry.pool.add_repository(repo, priority=prio) 183s 183s lock_data: dict[str, Any] = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://a.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s { 183s "name": "bar", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://b.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": { 183s "foo": [{"name": "foo.whl", "hash": "12345"}], 183s "bar": [{"name": "bar.whl", "hash": "67890"}], 183s }, 183s }, 183s } 183s fix_lock_data(lock_data) 183s if lock_version == "2.1": 183s lock_data["package"][0]["groups"] = ["dev"] 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry, dev={"bar"}) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.only_groups([MAIN_GROUP, "dev"]) 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s expected_urls = [ 183s f"--extra-index-url https://{name[-1]}.example.com/simple" 183s for name in expected[1:] 183s ] 183s if expected[0]: 183s expected_urls = [ 183s f"--index-url https://{expected[0]}.example.com/simple", 183s *expected_urls, 183s ] 183s url_string = "\n".join(expected_urls) 183s 183s expected_content = f"""\ 183s {url_string} 183s 183s bar==4.5.6 ; {MARKER_PY} \\ 183s --hash=sha256:67890 183s foo==1.2.3 ; {MARKER_PY} \\ 183s --hash=sha256:12345 183s """ 183s 183s > assert content == expected_content 183s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 183s E 183s E Skipping 107 identical leading characters in diff, use -v to show 183s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E --hash=sha256:67890... 183s E 183s E ...Full output truncated (5 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:3175: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _____________ test_exporter_index_urls[1.1-priorities5-expected5] ______________ 183s [gw2] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw2/test_exporter_index_urls_1_1_p1') 183s poetry = 183s priorities = [('PyPI', ), ('custom-a', ), ('custom-b', )] 183s expected = ('', 'a', 'b'), lock_version = '1.1' 183s 183s @pytest.mark.parametrize( 183s ("priorities", "expected"), 183s [ 183s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 183s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 183s ( 183s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 183s ("a", "b"), 183s ), 183s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 183s ( 183s [ 183s ("PyPI", Priority.PRIMARY), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("PyPI", Priority.EXPLICIT), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ("PyPI", Priority.SUPPLEMENTAL), 183s ], 183s ("", "a", "b"), 183s ), 183s ], 183s ) 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_index_urls( 183s tmp_path: Path, 183s poetry: Poetry, 183s priorities: list[tuple[str, Priority]], 183s expected: tuple[str, ...], 183s lock_version: str, 183s ) -> None: 183s pypi = poetry.pool.repository("PyPI") 183s poetry.pool.remove_repository("PyPI") 183s for name, prio in priorities: 183s if name.lower() == "pypi": 183s repo = pypi 183s else: 183s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 183s poetry.pool.add_repository(repo, priority=prio) 183s 183s lock_data: dict[str, Any] = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://a.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s { 183s "name": "bar", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://b.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": { 183s "foo": [{"name": "foo.whl", "hash": "12345"}], 183s "bar": [{"name": "bar.whl", "hash": "67890"}], 183s }, 183s }, 183s } 183s fix_lock_data(lock_data) 183s if lock_version == "2.1": 183s lock_data["package"][0]["groups"] = ["dev"] 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry, dev={"bar"}) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.only_groups([MAIN_GROUP, "dev"]) 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s expected_urls = [ 183s f"--extra-index-url https://{name[-1]}.example.com/simple" 183s for name in expected[1:] 183s ] 183s if expected[0]: 183s expected_urls = [ 183s f"--index-url https://{expected[0]}.example.com/simple", 183s *expected_urls, 183s ] 183s url_string = "\n".join(expected_urls) 183s 183s expected_content = f"""\ 183s {url_string} 183s 183s bar==4.5.6 ; {MARKER_PY} \\ 183s --hash=sha256:67890 183s foo==1.2.3 ; {MARKER_PY} \\ 183s --hash=sha256:12345 183s """ 183s 183s > assert content == expected_content 183s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 183s E 183s E Skipping 113 identical leading characters in diff, use -v to show 183s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E --hash=sha256:67890... 183s E 183s E ...Full output truncated (5 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:3175: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _____________ test_exporter_index_urls[2.1-priorities1-expected1] ______________ 183s [gw4] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw4/test_exporter_index_urls_2_1_p0') 183s poetry = 183s priorities = [('custom-b', ), ('custom-a', )] 183s expected = ('b', 'a'), lock_version = '2.1' 183s 183s @pytest.mark.parametrize( 183s ("priorities", "expected"), 183s [ 183s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 183s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 183s ( 183s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 183s ("a", "b"), 183s ), 183s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 183s ( 183s [ 183s ("PyPI", Priority.PRIMARY), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("PyPI", Priority.EXPLICIT), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ("PyPI", Priority.SUPPLEMENTAL), 183s ], 183s ("", "a", "b"), 183s ), 183s ], 183s ) 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_index_urls( 183s tmp_path: Path, 183s poetry: Poetry, 183s priorities: list[tuple[str, Priority]], 183s expected: tuple[str, ...], 183s lock_version: str, 183s ) -> None: 183s pypi = poetry.pool.repository("PyPI") 183s poetry.pool.remove_repository("PyPI") 183s for name, prio in priorities: 183s if name.lower() == "pypi": 183s repo = pypi 183s else: 183s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 183s poetry.pool.add_repository(repo, priority=prio) 183s 183s lock_data: dict[str, Any] = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://a.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s { 183s "name": "bar", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://b.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": { 183s "foo": [{"name": "foo.whl", "hash": "12345"}], 183s "bar": [{"name": "bar.whl", "hash": "67890"}], 183s }, 183s }, 183s } 183s fix_lock_data(lock_data) 183s if lock_version == "2.1": 183s lock_data["package"][0]["groups"] = ["dev"] 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry, dev={"bar"}) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.only_groups([MAIN_GROUP, "dev"]) 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s expected_urls = [ 183s f"--extra-index-url https://{name[-1]}.example.com/simple" 183s for name in expected[1:] 183s ] 183s if expected[0]: 183s expected_urls = [ 183s f"--index-url https://{expected[0]}.example.com/simple", 183s *expected_urls, 183s ] 183s url_string = "\n".join(expected_urls) 183s 183s expected_content = f"""\ 183s {url_string} 183s 183s bar==4.5.6 ; {MARKER_PY} \\ 183s --hash=sha256:67890 183s foo==1.2.3 ; {MARKER_PY} \\ 183s --hash=sha256:12345 183s """ 183s 183s > assert content == expected_content 183s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 183s E 183s E Skipping 107 identical leading characters in diff, use -v to show 183s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E --hash=sha256:67890... 183s E 183s E ...Full output truncated (5 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:3175: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _____________ test_exporter_index_urls[2.1-priorities4-expected4] ______________ 183s [gw5] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw5/test_exporter_index_urls_2_1_p0') 183s poetry = 183s priorities = [('PyPI', ), ('custom-a', ), ('custom-b', )] 183s expected = ('', 'a', 'b'), lock_version = '2.1' 183s 183s @pytest.mark.parametrize( 183s ("priorities", "expected"), 183s [ 183s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 183s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 183s ( 183s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 183s ("a", "b"), 183s ), 183s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 183s ( 183s [ 183s ("PyPI", Priority.PRIMARY), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("PyPI", Priority.EXPLICIT), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ("PyPI", Priority.SUPPLEMENTAL), 183s ], 183s ("", "a", "b"), 183s ), 183s ], 183s ) 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_index_urls( 183s tmp_path: Path, 183s poetry: Poetry, 183s priorities: list[tuple[str, Priority]], 183s expected: tuple[str, ...], 183s lock_version: str, 183s ) -> None: 183s pypi = poetry.pool.repository("PyPI") 183s poetry.pool.remove_repository("PyPI") 183s for name, prio in priorities: 183s if name.lower() == "pypi": 183s repo = pypi 183s else: 183s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 183s poetry.pool.add_repository(repo, priority=prio) 183s 183s lock_data: dict[str, Any] = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://a.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s { 183s "name": "bar", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://b.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": { 183s "foo": [{"name": "foo.whl", "hash": "12345"}], 183s "bar": [{"name": "bar.whl", "hash": "67890"}], 183s }, 183s }, 183s } 183s fix_lock_data(lock_data) 183s if lock_version == "2.1": 183s lock_data["package"][0]["groups"] = ["dev"] 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry, dev={"bar"}) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.only_groups([MAIN_GROUP, "dev"]) 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s expected_urls = [ 183s f"--extra-index-url https://{name[-1]}.example.com/simple" 183s for name in expected[1:] 183s ] 183s if expected[0]: 183s expected_urls = [ 183s f"--index-url https://{expected[0]}.example.com/simple", 183s *expected_urls, 183s ] 183s url_string = "\n".join(expected_urls) 183s 183s expected_content = f"""\ 183s {url_string} 183s 183s bar==4.5.6 ; {MARKER_PY} \\ 183s --hash=sha256:67890 183s foo==1.2.3 ; {MARKER_PY} \\ 183s --hash=sha256:12345 183s """ 183s 183s > assert content == expected_content 183s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 183s E 183s E Skipping 113 identical leading characters in diff, use -v to show 183s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E --hash=sha256:67890... 183s E 183s E ...Full output truncated (5 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:3175: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _____________ test_exporter_index_urls[2.1-priorities5-expected5] ______________ 183s [gw6] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw6/test_exporter_index_urls_2_1_p0') 183s poetry = 183s priorities = [('PyPI', ), ('custom-a', ), ('custom-b', )] 183s expected = ('', 'a', 'b'), lock_version = '2.1' 183s 183s @pytest.mark.parametrize( 183s ("priorities", "expected"), 183s [ 183s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 183s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 183s ( 183s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 183s ("a", "b"), 183s ), 183s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 183s ( 183s [ 183s ("PyPI", Priority.PRIMARY), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("PyPI", Priority.EXPLICIT), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ("PyPI", Priority.SUPPLEMENTAL), 183s ], 183s ("", "a", "b"), 183s ), 183s ], 183s ) 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_index_urls( 183s tmp_path: Path, 183s poetry: Poetry, 183s priorities: list[tuple[str, Priority]], 183s expected: tuple[str, ...], 183s lock_version: str, 183s ) -> None: 183s pypi = poetry.pool.repository("PyPI") 183s poetry.pool.remove_repository("PyPI") 183s for name, prio in priorities: 183s if name.lower() == "pypi": 183s repo = pypi 183s else: 183s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 183s poetry.pool.add_repository(repo, priority=prio) 183s 183s lock_data: dict[str, Any] = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://a.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s { 183s "name": "bar", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://b.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": { 183s "foo": [{"name": "foo.whl", "hash": "12345"}], 183s "bar": [{"name": "bar.whl", "hash": "67890"}], 183s }, 183s }, 183s } 183s fix_lock_data(lock_data) 183s if lock_version == "2.1": 183s lock_data["package"][0]["groups"] = ["dev"] 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry, dev={"bar"}) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.only_groups([MAIN_GROUP, "dev"]) 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s expected_urls = [ 183s f"--extra-index-url https://{name[-1]}.example.com/simple" 183s for name in expected[1:] 183s ] 183s if expected[0]: 183s expected_urls = [ 183s f"--index-url https://{expected[0]}.example.com/simple", 183s *expected_urls, 183s ] 183s url_string = "\n".join(expected_urls) 183s 183s expected_content = f"""\ 183s {url_string} 183s 183s bar==4.5.6 ; {MARKER_PY} \\ 183s --hash=sha256:67890 183s foo==1.2.3 ; {MARKER_PY} \\ 183s --hash=sha256:12345 183s """ 183s 183s > assert content == expected_content 183s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 183s E 183s E Skipping 113 identical leading characters in diff, use -v to show 183s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E --hash=sha256:67890... 183s E 183s E ...Full output truncated (5 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:3175: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _____________ test_exporter_index_urls[2.1-priorities2-expected2] ______________ 183s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_index_urls_2_1_p0') 183s poetry = 183s priorities = [('custom-b', ), ('custom-a', )] 183s expected = ('a', 'b'), lock_version = '2.1' 183s 183s @pytest.mark.parametrize( 183s ("priorities", "expected"), 183s [ 183s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 183s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 183s ( 183s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 183s ("a", "b"), 183s ), 183s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 183s ( 183s [ 183s ("PyPI", Priority.PRIMARY), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("PyPI", Priority.EXPLICIT), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ("PyPI", Priority.SUPPLEMENTAL), 183s ], 183s ("", "a", "b"), 183s ), 183s ], 183s ) 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_index_urls( 183s tmp_path: Path, 183s poetry: Poetry, 183s priorities: list[tuple[str, Priority]], 183s expected: tuple[str, ...], 183s lock_version: str, 183s ) -> None: 183s pypi = poetry.pool.repository("PyPI") 183s poetry.pool.remove_repository("PyPI") 183s for name, prio in priorities: 183s if name.lower() == "pypi": 183s repo = pypi 183s else: 183s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 183s poetry.pool.add_repository(repo, priority=prio) 183s 183s lock_data: dict[str, Any] = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://a.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s { 183s "name": "bar", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://b.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": { 183s "foo": [{"name": "foo.whl", "hash": "12345"}], 183s "bar": [{"name": "bar.whl", "hash": "67890"}], 183s }, 183s }, 183s } 183s fix_lock_data(lock_data) 183s if lock_version == "2.1": 183s lock_data["package"][0]["groups"] = ["dev"] 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry, dev={"bar"}) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.only_groups([MAIN_GROUP, "dev"]) 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s expected_urls = [ 183s f"--extra-index-url https://{name[-1]}.example.com/simple" 183s for name in expected[1:] 183s ] 183s if expected[0]: 183s expected_urls = [ 183s f"--index-url https://{expected[0]}.example.com/simple", 183s *expected_urls, 183s ] 183s url_string = "\n".join(expected_urls) 183s 183s expected_content = f"""\ 183s {url_string} 183s 183s bar==4.5.6 ; {MARKER_PY} \\ 183s --hash=sha256:67890 183s foo==1.2.3 ; {MARKER_PY} \\ 183s --hash=sha256:12345 183s """ 183s 183s > assert content == expected_content 183s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 183s E 183s E Skipping 107 identical leading characters in diff, use -v to show 183s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E --hash=sha256:67890... 183s E 183s E ...Full output truncated (5 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:3175: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _____________ test_exporter_index_urls[2.1-priorities6-expected6] ______________ 183s [gw3] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw3/test_exporter_index_urls_2_1_p1') 183s poetry = 183s priorities = [('custom-a', ), ('custom-b', ), ('PyPI', )] 183s expected = ('', 'a', 'b'), lock_version = '2.1' 183s 183s @pytest.mark.parametrize( 183s ("priorities", "expected"), 183s [ 183s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 183s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 183s ( 183s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 183s ("a", "b"), 183s ), 183s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 183s ( 183s [ 183s ("PyPI", Priority.PRIMARY), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("PyPI", Priority.EXPLICIT), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ("PyPI", Priority.SUPPLEMENTAL), 183s ], 183s ("", "a", "b"), 183s ), 183s ], 183s ) 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_index_urls( 183s tmp_path: Path, 183s poetry: Poetry, 183s priorities: list[tuple[str, Priority]], 183s expected: tuple[str, ...], 183s lock_version: str, 183s ) -> None: 183s pypi = poetry.pool.repository("PyPI") 183s poetry.pool.remove_repository("PyPI") 183s for name, prio in priorities: 183s if name.lower() == "pypi": 183s repo = pypi 183s else: 183s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 183s poetry.pool.add_repository(repo, priority=prio) 183s 183s lock_data: dict[str, Any] = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://a.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s { 183s "name": "bar", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://b.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": { 183s "foo": [{"name": "foo.whl", "hash": "12345"}], 183s "bar": [{"name": "bar.whl", "hash": "67890"}], 183s }, 183s }, 183s } 183s fix_lock_data(lock_data) 183s if lock_version == "2.1": 183s lock_data["package"][0]["groups"] = ["dev"] 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry, dev={"bar"}) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.only_groups([MAIN_GROUP, "dev"]) 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s expected_urls = [ 183s f"--extra-index-url https://{name[-1]}.example.com/simple" 183s for name in expected[1:] 183s ] 183s if expected[0]: 183s expected_urls = [ 183s f"--index-url https://{expected[0]}.example.com/simple", 183s *expected_urls, 183s ] 183s url_string = "\n".join(expected_urls) 183s 183s expected_content = f"""\ 183s {url_string} 183s 183s bar==4.5.6 ; {MARKER_PY} \\ 183s --hash=sha256:67890 183s foo==1.2.3 ; {MARKER_PY} \\ 183s --hash=sha256:12345 183s """ 183s 183s > assert content == expected_content 183s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 183s E 183s E Skipping 113 identical leading characters in diff, use -v to show 183s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E --hash=sha256:67890... 183s E 183s E ...Full output truncated (5 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:3175: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _______________________ test_dependency_walk_error[2.1] ________________________ 183s [gw4] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw4/test_dependency_walk_error_2_10') 183s poetry = , lock_version = '2.1' 183s 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_dependency_walk_error( 183s tmp_path: Path, poetry: Poetry, lock_version: str 183s ) -> None: 183s """ 183s With lock file version 2.1 we can export lock files 183s that resulted in a DependencyWalkerError with lower lock file versions. 183s 183s root 183s ├── foo >=0 ; python_version < "3.9" 183s ├── foo >=1 ; python_version >= "3.9" 183s ├── bar ==1 ; python_version < "3.9" 183s │ └── foo ==1 ; python_version < "3.9" 183s └── bar ==2 ; python_version >= "3.9" 183s └── foo ==2 ; python_version >= "3.9" 183s 183s Only considering the root dependency, foo 2 is a valid solution 183s for all environments. However, due to bar depending on foo, 183s foo 1 must be chosen for Python 3.8 and lower. 183s """ 183s lock_data: dict[str, Any] = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1", 183s "optional": False, 183s "python-versions": "*", 183s }, 183s { 183s "name": "foo", 183s "version": "2", 183s "optional": False, 183s "python-versions": "*", 183s }, 183s { 183s "name": "bar", 183s "version": "1", 183s "optional": False, 183s "python-versions": "*", 183s "dependencies": {"foo": "1"}, 183s }, 183s { 183s "name": "bar", 183s "version": "2", 183s "optional": False, 183s "python-versions": "*", 183s "dependencies": {"foo": "2"}, 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": {"foo": [], "bar": []}, 183s }, 183s } 183s fix_lock_data(lock_data) 183s if lock_version == "2.1": 183s lock_data["package"][0]["markers"] = "python_version < '3.9'" 183s lock_data["package"][1]["markers"] = "python_version >= '3.9'" 183s lock_data["package"][2]["markers"] = "python_version < '3.9'" 183s lock_data["package"][3]["markers"] = "python_version >= '3.9'" 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s poetry.package.python_versions = "^3.8" 183s poetry.package.add_dependency( 183s Factory.create_dependency( 183s name="foo", constraint={"version": ">=0", "python": "<3.9"} 183s ) 183s ) 183s poetry.package.add_dependency( 183s Factory.create_dependency( 183s name="foo", constraint={"version": ">=1", "python": ">=3.9"} 183s ) 183s ) 183s poetry.package.add_dependency( 183s Factory.create_dependency( 183s name="bar", constraint={"version": "1", "python": "<3.9"} 183s ) 183s ) 183s poetry.package.add_dependency( 183s Factory.create_dependency( 183s name="bar", constraint={"version": "2", "python": ">=3.9"} 183s ) 183s ) 183s 183s exporter = Exporter(poetry, NullIO()) 183s if lock_version == "1.1": 183s with pytest.raises(DependencyWalkerError): 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s return 183s 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s expected = """\ 183s bar==1 ; python_version >= "3.8" and python_version < "3.9" 183s bar==2 ; python_version >= "3.9" and python_version < "4.0" 183s foo==1 ; python_version >= "3.8" and python_version < "3.9" 183s foo==2 ; python_version >= "3.9" and python_version < "4.0" 183s """ 183s 183s > assert content == expected 183s E assert 'bar==1 ; pyt...ion < "4.0"\n' == 'bar==1 ; pyt...ion < "4.0"\n' 183s E 183s E - bar==1 ; python_version >= "3.8" and python_version < "3.9" 183s E + bar==1 ; python_version == "3.8" 183s E bar==2 ; python_version >= "3.9" and python_version < "4.0" 183s E - foo==1 ; python_version >= "3.8" and python_version < "3.9" 183s E + foo==1 ; python_version == "3.8" 183s E foo==2 ; python_version >= "3.9" and python_version < "4.0" 183s 183s tests/test_exporter.py:3281: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s _____________ test_exporter_index_urls[2.1-priorities3-expected3] ______________ 183s [gw7] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw7/test_exporter_index_urls_2_1_p0') 183s poetry = 183s priorities = [('custom-b', ), ('custom-a', )] 183s expected = ('a', 'b'), lock_version = '2.1' 183s 183s @pytest.mark.parametrize( 183s ("priorities", "expected"), 183s [ 183s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 183s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 183s ( 183s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 183s ("a", "b"), 183s ), 183s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 183s ( 183s [ 183s ("PyPI", Priority.PRIMARY), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("PyPI", Priority.EXPLICIT), 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ], 183s ("", "a", "b"), 183s ), 183s ( 183s [ 183s ("custom-a", Priority.PRIMARY), 183s ("custom-b", Priority.PRIMARY), 183s ("PyPI", Priority.SUPPLEMENTAL), 183s ], 183s ("", "a", "b"), 183s ), 183s ], 183s ) 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_index_urls( 183s tmp_path: Path, 183s poetry: Poetry, 183s priorities: list[tuple[str, Priority]], 183s expected: tuple[str, ...], 183s lock_version: str, 183s ) -> None: 183s pypi = poetry.pool.repository("PyPI") 183s poetry.pool.remove_repository("PyPI") 183s for name, prio in priorities: 183s if name.lower() == "pypi": 183s repo = pypi 183s else: 183s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 183s poetry.pool.add_repository(repo, priority=prio) 183s 183s lock_data: dict[str, Any] = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://a.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s { 183s "name": "bar", 183s "version": "4.5.6", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "legacy", 183s "url": "https://b.example.com/simple", 183s "reference": "", 183s }, 183s }, 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": { 183s "foo": [{"name": "foo.whl", "hash": "12345"}], 183s "bar": [{"name": "bar.whl", "hash": "67890"}], 183s }, 183s }, 183s } 183s fix_lock_data(lock_data) 183s if lock_version == "2.1": 183s lock_data["package"][0]["groups"] = ["dev"] 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry, dev={"bar"}) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.only_groups([MAIN_GROUP, "dev"]) 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s expected_urls = [ 183s f"--extra-index-url https://{name[-1]}.example.com/simple" 183s for name in expected[1:] 183s ] 183s if expected[0]: 183s expected_urls = [ 183s f"--index-url https://{expected[0]}.example.com/simple", 183s *expected_urls, 183s ] 183s url_string = "\n".join(expected_urls) 183s 183s expected_content = f"""\ 183s {url_string} 183s 183s bar==4.5.6 ; {MARKER_PY} \\ 183s --hash=sha256:67890 183s foo==1.2.3 ; {MARKER_PY} \\ 183s --hash=sha256:12345 183s """ 183s 183s > assert content == expected_content 183s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 183s E 183s E Skipping 107 identical leading characters in diff, use -v to show 183s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s E --hash=sha256:67890... 183s E 183s E ...Full output truncated (5 lines hidden), use '-vv' to show 183s 183s tests/test_exporter.py:3175: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s ______ test_exporter_can_export_requirements_txt_with_file_packages[1.1] _______ 183s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi0') 183s poetry = 183s fixture_root_uri = 'file:///tmp/autopkgtest.C8nkQ3/autopkgtest_tmp/build/tests/fixtures' 183s lock_version = '1.1' 183s 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_can_export_requirements_txt_with_file_packages( 183s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 183s ) -> None: 183s lock_data = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "file", 183s "url": "distributions/demo-0.1.0.tar.gz", 183s "reference": "", 183s }, 183s } 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": {"foo": []}, 183s }, 183s } 183s fix_lock_data(lock_data) 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s expected = f"""\ 183s foo @ {fixture_root_uri}/distributions/demo-0.1.0.tar.gz ;\ 183s {MARKER_PY} 183s """ 183s 183s > assert content == expected 183s E assert 'foo @ file:/...ion < "4.0"\n' == 'foo @ file:/...on == "2.7"\n' 183s E 183s E Skipping 113 identical leading characters in diff, use -v to show 183s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s 183s tests/test_exporter.py:1573: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s ______ test_exporter_can_export_requirements_txt_with_file_packages[2.1] _______ 183s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 183s 183s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi1') 183s poetry = 183s fixture_root_uri = 'file:///tmp/autopkgtest.C8nkQ3/autopkgtest_tmp/build/tests/fixtures' 183s lock_version = '2.1' 183s 183s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 183s def test_exporter_can_export_requirements_txt_with_file_packages( 183s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 183s ) -> None: 183s lock_data = { 183s "package": [ 183s { 183s "name": "foo", 183s "version": "1.2.3", 183s "optional": False, 183s "python-versions": "*", 183s "source": { 183s "type": "file", 183s "url": "distributions/demo-0.1.0.tar.gz", 183s "reference": "", 183s }, 183s } 183s ], 183s "metadata": { 183s "lock-version": lock_version, 183s "python-versions": "*", 183s "content-hash": "123456789", 183s "files": {"foo": []}, 183s }, 183s } 183s fix_lock_data(lock_data) 183s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 183s set_package_requires(poetry) 183s 183s exporter = Exporter(poetry, NullIO()) 183s exporter.export("requirements.txt", tmp_path, "requirements.txt") 183s 183s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 183s content = f.read() 183s 183s expected = f"""\ 183s foo @ {fixture_root_uri}/distributions/demo-0.1.0.tar.gz ;\ 183s {MARKER_PY} 183s """ 183s 183s > assert content == expected 183s E assert 'foo @ file:/...ion < "4.0"\n' == 'foo @ file:/...on == "2.7"\n' 183s E 183s E Skipping 113 identical leading characters in diff, use -v to show 183s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 183s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 183s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 183s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 183s 183s tests/test_exporter.py:1573: AssertionError 183s ------------------------------ Captured log setup ------------------------------ 183s WARNING poetry.core.factory:factory.py:63 The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. 183s =========================== short test summary info ============================ 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages[1.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages[2.1] 183s FAILED tests/command/test_command_export.py::test_export_prints_to_stdout_by_default 183s FAILED tests/command/test_command_export.py::test_export_with_all_extras - as... 183s FAILED tests/command/test_command_export.py::test_export_groups[--without opt-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 183s FAILED tests/command/test_command_export.py::test_export_groups[--with opt-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nopt==2.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_markers[1.1] 183s FAILED tests/command/test_command_export.py::test_export_groups[--only main,dev-baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_markers[2.1] 183s FAILED tests/command/test_command_export.py::test_export_groups[--with dev,opt-baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nopt==2.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 183s FAILED tests/command/test_command_export.py::test_export_uses_requirements_txt_format_by_default 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_poetry[1.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_poetry[2.1] 183s FAILED tests/command/test_command_export.py::test_export_groups[--only main-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 183s FAILED tests/command/test_command_export.py::test_export_groups[-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 183s FAILED tests/command/test_command_export.py::test_export_includes_extras_by_flag[feature_bar-bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_pyinstaller[1.1] 183s FAILED tests/command/test_command_export.py::test_export_with_all_groups - as... 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_pyinstaller[2.1] 183s FAILED tests/command/test_command_export.py::test_export_groups[--only dev-baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 183s FAILED tests/command/test_command_export.py::test_export_groups[--with dev-baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 183s FAILED tests/command/test_command_export.py::test_export_groups[--without dev-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 183s FAILED tests/command/test_command_export.py::test_export_exports_requirements_txt_file_locks_if_no_lock_file 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes[1.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled[2.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_without_optional_packages[2.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[1.1-False-lines0] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes[2.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_without_dev_packages_by_default[1.1] 183s FAILED tests/command/test_command_export.py::test_export_includes_extras_by_flag[feature_bar feature_qux-bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nfoo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\nqux==1.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in[2.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_optional_packages[1.1-extras0-lines0] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[1.1-True-lines1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes[1.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_without_dev_packages_by_default[2.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_optional_packages[2.1-extras0-lines0] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[2.1-False-lines0] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes[2.1] 183s FAILED tests/command/test_command_export.py::test_export_exports_requirements_txt_uses_lock_file 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in[1.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_git_packages[1.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_without_optional_packages[1.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[2.1-True-lines1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled[1.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_cyclic[2.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers[1.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_directory_packages_editable[1.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_directory_packages[2.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_circular_root_dependency[1.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_directory_packages[1.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers[2.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_directory_packages_editable[2.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_circular_root_dependency[2.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_directory_packages[2.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_git_packages[2.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_directory_packages[1.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_url_false[1.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host[1.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages[1.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_extras[1.1-True-expected0] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_url_false[2.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host[2.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages[2.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages[1.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources[1.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_extras[1.1-False-expected1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_two_primary_sources[1.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_two_primary_sources[2.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials[1.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources[2.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials[2.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages[2.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_to_standard_output[2.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_to_standard_output[1.1] 183s FAILED tests/test_exporter.py::test_exporter_doesnt_confuse_repeated_packages[1.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_cyclic[1.1] 183s FAILED tests/test_exporter.py::test_exporter_omits_and_includes_extras_for_txt_formats[2.1-constraints.txt-expected0] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_extras[2.1-True-expected0] 183s FAILED tests/test_exporter.py::test_exporter_omits_and_includes_extras_for_txt_formats[1.1-requirements.txt-expected1] 183s FAILED tests/test_exporter.py::test_exporter_omits_and_includes_extras_for_txt_formats[1.1-constraints.txt-expected0] 183s FAILED tests/test_exporter.py::test_exporter_omits_and_includes_extras_for_txt_formats[2.1-requirements.txt-expected1] 183s FAILED tests/test_exporter.py::test_exporter_prints_warning_for_constraints_txt_with_editable_packages[2.1] 183s FAILED tests/test_exporter.py::test_exporter_prints_warning_for_constraints_txt_with_editable_packages[1.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_extra_index_url_and_trusted_host[1.1] 183s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_extras[2.1-False-expected1] 183s FAILED tests/test_exporter.py::test_exporter_exports_extra_index_url_and_trusted_host[2.1] 183s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities2-expected2] 183s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities0-expected0] 183s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities1-expected1] 183s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities4-expected4] 183s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities6-expected6] 183s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities3-expected3] 183s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities0-expected0] 183s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities5-expected5] 183s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities1-expected1] 183s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities4-expected4] 183s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities5-expected5] 183s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities2-expected2] 183s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities6-expected6] 183s FAILED tests/test_exporter.py::test_dependency_walk_error[2.1] - assert 'bar=... 183s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities3-expected3] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_file_packages[1.1] 183s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_file_packages[2.1] 183s ======================== 103 failed, 38 passed in 5.86s ======================== 183s E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /tmp/autopkgtest.C8nkQ3/autopkgtest_tmp/build; python3.13 -m pytest tests 183s pybuild-autopkgtest: error: pybuild --autopkgtest --test-pytest -i python{version} -p 3.13 returned exit code 13 183s make: *** [/tmp/LuonM12GRv/run:4: pybuild-autopkgtest] Error 25 183s pybuild-autopkgtest: error: /tmp/LuonM12GRv/run pybuild-autopkgtest returned exit code 2 183s autopkgtest [09:21:34]: test pybuild-autopkgtest: -----------------------] 187s autopkgtest [09:21:38]: test pybuild-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 187s pybuild-autopkgtest FAIL non-zero exit status 25 191s autopkgtest [09:21:42]: @@@@@@@@@@@@@@@@@@@@ summary 192s pybuild-autopkgtest FAIL non-zero exit status 25