0s autopkgtest [09:18:32]: starting date and time: 2025-03-13 09:18:32+0000 0s autopkgtest [09:18:32]: git checkout: 325255d2 Merge branch 'pin-any-arch' into 'ubuntu/production' 0s autopkgtest [09:18:32]: host juju-7f2275-prod-proposed-migration-environment-20; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.7ensbrih/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --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' -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-ppc64el --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-20@bos03-ppc64el-11.secgroup --name adt-plucky-ppc64el-poetry-plugin-export-20250313-091832-juju-7f2275-prod-proposed-migration-environment-20-3ff25e1a-b910-4a63-aa08-e8d856b1d913 --image adt/ubuntu-plucky-ppc64el-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-20 --net-id=net_prod-proposed-migration-ppc64el -e TERM=linux -e ''"'"'http_proxy=http://squid.internal:3128'"'"'' -e ''"'"'https_proxy=http://squid.internal:3128'"'"'' -e ''"'"'no_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'"'"'' --mirror=http://ftpmaster.internal/ubuntu/ 94s autopkgtest [09:20:06]: testbed dpkg architecture: ppc64el 94s autopkgtest [09:20:06]: testbed apt version: 2.9.32ubuntu1 94s autopkgtest [09:20:06]: @@@@@@@@@@@@@@@@@@@@ test bed setup 94s autopkgtest [09:20:06]: testbed release detected to be: None 95s autopkgtest [09:20:07]: updating testbed package index (apt update) 96s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [110 kB] 96s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 96s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 96s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 96s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [44.2 kB] 96s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [429 kB] 96s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [11.5 kB] 96s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/main ppc64el Packages [57.9 kB] 96s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/universe ppc64el Packages [358 kB] 96s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse ppc64el Packages [3020 B] 96s Fetched 1014 kB in 1s (1138 kB/s) 97s Reading package lists... 98s Reading package lists... 98s Building dependency tree... 98s Reading state information... 98s Calculating upgrade... 98s Calculating upgrade... 98s The following NEW packages will be installed: 98s pnp.ids 98s The following packages will be upgraded: 98s gir1.2-glib-2.0 htop hwdata libglib2.0-0t64 libglib2.0-data 98s 5 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 98s Need to get 2297 kB of archives. 98s After this operation, 11.3 kB of additional disk space will be used. 98s Get:1 http://ftpmaster.internal/ubuntu plucky/main ppc64el gir1.2-glib-2.0 ppc64el 2.84.0-1 [184 kB] 99s Get:2 http://ftpmaster.internal/ubuntu plucky/main ppc64el libglib2.0-0t64 ppc64el 2.84.0-1 [1802 kB] 99s Get:3 http://ftpmaster.internal/ubuntu plucky/main ppc64el libglib2.0-data all 2.84.0-1 [53.0 kB] 99s Get:4 http://ftpmaster.internal/ubuntu plucky/main ppc64el htop ppc64el 3.4.0-2 [227 kB] 99s Get:5 http://ftpmaster.internal/ubuntu plucky/main ppc64el hwdata all 0.393-3 [1562 B] 99s Get:6 http://ftpmaster.internal/ubuntu plucky/main ppc64el pnp.ids all 0.393-3 [29.5 kB] 99s Fetched 2297 kB in 1s (3693 kB/s) 100s (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 ... 107190 files and directories currently installed.) 100s Preparing to unpack .../0-gir1.2-glib-2.0_2.84.0-1_ppc64el.deb ... 100s Unpacking gir1.2-glib-2.0:ppc64el (2.84.0-1) over (2.83.5-1) ... 100s Preparing to unpack .../1-libglib2.0-0t64_2.84.0-1_ppc64el.deb ... 100s Unpacking libglib2.0-0t64:ppc64el (2.84.0-1) over (2.83.5-1) ... 100s Preparing to unpack .../2-libglib2.0-data_2.84.0-1_all.deb ... 100s Unpacking libglib2.0-data (2.84.0-1) over (2.83.5-1) ... 100s Preparing to unpack .../3-htop_3.4.0-2_ppc64el.deb ... 100s Unpacking htop (3.4.0-2) over (3.4.0-1) ... 100s Preparing to unpack .../4-hwdata_0.393-3_all.deb ... 100s Unpacking hwdata (0.393-3) over (0.393-1) ... 100s Selecting previously unselected package pnp.ids. 100s Preparing to unpack .../5-pnp.ids_0.393-3_all.deb ... 100s Unpacking pnp.ids (0.393-3) ... 100s Setting up htop (3.4.0-2) ... 100s Setting up libglib2.0-0t64:ppc64el (2.84.0-1) ... 100s No schema files found: doing nothing. 100s Setting up libglib2.0-data (2.84.0-1) ... 100s Setting up gir1.2-glib-2.0:ppc64el (2.84.0-1) ... 100s Setting up pnp.ids (0.393-3) ... 100s Setting up hwdata (0.393-3) ... 100s Processing triggers for man-db (2.13.0-1) ... 100s Processing triggers for libc-bin (2.41-1ubuntu1) ... 101s Reading package lists... 101s Building dependency tree... 101s Reading state information... 101s Solving dependencies... 101s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 101s autopkgtest [09:20:13]: upgrading testbed (apt dist-upgrade and autopurge) 101s Reading package lists... 101s Building dependency tree... 101s Reading state information... 102s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 102s Starting 2 pkgProblemResolver with broken count: 0 102s Done 102s Entering ResolveByKeep 102s 102s Calculating upgrade... 102s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 102s Reading package lists... 103s Building dependency tree... 103s Reading state information... 103s Starting pkgProblemResolver with broken count: 0 103s Starting 2 pkgProblemResolver with broken count: 0 103s Done 103s Solving dependencies... 103s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 106s autopkgtest [09:20:18]: testbed running kernel: Linux 6.14.0-7-generic #7-Ubuntu SMP Fri Feb 28 12:06:33 UTC 2025 106s autopkgtest [09:20:18]: @@@@@@@@@@@@@@@@@@@@ apt-source poetry-plugin-export 107s Get:1 http://ftpmaster.internal/ubuntu plucky/universe poetry-plugin-export 1.9.0-1 (dsc) [2323 B] 107s Get:2 http://ftpmaster.internal/ubuntu plucky/universe poetry-plugin-export 1.9.0-1 (tar) [77.4 kB] 107s Get:3 http://ftpmaster.internal/ubuntu plucky/universe poetry-plugin-export 1.9.0-1 (diff) [2336 B] 108s gpgv: Signature made Thu Jan 23 02:44:17 2025 UTC 108s gpgv: using RSA key 13796755BBC72BB8ABE2AEB5FA9DEC5DE11C63F1 108s gpgv: issuer "eamanu@debian.org" 108s gpgv: Can't check signature: No public key 108s dpkg-source: warning: cannot verify inline signature for ./poetry-plugin-export_1.9.0-1.dsc: no acceptable signature found 108s autopkgtest [09:20:20]: testing package poetry-plugin-export version 1.9.0-1 108s autopkgtest [09:20:20]: build not needed 108s autopkgtest [09:20:20]: test pybuild-autopkgtest: preparing testbed 109s Reading package lists... 109s Building dependency tree... 109s Reading state information... 109s Starting pkgProblemResolver with broken count: 0 109s Starting 2 pkgProblemResolver with broken count: 0 109s Done 109s The following NEW packages will be installed: 109s autoconf automake autopoint autotools-dev build-essential cpp cpp-14 109s cpp-14-powerpc64le-linux-gnu cpp-powerpc64le-linux-gnu debhelper debugedit 109s dh-autoreconf dh-python dh-strip-nondeterminism dwz g++ g++-14 109s g++-14-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu gcc gcc-14 109s gcc-14-powerpc64le-linux-gnu gcc-powerpc64le-linux-gnu gettext 109s intltool-debian libarchive-zip-perl libasan8 libcc1-0 libdebhelper-perl 109s libfile-stripnondeterminism-perl libgcc-14-dev libgomp1 libisl23 libitm1 109s libjs-jquery libjs-jquery-hotkeys libjs-jquery-isonscreen 109s libjs-jquery-metadata libjs-jquery-tablesorter 109s libjs-jquery-throttle-debounce liblsan0 libmpc3 libquadmath0 109s libstdc++-14-dev libtool libtsan2 libubsan1 m4 po-debconf 109s pybuild-plugin-autopkgtest pybuild-plugin-pyproject python3-all 109s python3-build python3-cachecontrol python3-cleo python3-coverage 109s python3-distlib python3-dulwich python3-execnet python3-fastjsonschema 109s python3-filelock python3-findpython python3-importlib-metadata 109s python3-iniconfig python3-installer python3-jaraco.classes python3-jeepney 109s python3-keyring python3-msgpack python3-packaging python3-pbs-installer 109s python3-pip-whl python3-pkginfo python3-platformdirs python3-pluggy 109s python3-poetry python3-poetry-core python3-poetry-plugin-export 109s python3-pyproject-hooks python3-pytest python3-pytest-cov 109s python3-pytest-mock python3-pytest-xdist python3-rapidfuzz 109s python3-requests-toolbelt python3-secretstorage python3-setuptools-whl 109s python3-shellingham python3-toml python3-tomlkit python3-trove-classifiers 109s python3-virtualenv python3-wheel python3-wheel-whl 109s 0 upgraded, 94 newly installed, 0 to remove and 0 not upgraded. 109s Need to get 69.1 MB of archives. 109s After this operation, 248 MB of additional disk space will be used. 109s Get:1 http://ftpmaster.internal/ubuntu plucky/main ppc64el m4 ppc64el 1.4.19-7 [279 kB] 110s Get:2 http://ftpmaster.internal/ubuntu plucky/main ppc64el autoconf all 2.72-3ubuntu1 [383 kB] 110s Get:3 http://ftpmaster.internal/ubuntu plucky/main ppc64el autotools-dev all 20220109.1 [44.9 kB] 110s Get:4 http://ftpmaster.internal/ubuntu plucky/main ppc64el automake all 1:1.17-3ubuntu1 [572 kB] 110s Get:5 http://ftpmaster.internal/ubuntu plucky/main ppc64el autopoint all 0.23.1-1 [619 kB] 110s Get:6 http://ftpmaster.internal/ubuntu plucky/main ppc64el libisl23 ppc64el 0.27-1 [882 kB] 110s Get:7 http://ftpmaster.internal/ubuntu plucky/main ppc64el libmpc3 ppc64el 1.3.1-1build2 [62.1 kB] 110s Get:8 http://ftpmaster.internal/ubuntu plucky/main ppc64el cpp-14-powerpc64le-linux-gnu ppc64el 14.2.0-17ubuntu3 [10.5 MB] 110s Get:9 http://ftpmaster.internal/ubuntu plucky/main ppc64el cpp-14 ppc64el 14.2.0-17ubuntu3 [1036 B] 110s Get:10 http://ftpmaster.internal/ubuntu plucky/main ppc64el cpp-powerpc64le-linux-gnu ppc64el 4:14.2.0-1ubuntu1 [5566 B] 110s Get:11 http://ftpmaster.internal/ubuntu plucky/main ppc64el cpp ppc64el 4:14.2.0-1ubuntu1 [22.4 kB] 110s Get:12 http://ftpmaster.internal/ubuntu plucky/main ppc64el libcc1-0 ppc64el 15-20250222-0ubuntu1 [48.7 kB] 110s Get:13 http://ftpmaster.internal/ubuntu plucky/main ppc64el libgomp1 ppc64el 15-20250222-0ubuntu1 [168 kB] 110s Get:14 http://ftpmaster.internal/ubuntu plucky/main ppc64el libitm1 ppc64el 15-20250222-0ubuntu1 [32.2 kB] 110s Get:15 http://ftpmaster.internal/ubuntu plucky/main ppc64el libasan8 ppc64el 15-20250222-0ubuntu1 [3009 kB] 110s Get:16 http://ftpmaster.internal/ubuntu plucky/main ppc64el liblsan0 ppc64el 15-20250222-0ubuntu1 [1376 kB] 111s Get:17 http://ftpmaster.internal/ubuntu plucky/main ppc64el libtsan2 ppc64el 15-20250222-0ubuntu1 [2733 kB] 111s Get:18 http://ftpmaster.internal/ubuntu plucky/main ppc64el libubsan1 ppc64el 15-20250222-0ubuntu1 [1234 kB] 111s Get:19 http://ftpmaster.internal/ubuntu plucky/main ppc64el libquadmath0 ppc64el 15-20250222-0ubuntu1 [160 kB] 111s Get:20 http://ftpmaster.internal/ubuntu plucky/main ppc64el libgcc-14-dev ppc64el 14.2.0-17ubuntu3 [1619 kB] 111s Get:21 http://ftpmaster.internal/ubuntu plucky/main ppc64el gcc-14-powerpc64le-linux-gnu ppc64el 14.2.0-17ubuntu3 [20.6 MB] 112s Get:22 http://ftpmaster.internal/ubuntu plucky/main ppc64el gcc-14 ppc64el 14.2.0-17ubuntu3 [536 kB] 112s Get:23 http://ftpmaster.internal/ubuntu plucky/main ppc64el gcc-powerpc64le-linux-gnu ppc64el 4:14.2.0-1ubuntu1 [1226 B] 112s Get:24 http://ftpmaster.internal/ubuntu plucky/main ppc64el gcc ppc64el 4:14.2.0-1ubuntu1 [5012 B] 112s Get:25 http://ftpmaster.internal/ubuntu plucky/main ppc64el libstdc++-14-dev ppc64el 14.2.0-17ubuntu3 [2678 kB] 112s Get:26 http://ftpmaster.internal/ubuntu plucky/main ppc64el g++-14-powerpc64le-linux-gnu ppc64el 14.2.0-17ubuntu3 [12.0 MB] 113s Get:27 http://ftpmaster.internal/ubuntu plucky/main ppc64el g++-14 ppc64el 14.2.0-17ubuntu3 [21.8 kB] 113s Get:28 http://ftpmaster.internal/ubuntu plucky/main ppc64el g++-powerpc64le-linux-gnu ppc64el 4:14.2.0-1ubuntu1 [966 B] 113s Get:29 http://ftpmaster.internal/ubuntu plucky/main ppc64el g++ ppc64el 4:14.2.0-1ubuntu1 [1088 B] 113s Get:30 http://ftpmaster.internal/ubuntu plucky/main ppc64el build-essential ppc64el 12.10ubuntu1 [4936 B] 113s Get:31 http://ftpmaster.internal/ubuntu plucky/main ppc64el libdebhelper-perl all 13.24.1ubuntu2 [95.4 kB] 113s Get:32 http://ftpmaster.internal/ubuntu plucky/main ppc64el libtool all 2.5.4-4 [168 kB] 113s Get:33 http://ftpmaster.internal/ubuntu plucky/main ppc64el dh-autoreconf all 20 [16.1 kB] 113s Get:34 http://ftpmaster.internal/ubuntu plucky/main ppc64el libarchive-zip-perl all 1.68-1 [90.2 kB] 113s Get:35 http://ftpmaster.internal/ubuntu plucky/main ppc64el libfile-stripnondeterminism-perl all 1.14.1-2 [20.3 kB] 113s Get:36 http://ftpmaster.internal/ubuntu plucky/main ppc64el dh-strip-nondeterminism all 1.14.1-2 [5064 B] 114s Get:37 http://ftpmaster.internal/ubuntu plucky/main ppc64el debugedit ppc64el 1:5.1-2 [52.4 kB] 114s Get:38 http://ftpmaster.internal/ubuntu plucky/main ppc64el dwz ppc64el 0.15-1build6 [142 kB] 114s Get:39 http://ftpmaster.internal/ubuntu plucky/main ppc64el gettext ppc64el 0.23.1-1 [1155 kB] 114s Get:40 http://ftpmaster.internal/ubuntu plucky/main ppc64el intltool-debian all 0.35.0+20060710.6 [23.2 kB] 114s Get:41 http://ftpmaster.internal/ubuntu plucky/main ppc64el po-debconf all 1.0.21+nmu1 [233 kB] 114s Get:42 http://ftpmaster.internal/ubuntu plucky/main ppc64el debhelper all 13.24.1ubuntu2 [895 kB] 114s Get:43 http://ftpmaster.internal/ubuntu plucky/universe ppc64el dh-python all 6.20250308 [118 kB] 114s Get:44 http://ftpmaster.internal/ubuntu plucky/main ppc64el libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [328 kB] 114s Get:45 http://ftpmaster.internal/ubuntu plucky/universe ppc64el libjs-jquery-metadata all 12-4 [6582 B] 114s Get:46 http://ftpmaster.internal/ubuntu plucky/universe ppc64el libjs-jquery-tablesorter all 1:2.31.3+dfsg1-4 [192 kB] 114s Get:47 http://ftpmaster.internal/ubuntu plucky/universe ppc64el libjs-jquery-throttle-debounce all 1.1+dfsg.1-2 [12.5 kB] 114s Get:48 http://ftpmaster.internal/ubuntu plucky/universe ppc64el pybuild-plugin-autopkgtest all 6.20250308 [1744 B] 114s Get:49 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-importlib-metadata all 8.6.1-1 [20.7 kB] 114s Get:50 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-packaging all 24.2-1 [51.5 kB] 114s Get:51 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-pyproject-hooks all 1.2.0-1 [10.2 kB] 114s Get:52 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-toml all 0.10.2-1 [16.5 kB] 114s Get:53 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-wheel all 0.45.1-1 [57.7 kB] 114s Get:54 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-build all 1.2.2-1 [31.0 kB] 114s Get:55 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-installer all 0.7.0+dfsg1-3 [17.4 kB] 114s Get:56 http://ftpmaster.internal/ubuntu plucky/universe ppc64el pybuild-plugin-pyproject all 6.20250308 [1726 B] 114s Get:57 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-all ppc64el 3.13.2-2 [884 B] 114s Get:58 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-msgpack ppc64el 1.0.3-3build4 [89.5 kB] 114s Get:59 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-cachecontrol all 0.14.2-1 [18.7 kB] 114s Get:60 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-rapidfuzz ppc64el 3.12.1+ds-1build1 [1129 kB] 114s Get:61 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-cleo all 2.2.1-4 [52.4 kB] 114s Get:62 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-coverage ppc64el 7.6.0+dfsg1-2build1 [154 kB] 114s Get:63 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-distlib all 0.3.9-1 [267 kB] 114s Get:64 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-dulwich ppc64el 0.22.7-1 [183 kB] 114s Get:65 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-execnet all 2.1.1-1 [33.4 kB] 114s Get:66 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-fastjsonschema all 2.21.1-1 [20.4 kB] 114s Get:67 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-filelock all 3.17.0-1 [13.0 kB] 114s Get:68 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-findpython all 0.6.2-1 [15.3 kB] 114s Get:69 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-iniconfig all 1.1.1-2 [6024 B] 114s Get:70 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-jaraco.classes all 3.4.0-1 [7664 B] 114s Get:71 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-jeepney all 0.8.0-4 [33.1 kB] 114s Get:72 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-secretstorage all 3.3.3-3 [13.7 kB] 114s Get:73 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-keyring all 25.6.0-1 [40.6 kB] 114s Get:74 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-pbs-installer all 2025.02.12-2 [43.8 kB] 114s Get:75 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-pip-whl all 25.0+dfsg-1 [1446 kB] 114s Get:76 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-pkginfo all 1.12.1.2-2 [17.4 kB] 114s Get:77 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-platformdirs all 4.3.6-1 [16.8 kB] 114s Get:78 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-pluggy all 1.5.0-1 [21.0 kB] 114s Get:79 http://ftpmaster.internal/ubuntu plucky-proposed/universe ppc64el python3-poetry-core all 2.1.1-1 [221 kB] 114s Get:80 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-requests-toolbelt all 1.0.0-4 [37.0 kB] 114s Get:81 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-shellingham all 1.5.4-1 [9482 B] 114s Get:82 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-tomlkit all 0.13.2-1 [37.6 kB] 114s Get:83 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-trove-classifiers all 2025.1.15.22-1 [10.9 kB] 114s Get:84 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-setuptools-whl all 75.8.0-1 [1152 kB] 114s Get:85 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-wheel-whl all 0.45.1-1 [74.6 kB] 114s Get:86 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-virtualenv all 20.29.1+ds-1 [72.6 kB] 114s Get:87 http://ftpmaster.internal/ubuntu plucky-proposed/universe ppc64el python3-poetry all 2.1.1+dfsg-1 [165 kB] 114s Get:88 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-poetry-plugin-export all 1.9.0-1 [10.3 kB] 114s Get:89 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-pytest all 8.3.4-1 [252 kB] 114s Get:90 http://ftpmaster.internal/ubuntu plucky/universe ppc64el libjs-jquery-hotkeys all 0.2.0-1 [13.3 kB] 114s Get:91 http://ftpmaster.internal/ubuntu plucky/universe ppc64el libjs-jquery-isonscreen all 1.2.0-1.1 [3244 B] 114s Get:92 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-pytest-cov all 5.0.0-1 [21.3 kB] 114s Get:93 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-pytest-mock all 3.14.0-2 [11.7 kB] 114s Get:94 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-pytest-xdist all 3.6.1-1 [33.8 kB] 115s Fetched 69.1 MB in 5s (13.4 MB/s) 115s Selecting previously unselected package m4. 115s (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 ... 107193 files and directories currently installed.) 115s Preparing to unpack .../00-m4_1.4.19-7_ppc64el.deb ... 115s Unpacking m4 (1.4.19-7) ... 115s Selecting previously unselected package autoconf. 115s Preparing to unpack .../01-autoconf_2.72-3ubuntu1_all.deb ... 115s Unpacking autoconf (2.72-3ubuntu1) ... 115s Selecting previously unselected package autotools-dev. 115s Preparing to unpack .../02-autotools-dev_20220109.1_all.deb ... 115s Unpacking autotools-dev (20220109.1) ... 115s Selecting previously unselected package automake. 115s Preparing to unpack .../03-automake_1%3a1.17-3ubuntu1_all.deb ... 115s Unpacking automake (1:1.17-3ubuntu1) ... 115s Selecting previously unselected package autopoint. 115s Preparing to unpack .../04-autopoint_0.23.1-1_all.deb ... 115s Unpacking autopoint (0.23.1-1) ... 115s Selecting previously unselected package libisl23:ppc64el. 115s Preparing to unpack .../05-libisl23_0.27-1_ppc64el.deb ... 115s Unpacking libisl23:ppc64el (0.27-1) ... 115s Selecting previously unselected package libmpc3:ppc64el. 115s Preparing to unpack .../06-libmpc3_1.3.1-1build2_ppc64el.deb ... 115s Unpacking libmpc3:ppc64el (1.3.1-1build2) ... 115s Selecting previously unselected package cpp-14-powerpc64le-linux-gnu. 115s Preparing to unpack .../07-cpp-14-powerpc64le-linux-gnu_14.2.0-17ubuntu3_ppc64el.deb ... 115s Unpacking cpp-14-powerpc64le-linux-gnu (14.2.0-17ubuntu3) ... 115s Selecting previously unselected package cpp-14. 115s Preparing to unpack .../08-cpp-14_14.2.0-17ubuntu3_ppc64el.deb ... 115s Unpacking cpp-14 (14.2.0-17ubuntu3) ... 115s Selecting previously unselected package cpp-powerpc64le-linux-gnu. 115s Preparing to unpack .../09-cpp-powerpc64le-linux-gnu_4%3a14.2.0-1ubuntu1_ppc64el.deb ... 115s Unpacking cpp-powerpc64le-linux-gnu (4:14.2.0-1ubuntu1) ... 115s Selecting previously unselected package cpp. 115s Preparing to unpack .../10-cpp_4%3a14.2.0-1ubuntu1_ppc64el.deb ... 115s Unpacking cpp (4:14.2.0-1ubuntu1) ... 115s Selecting previously unselected package libcc1-0:ppc64el. 115s Preparing to unpack .../11-libcc1-0_15-20250222-0ubuntu1_ppc64el.deb ... 115s Unpacking libcc1-0:ppc64el (15-20250222-0ubuntu1) ... 115s Selecting previously unselected package libgomp1:ppc64el. 115s Preparing to unpack .../12-libgomp1_15-20250222-0ubuntu1_ppc64el.deb ... 115s Unpacking libgomp1:ppc64el (15-20250222-0ubuntu1) ... 115s Selecting previously unselected package libitm1:ppc64el. 115s Preparing to unpack .../13-libitm1_15-20250222-0ubuntu1_ppc64el.deb ... 115s Unpacking libitm1:ppc64el (15-20250222-0ubuntu1) ... 115s Selecting previously unselected package libasan8:ppc64el. 115s Preparing to unpack .../14-libasan8_15-20250222-0ubuntu1_ppc64el.deb ... 115s Unpacking libasan8:ppc64el (15-20250222-0ubuntu1) ... 115s Selecting previously unselected package liblsan0:ppc64el. 115s Preparing to unpack .../15-liblsan0_15-20250222-0ubuntu1_ppc64el.deb ... 115s Unpacking liblsan0:ppc64el (15-20250222-0ubuntu1) ... 115s Selecting previously unselected package libtsan2:ppc64el. 115s Preparing to unpack .../16-libtsan2_15-20250222-0ubuntu1_ppc64el.deb ... 115s Unpacking libtsan2:ppc64el (15-20250222-0ubuntu1) ... 115s Selecting previously unselected package libubsan1:ppc64el. 115s Preparing to unpack .../17-libubsan1_15-20250222-0ubuntu1_ppc64el.deb ... 115s Unpacking libubsan1:ppc64el (15-20250222-0ubuntu1) ... 115s Selecting previously unselected package libquadmath0:ppc64el. 115s Preparing to unpack .../18-libquadmath0_15-20250222-0ubuntu1_ppc64el.deb ... 115s Unpacking libquadmath0:ppc64el (15-20250222-0ubuntu1) ... 115s Selecting previously unselected package libgcc-14-dev:ppc64el. 115s Preparing to unpack .../19-libgcc-14-dev_14.2.0-17ubuntu3_ppc64el.deb ... 115s Unpacking libgcc-14-dev:ppc64el (14.2.0-17ubuntu3) ... 115s Selecting previously unselected package gcc-14-powerpc64le-linux-gnu. 115s Preparing to unpack .../20-gcc-14-powerpc64le-linux-gnu_14.2.0-17ubuntu3_ppc64el.deb ... 115s Unpacking gcc-14-powerpc64le-linux-gnu (14.2.0-17ubuntu3) ... 116s Selecting previously unselected package gcc-14. 116s Preparing to unpack .../21-gcc-14_14.2.0-17ubuntu3_ppc64el.deb ... 116s Unpacking gcc-14 (14.2.0-17ubuntu3) ... 116s Selecting previously unselected package gcc-powerpc64le-linux-gnu. 116s Preparing to unpack .../22-gcc-powerpc64le-linux-gnu_4%3a14.2.0-1ubuntu1_ppc64el.deb ... 116s Unpacking gcc-powerpc64le-linux-gnu (4:14.2.0-1ubuntu1) ... 116s Selecting previously unselected package gcc. 116s Preparing to unpack .../23-gcc_4%3a14.2.0-1ubuntu1_ppc64el.deb ... 116s Unpacking gcc (4:14.2.0-1ubuntu1) ... 116s Selecting previously unselected package libstdc++-14-dev:ppc64el. 116s Preparing to unpack .../24-libstdc++-14-dev_14.2.0-17ubuntu3_ppc64el.deb ... 116s Unpacking libstdc++-14-dev:ppc64el (14.2.0-17ubuntu3) ... 116s Selecting previously unselected package g++-14-powerpc64le-linux-gnu. 116s Preparing to unpack .../25-g++-14-powerpc64le-linux-gnu_14.2.0-17ubuntu3_ppc64el.deb ... 116s Unpacking g++-14-powerpc64le-linux-gnu (14.2.0-17ubuntu3) ... 116s Selecting previously unselected package g++-14. 116s Preparing to unpack .../26-g++-14_14.2.0-17ubuntu3_ppc64el.deb ... 116s Unpacking g++-14 (14.2.0-17ubuntu3) ... 116s Selecting previously unselected package g++-powerpc64le-linux-gnu. 116s Preparing to unpack .../27-g++-powerpc64le-linux-gnu_4%3a14.2.0-1ubuntu1_ppc64el.deb ... 116s Unpacking g++-powerpc64le-linux-gnu (4:14.2.0-1ubuntu1) ... 116s Selecting previously unselected package g++. 116s Preparing to unpack .../28-g++_4%3a14.2.0-1ubuntu1_ppc64el.deb ... 116s Unpacking g++ (4:14.2.0-1ubuntu1) ... 116s Selecting previously unselected package build-essential. 116s Preparing to unpack .../29-build-essential_12.10ubuntu1_ppc64el.deb ... 116s Unpacking build-essential (12.10ubuntu1) ... 116s Selecting previously unselected package libdebhelper-perl. 116s Preparing to unpack .../30-libdebhelper-perl_13.24.1ubuntu2_all.deb ... 116s Unpacking libdebhelper-perl (13.24.1ubuntu2) ... 116s Selecting previously unselected package libtool. 116s Preparing to unpack .../31-libtool_2.5.4-4_all.deb ... 116s Unpacking libtool (2.5.4-4) ... 116s Selecting previously unselected package dh-autoreconf. 116s Preparing to unpack .../32-dh-autoreconf_20_all.deb ... 116s Unpacking dh-autoreconf (20) ... 116s Selecting previously unselected package libarchive-zip-perl. 116s Preparing to unpack .../33-libarchive-zip-perl_1.68-1_all.deb ... 116s Unpacking libarchive-zip-perl (1.68-1) ... 116s Selecting previously unselected package libfile-stripnondeterminism-perl. 116s Preparing to unpack .../34-libfile-stripnondeterminism-perl_1.14.1-2_all.deb ... 116s Unpacking libfile-stripnondeterminism-perl (1.14.1-2) ... 116s Selecting previously unselected package dh-strip-nondeterminism. 116s Preparing to unpack .../35-dh-strip-nondeterminism_1.14.1-2_all.deb ... 116s Unpacking dh-strip-nondeterminism (1.14.1-2) ... 116s Selecting previously unselected package debugedit. 116s Preparing to unpack .../36-debugedit_1%3a5.1-2_ppc64el.deb ... 116s Unpacking debugedit (1:5.1-2) ... 116s Selecting previously unselected package dwz. 116s Preparing to unpack .../37-dwz_0.15-1build6_ppc64el.deb ... 116s Unpacking dwz (0.15-1build6) ... 116s Selecting previously unselected package gettext. 116s Preparing to unpack .../38-gettext_0.23.1-1_ppc64el.deb ... 116s Unpacking gettext (0.23.1-1) ... 116s Selecting previously unselected package intltool-debian. 116s Preparing to unpack .../39-intltool-debian_0.35.0+20060710.6_all.deb ... 116s Unpacking intltool-debian (0.35.0+20060710.6) ... 116s Selecting previously unselected package po-debconf. 116s Preparing to unpack .../40-po-debconf_1.0.21+nmu1_all.deb ... 116s Unpacking po-debconf (1.0.21+nmu1) ... 116s Selecting previously unselected package debhelper. 116s Preparing to unpack .../41-debhelper_13.24.1ubuntu2_all.deb ... 116s Unpacking debhelper (13.24.1ubuntu2) ... 117s Selecting previously unselected package dh-python. 117s Preparing to unpack .../42-dh-python_6.20250308_all.deb ... 117s Unpacking dh-python (6.20250308) ... 117s Selecting previously unselected package libjs-jquery. 117s Preparing to unpack .../43-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ... 117s Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 117s Selecting previously unselected package libjs-jquery-metadata. 117s Preparing to unpack .../44-libjs-jquery-metadata_12-4_all.deb ... 117s Unpacking libjs-jquery-metadata (12-4) ... 117s Selecting previously unselected package libjs-jquery-tablesorter. 117s Preparing to unpack .../45-libjs-jquery-tablesorter_1%3a2.31.3+dfsg1-4_all.deb ... 117s Unpacking libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 117s Selecting previously unselected package libjs-jquery-throttle-debounce. 117s Preparing to unpack .../46-libjs-jquery-throttle-debounce_1.1+dfsg.1-2_all.deb ... 117s Unpacking libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 117s Selecting previously unselected package pybuild-plugin-autopkgtest. 117s Preparing to unpack .../47-pybuild-plugin-autopkgtest_6.20250308_all.deb ... 117s Unpacking pybuild-plugin-autopkgtest (6.20250308) ... 117s Selecting previously unselected package python3-importlib-metadata. 117s Preparing to unpack .../48-python3-importlib-metadata_8.6.1-1_all.deb ... 117s Unpacking python3-importlib-metadata (8.6.1-1) ... 117s Selecting previously unselected package python3-packaging. 117s Preparing to unpack .../49-python3-packaging_24.2-1_all.deb ... 117s Unpacking python3-packaging (24.2-1) ... 117s Selecting previously unselected package python3-pyproject-hooks. 117s Preparing to unpack .../50-python3-pyproject-hooks_1.2.0-1_all.deb ... 117s Unpacking python3-pyproject-hooks (1.2.0-1) ... 117s Selecting previously unselected package python3-toml. 117s Preparing to unpack .../51-python3-toml_0.10.2-1_all.deb ... 117s Unpacking python3-toml (0.10.2-1) ... 117s Selecting previously unselected package python3-wheel. 117s Preparing to unpack .../52-python3-wheel_0.45.1-1_all.deb ... 117s Unpacking python3-wheel (0.45.1-1) ... 117s Selecting previously unselected package python3-build. 117s Preparing to unpack .../53-python3-build_1.2.2-1_all.deb ... 117s Unpacking python3-build (1.2.2-1) ... 117s Selecting previously unselected package python3-installer. 117s Preparing to unpack .../54-python3-installer_0.7.0+dfsg1-3_all.deb ... 117s Unpacking python3-installer (0.7.0+dfsg1-3) ... 117s Selecting previously unselected package pybuild-plugin-pyproject. 117s Preparing to unpack .../55-pybuild-plugin-pyproject_6.20250308_all.deb ... 117s Unpacking pybuild-plugin-pyproject (6.20250308) ... 117s Selecting previously unselected package python3-all. 117s Preparing to unpack .../56-python3-all_3.13.2-2_ppc64el.deb ... 117s Unpacking python3-all (3.13.2-2) ... 117s Selecting previously unselected package python3-msgpack. 117s Preparing to unpack .../57-python3-msgpack_1.0.3-3build4_ppc64el.deb ... 117s Unpacking python3-msgpack (1.0.3-3build4) ... 117s Selecting previously unselected package python3-cachecontrol. 117s Preparing to unpack .../58-python3-cachecontrol_0.14.2-1_all.deb ... 117s Unpacking python3-cachecontrol (0.14.2-1) ... 117s Selecting previously unselected package python3-rapidfuzz. 117s Preparing to unpack .../59-python3-rapidfuzz_3.12.1+ds-1build1_ppc64el.deb ... 117s Unpacking python3-rapidfuzz (3.12.1+ds-1build1) ... 117s Selecting previously unselected package python3-cleo. 117s Preparing to unpack .../60-python3-cleo_2.2.1-4_all.deb ... 117s Unpacking python3-cleo (2.2.1-4) ... 117s Selecting previously unselected package python3-coverage. 117s Preparing to unpack .../61-python3-coverage_7.6.0+dfsg1-2build1_ppc64el.deb ... 117s Unpacking python3-coverage (7.6.0+dfsg1-2build1) ... 117s Selecting previously unselected package python3-distlib. 117s Preparing to unpack .../62-python3-distlib_0.3.9-1_all.deb ... 117s Unpacking python3-distlib (0.3.9-1) ... 117s Selecting previously unselected package python3-dulwich. 117s Preparing to unpack .../63-python3-dulwich_0.22.7-1_ppc64el.deb ... 117s Unpacking python3-dulwich (0.22.7-1) ... 117s Selecting previously unselected package python3-execnet. 117s Preparing to unpack .../64-python3-execnet_2.1.1-1_all.deb ... 117s Unpacking python3-execnet (2.1.1-1) ... 117s Selecting previously unselected package python3-fastjsonschema. 117s Preparing to unpack .../65-python3-fastjsonschema_2.21.1-1_all.deb ... 117s Unpacking python3-fastjsonschema (2.21.1-1) ... 117s Selecting previously unselected package python3-filelock. 117s Preparing to unpack .../66-python3-filelock_3.17.0-1_all.deb ... 117s Unpacking python3-filelock (3.17.0-1) ... 117s Selecting previously unselected package python3-findpython. 117s Preparing to unpack .../67-python3-findpython_0.6.2-1_all.deb ... 117s Unpacking python3-findpython (0.6.2-1) ... 117s Selecting previously unselected package python3-iniconfig. 117s Preparing to unpack .../68-python3-iniconfig_1.1.1-2_all.deb ... 117s Unpacking python3-iniconfig (1.1.1-2) ... 117s Selecting previously unselected package python3-jaraco.classes. 117s Preparing to unpack .../69-python3-jaraco.classes_3.4.0-1_all.deb ... 117s Unpacking python3-jaraco.classes (3.4.0-1) ... 117s Selecting previously unselected package python3-jeepney. 117s Preparing to unpack .../70-python3-jeepney_0.8.0-4_all.deb ... 117s Unpacking python3-jeepney (0.8.0-4) ... 117s Selecting previously unselected package python3-secretstorage. 117s Preparing to unpack .../71-python3-secretstorage_3.3.3-3_all.deb ... 117s Unpacking python3-secretstorage (3.3.3-3) ... 117s Selecting previously unselected package python3-keyring. 117s Preparing to unpack .../72-python3-keyring_25.6.0-1_all.deb ... 117s Unpacking python3-keyring (25.6.0-1) ... 117s Selecting previously unselected package python3-pbs-installer. 117s Preparing to unpack .../73-python3-pbs-installer_2025.02.12-2_all.deb ... 117s Unpacking python3-pbs-installer (2025.02.12-2) ... 117s Selecting previously unselected package python3-pip-whl. 117s Preparing to unpack .../74-python3-pip-whl_25.0+dfsg-1_all.deb ... 117s Unpacking python3-pip-whl (25.0+dfsg-1) ... 117s Selecting previously unselected package python3-pkginfo. 117s Preparing to unpack .../75-python3-pkginfo_1.12.1.2-2_all.deb ... 117s Unpacking python3-pkginfo (1.12.1.2-2) ... 117s Selecting previously unselected package python3-platformdirs. 117s Preparing to unpack .../76-python3-platformdirs_4.3.6-1_all.deb ... 117s Unpacking python3-platformdirs (4.3.6-1) ... 117s Selecting previously unselected package python3-pluggy. 117s Preparing to unpack .../77-python3-pluggy_1.5.0-1_all.deb ... 117s Unpacking python3-pluggy (1.5.0-1) ... 117s Selecting previously unselected package python3-poetry-core. 117s Preparing to unpack .../78-python3-poetry-core_2.1.1-1_all.deb ... 117s Unpacking python3-poetry-core (2.1.1-1) ... 117s Selecting previously unselected package python3-requests-toolbelt. 117s Preparing to unpack .../79-python3-requests-toolbelt_1.0.0-4_all.deb ... 117s Unpacking python3-requests-toolbelt (1.0.0-4) ... 117s Selecting previously unselected package python3-shellingham. 117s Preparing to unpack .../80-python3-shellingham_1.5.4-1_all.deb ... 117s Unpacking python3-shellingham (1.5.4-1) ... 117s Selecting previously unselected package python3-tomlkit. 117s Preparing to unpack .../81-python3-tomlkit_0.13.2-1_all.deb ... 117s Unpacking python3-tomlkit (0.13.2-1) ... 117s Selecting previously unselected package python3-trove-classifiers. 117s Preparing to unpack .../82-python3-trove-classifiers_2025.1.15.22-1_all.deb ... 117s Unpacking python3-trove-classifiers (2025.1.15.22-1) ... 117s Selecting previously unselected package python3-setuptools-whl. 117s Preparing to unpack .../83-python3-setuptools-whl_75.8.0-1_all.deb ... 117s Unpacking python3-setuptools-whl (75.8.0-1) ... 117s Selecting previously unselected package python3-wheel-whl. 117s Preparing to unpack .../84-python3-wheel-whl_0.45.1-1_all.deb ... 117s Unpacking python3-wheel-whl (0.45.1-1) ... 117s Selecting previously unselected package python3-virtualenv. 117s Preparing to unpack .../85-python3-virtualenv_20.29.1+ds-1_all.deb ... 117s Unpacking python3-virtualenv (20.29.1+ds-1) ... 117s Selecting previously unselected package python3-poetry. 117s Preparing to unpack .../86-python3-poetry_2.1.1+dfsg-1_all.deb ... 117s Unpacking python3-poetry (2.1.1+dfsg-1) ... 117s Selecting previously unselected package python3-poetry-plugin-export. 117s Preparing to unpack .../87-python3-poetry-plugin-export_1.9.0-1_all.deb ... 117s Unpacking python3-poetry-plugin-export (1.9.0-1) ... 117s Selecting previously unselected package python3-pytest. 117s Preparing to unpack .../88-python3-pytest_8.3.4-1_all.deb ... 117s Unpacking python3-pytest (8.3.4-1) ... 118s Selecting previously unselected package libjs-jquery-hotkeys. 118s Preparing to unpack .../89-libjs-jquery-hotkeys_0.2.0-1_all.deb ... 118s Unpacking libjs-jquery-hotkeys (0.2.0-1) ... 118s Selecting previously unselected package libjs-jquery-isonscreen. 118s Preparing to unpack .../90-libjs-jquery-isonscreen_1.2.0-1.1_all.deb ... 118s Unpacking libjs-jquery-isonscreen (1.2.0-1.1) ... 118s Selecting previously unselected package python3-pytest-cov. 118s Preparing to unpack .../91-python3-pytest-cov_5.0.0-1_all.deb ... 118s Unpacking python3-pytest-cov (5.0.0-1) ... 118s Selecting previously unselected package python3-pytest-mock. 118s Preparing to unpack .../92-python3-pytest-mock_3.14.0-2_all.deb ... 118s Unpacking python3-pytest-mock (3.14.0-2) ... 118s Selecting previously unselected package python3-pytest-xdist. 118s Preparing to unpack .../93-python3-pytest-xdist_3.6.1-1_all.deb ... 118s Unpacking python3-pytest-xdist (3.6.1-1) ... 118s Setting up dh-python (6.20250308) ... 118s Setting up python3-iniconfig (1.1.1-2) ... 118s Setting up python3-rapidfuzz (3.12.1+ds-1build1) ... 118s Setting up python3-setuptools-whl (75.8.0-1) ... 118s Setting up python3-filelock (3.17.0-1) ... 118s Setting up python3-jaraco.classes (3.4.0-1) ... 118s Setting up python3-requests-toolbelt (1.0.0-4) ... 118s Setting up python3-importlib-metadata (8.6.1-1) ... 118s Setting up python3-pkginfo (1.12.1.2-2) ... 119s Setting up python3-pip-whl (25.0+dfsg-1) ... 119s Setting up libarchive-zip-perl (1.68-1) ... 119s Setting up libdebhelper-perl (13.24.1ubuntu2) ... 119s Setting up m4 (1.4.19-7) ... 119s Setting up python3-all (3.13.2-2) ... 119s Setting up python3-coverage (7.6.0+dfsg1-2build1) ... 119s Setting up libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 119s Setting up python3-distlib (0.3.9-1) ... 119s Setting up libgomp1:ppc64el (15-20250222-0ubuntu1) ... 119s Setting up python3-wheel (0.45.1-1) ... 119s Setting up python3-platformdirs (4.3.6-1) ... 119s Setting up autotools-dev (20220109.1) ... 119s Setting up python3-packaging (24.2-1) ... 119s Setting up python3-pyproject-hooks (1.2.0-1) ... 119s Setting up python3-poetry-core (2.1.1-1) ... 120s Setting up libquadmath0:ppc64el (15-20250222-0ubuntu1) ... 120s Setting up libmpc3:ppc64el (1.3.1-1build2) ... 120s Setting up autopoint (0.23.1-1) ... 120s Setting up python3-toml (0.10.2-1) ... 120s Setting up python3-jeepney (0.8.0-4) ... 120s Setting up python3-installer (0.7.0+dfsg1-3) ... 120s Setting up autoconf (2.72-3ubuntu1) ... 120s Setting up python3-pluggy (1.5.0-1) ... 120s Setting up libubsan1:ppc64el (15-20250222-0ubuntu1) ... 120s Setting up python3-fastjsonschema (2.21.1-1) ... 120s Setting up dwz (0.15-1build6) ... 120s Setting up python3-trove-classifiers (2025.1.15.22-1) ... 120s Setting up python3-pbs-installer (2025.02.12-2) ... 120s Setting up python3-dulwich (0.22.7-1) ... 121s Setting up libasan8:ppc64el (15-20250222-0ubuntu1) ... 121s Setting up debugedit (1:5.1-2) ... 121s Setting up python3-cleo (2.2.1-4) ... 121s Setting up python3-msgpack (1.0.3-3build4) ... 121s Setting up python3-cachecontrol (0.14.2-1) ... 121s Setting up libtsan2:ppc64el (15-20250222-0ubuntu1) ... 121s Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 121s Setting up libjs-jquery-hotkeys (0.2.0-1) ... 121s Setting up libisl23:ppc64el (0.27-1) ... 121s Setting up python3-build (1.2.2-1) ... 121s Setting up python3-execnet (2.1.1-1) ... 121s Setting up python3-shellingham (1.5.4-1) ... 121s Setting up python3-tomlkit (0.13.2-1) ... 121s Setting up python3-wheel-whl (0.45.1-1) ... 121s Setting up libcc1-0:ppc64el (15-20250222-0ubuntu1) ... 121s Setting up liblsan0:ppc64el (15-20250222-0ubuntu1) ... 121s Setting up libitm1:ppc64el (15-20250222-0ubuntu1) ... 121s Setting up automake (1:1.17-3ubuntu1) ... 122s update-alternatives: using /usr/bin/automake-1.17 to provide /usr/bin/automake (automake) in auto mode 122s Setting up libfile-stripnondeterminism-perl (1.14.1-2) ... 122s Setting up gettext (0.23.1-1) ... 122s Setting up python3-findpython (0.6.2-1) ... 122s Setting up pybuild-plugin-pyproject (6.20250308) ... 122s Setting up python3-pytest (8.3.4-1) ... 122s Setting up python3-virtualenv (20.29.1+ds-1) ... 122s Setting up intltool-debian (0.35.0+20060710.6) ... 122s Setting up python3-secretstorage (3.3.3-3) ... 122s Setting up libjs-jquery-metadata (12-4) ... 122s Setting up libjs-jquery-isonscreen (1.2.0-1.1) ... 122s Setting up cpp-14-powerpc64le-linux-gnu (14.2.0-17ubuntu3) ... 122s Setting up cpp-14 (14.2.0-17ubuntu3) ... 122s Setting up dh-strip-nondeterminism (1.14.1-2) ... 122s Setting up libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 122s Setting up python3-pytest-mock (3.14.0-2) ... 122s Setting up python3-keyring (25.6.0-1) ... 122s Setting up libgcc-14-dev:ppc64el (14.2.0-17ubuntu3) ... 122s Setting up libstdc++-14-dev:ppc64el (14.2.0-17ubuntu3) ... 122s Setting up cpp-powerpc64le-linux-gnu (4:14.2.0-1ubuntu1) ... 122s Setting up gcc-14-powerpc64le-linux-gnu (14.2.0-17ubuntu3) ... 122s Setting up g++-14-powerpc64le-linux-gnu (14.2.0-17ubuntu3) ... 122s Setting up python3-pytest-xdist (3.6.1-1) ... 123s Setting up po-debconf (1.0.21+nmu1) ... 123s Setting up python3-pytest-cov (5.0.0-1) ... 123s Setting up gcc-14 (14.2.0-17ubuntu3) ... 123s Setting up gcc-powerpc64le-linux-gnu (4:14.2.0-1ubuntu1) ... 123s Setting up python3-poetry (2.1.1+dfsg-1) ... 123s Setting up cpp (4:14.2.0-1ubuntu1) ... 123s Setting up g++-14 (14.2.0-17ubuntu3) ... 123s Setting up g++-powerpc64le-linux-gnu (4:14.2.0-1ubuntu1) ... 123s Setting up python3-poetry-plugin-export (1.9.0-1) ... 123s Setting up libtool (2.5.4-4) ... 123s Setting up gcc (4:14.2.0-1ubuntu1) ... 123s Setting up dh-autoreconf (20) ... 123s Setting up g++ (4:14.2.0-1ubuntu1) ... 123s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 123s Setting up build-essential (12.10ubuntu1) ... 123s Setting up debhelper (13.24.1ubuntu2) ... 123s Setting up pybuild-plugin-autopkgtest (6.20250308) ... 123s Processing triggers for install-info (7.1.1-1) ... 123s Processing triggers for libc-bin (2.41-1ubuntu1) ... 123s Processing triggers for man-db (2.13.0-1) ... 125s autopkgtest [09:20:37]: test pybuild-autopkgtest: pybuild-autopkgtest 125s autopkgtest [09:20:37]: test pybuild-autopkgtest: [----------------------- 126s pybuild-autopkgtest 126s I: pybuild base:311: cd /tmp/autopkgtest.aTzr1T/autopkgtest_tmp/build; python3.13 -m pytest tests 128s ============================= test session starts ============================== 128s platform linux -- Python 3.13.2, pytest-8.3.4, pluggy-1.5.0 128s rootdir: /tmp/autopkgtest.aTzr1T/autopkgtest_tmp/build 128s configfile: pyproject.toml 128s plugins: xdist-3.6.1, typeguard-4.4.2, mock-3.14.0, cov-5.0.0 128s created: 2/2 workers 128s 2 workers [141 items] 128s 135s FFF.FF..F..F.F.F.FFF.F.FFFFFFFF.F..FFFFFFFFFFFFFFFFFFFFFFFFFF....FFFFFFF [ 51%] 139s FFFFF.F...FFFFFFFFFFFFFFF..F.F..F.F..F.FFF.F.F...FFFF.FFFFFFFFFFFF..F [100%] 139s =================================== FAILURES =================================== 139s _ 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] _ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tester = 139s do_lock = None, extras = 'feature_bar' 139s 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' 139s 139s @pytest.mark.parametrize( 139s "extras, expected", 139s [ 139s ( 139s "feature_bar", 139s f"""\ 139s bar==1.1.0 ; {MARKER_PY} 139s foo==1.0.0 ; {MARKER_PY} 139s """, 139s ), 139s ( 139s "feature_bar feature_qux", 139s f"""\ 139s bar==1.1.0 ; {MARKER_PY} 139s foo==1.0.0 ; {MARKER_PY} 139s qux==1.2.0 ; {MARKER_PY} 139s """, 139s ), 139s ], 139s ) 139s def test_export_includes_extras_by_flag( 139s tester: CommandTester, do_lock: None, extras: str, expected: str 139s ) -> None: 139s tester.execute(f"--format requirements.txt --extras '{extras}'") 139s > assert tester.io.fetch_output() == expected 139s E assert 'bar==1.1.0 ;...ion < "4.0"\n' == 'bar==1.1.0 ;...on == "2.7"\n' 139s E 139s E - bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==1.1.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (2 lines hidden), use '-vv' to show 139s 139s tests/command/test_command_export.py:226: AssertionError 139s _ 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] _ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tester = 139s do_lock = None, extras = 'feature_bar feature_qux' 139s 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' 139s 139s @pytest.mark.parametrize( 139s "extras, expected", 139s [ 139s ( 139s "feature_bar", 139s f"""\ 139s bar==1.1.0 ; {MARKER_PY} 139s foo==1.0.0 ; {MARKER_PY} 139s """, 139s ), 139s ( 139s "feature_bar feature_qux", 139s f"""\ 139s bar==1.1.0 ; {MARKER_PY} 139s foo==1.0.0 ; {MARKER_PY} 139s qux==1.2.0 ; {MARKER_PY} 139s """, 139s ), 139s ], 139s ) 139s def test_export_includes_extras_by_flag( 139s tester: CommandTester, do_lock: None, extras: str, expected: str 139s ) -> None: 139s tester.execute(f"--format requirements.txt --extras '{extras}'") 139s > assert tester.io.fetch_output() == expected 139s E assert 'bar==1.1.0 ;...ion < "4.0"\n' == 'bar==1.1.0 ;...on == "2.7"\n' 139s E 139s E - bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==1.1.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (6 lines hidden), use '-vv' to show 139s 139s tests/command/test_command_export.py:226: AssertionError 139s _______ test_export_exports_requirements_txt_file_locks_if_no_lock_file ________ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tester = 139s poetry = 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_export_exports_requiremen0') 139s 139s def test_export_exports_requirements_txt_file_locks_if_no_lock_file( 139s tester: CommandTester, poetry: Poetry, tmp_path: Path 139s ) -> None: 139s assert not poetry.locker.lock.exists() 139s > _export_requirements(tester, poetry, tmp_path) 139s 139s tests/command/test_command_export.py:122: 139s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 139s 139s tester = 139s poetry = 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_export_exports_requiremen0') 139s 139s def _export_requirements(tester: CommandTester, poetry: Poetry, tmp_path: Path) -> None: 139s from tests.helpers import as_cwd 139s 139s with as_cwd(tmp_path): 139s tester.execute("--format requirements.txt --output requirements.txt") 139s 139s requirements = tmp_path / "requirements.txt" 139s assert requirements.exists() 139s 139s with requirements.open(encoding="utf-8") as f: 139s content = f.read() 139s 139s assert poetry.locker.lock.exists() 139s 139s expected = f"""\ 139s foo==1.0.0 ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 139s E 139s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s 139s tests/command/test_command_export.py:115: AssertionError 139s _____________ test_export_exports_requirements_txt_uses_lock_file ______________ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tester = 139s poetry = 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_export_exports_requiremen1') 139s do_lock = None 139s 139s def test_export_exports_requirements_txt_uses_lock_file( 139s tester: CommandTester, poetry: Poetry, tmp_path: Path, do_lock: None 139s ) -> None: 139s > _export_requirements(tester, poetry, tmp_path) 139s 139s tests/command/test_command_export.py:129: 139s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 139s 139s tester = 139s poetry = 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_export_exports_requiremen1') 139s 139s def _export_requirements(tester: CommandTester, poetry: Poetry, tmp_path: Path) -> None: 139s from tests.helpers import as_cwd 139s 139s with as_cwd(tmp_path): 139s tester.execute("--format requirements.txt --output requirements.txt") 139s 139s requirements = tmp_path / "requirements.txt" 139s assert requirements.exists() 139s 139s with requirements.open(encoding="utf-8") as f: 139s content = f.read() 139s 139s assert poetry.locker.lock.exists() 139s 139s expected = f"""\ 139s foo==1.0.0 ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 139s E 139s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s 139s tests/command/test_command_export.py:115: AssertionError 139s _________________________ test_export_with_all_extras __________________________ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tester = 139s do_lock = None 139s 139s def test_export_with_all_extras(tester: CommandTester, do_lock: None) -> None: 139s tester.execute("--format requirements.txt --all-extras") 139s output = tester.io.fetch_output() 139s > assert f"bar==1.1.0 ; {MARKER_PY}" in output 139s 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' 139s 139s tests/command/test_command_export.py:239: AssertionError 139s _________________________ test_export_with_all_groups __________________________ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tester = 139s do_lock = None 139s 139s def test_export_with_all_groups(tester: CommandTester, do_lock: None) -> None: 139s tester.execute("--format requirements.txt --all-groups") 139s output = tester.io.fetch_output() 139s > assert f"baz==2.0.0 ; {MARKER_PY}" in output 139s 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' 139s 139s tests/command/test_command_export.py:256: AssertionError 139s ___________________ test_export_prints_to_stdout_by_default ____________________ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tester = 139s do_lock = None 139s 139s def test_export_prints_to_stdout_by_default( 139s tester: CommandTester, do_lock: None 139s ) -> None: 139s tester.execute("--format requirements.txt") 139s expected = f"""\ 139s foo==1.0.0 ; {MARKER_PY} 139s """ 139s > assert tester.io.fetch_output() == expected 139s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 139s E 139s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s 139s tests/command/test_command_export.py:157: AssertionError 139s _____________ test_export_uses_requirements_txt_format_by_default ______________ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tester = 139s do_lock = None 139s 139s def test_export_uses_requirements_txt_format_by_default( 139s tester: CommandTester, do_lock: None 139s ) -> None: 139s tester.execute() 139s expected = f"""\ 139s foo==1.0.0 ; {MARKER_PY} 139s """ 139s > assert tester.io.fetch_output() == expected 139s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 139s E 139s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s 139s tests/command/test_command_export.py:167: AssertionError 139s _ test_export_groups[-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tester = 139s do_lock = None, options = '' 139s expected = 'foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 139s 139s @pytest.mark.parametrize( 139s "options, expected", 139s [ 139s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 139s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 139s ( 139s "--with dev,opt", 139s ( 139s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 139s f" {MARKER_PY}\n" 139s ), 139s ), 139s (f"--without {MAIN_GROUP}", "\n"), 139s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s (f"--without {MAIN_GROUP},dev,opt", "\n"), 139s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 139s ( 139s f"--only {MAIN_GROUP},dev", 139s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 139s ), 139s ], 139s ) 139s def test_export_groups( 139s tester: CommandTester, do_lock: None, options: str, expected: str 139s ) -> None: 139s tester.execute(options) 139s > assert tester.io.fetch_output() == expected 139s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 139s E 139s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s 139s tests/command/test_command_export.py:199: AssertionError 139s _ 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] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tester = 139s do_lock = None, options = '--with dev' 139s 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' 139s 139s @pytest.mark.parametrize( 139s "options, expected", 139s [ 139s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 139s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 139s ( 139s "--with dev,opt", 139s ( 139s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 139s f" {MARKER_PY}\n" 139s ), 139s ), 139s (f"--without {MAIN_GROUP}", "\n"), 139s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s (f"--without {MAIN_GROUP},dev,opt", "\n"), 139s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 139s ( 139s f"--only {MAIN_GROUP},dev", 139s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 139s ), 139s ], 139s ) 139s def test_export_groups( 139s tester: CommandTester, do_lock: None, options: str, expected: str 139s ) -> None: 139s tester.execute(options) 139s > assert tester.io.fetch_output() == expected 139s E assert 'baz==2.0.0 ;...ion < "4.0"\n' == 'baz==2.0.0 ;...on == "2.7"\n' 139s E 139s E - baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + baz==2.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (2 lines hidden), use '-vv' to show 139s 139s tests/command/test_command_export.py:199: AssertionError 139s _ 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] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tester = 139s do_lock = None, options = '--with opt' 139s 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' 139s 139s @pytest.mark.parametrize( 139s "options, expected", 139s [ 139s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 139s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 139s ( 139s "--with dev,opt", 139s ( 139s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 139s f" {MARKER_PY}\n" 139s ), 139s ), 139s (f"--without {MAIN_GROUP}", "\n"), 139s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s (f"--without {MAIN_GROUP},dev,opt", "\n"), 139s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 139s ( 139s f"--only {MAIN_GROUP},dev", 139s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 139s ), 139s ], 139s ) 139s def test_export_groups( 139s tester: CommandTester, do_lock: None, options: str, expected: str 139s ) -> None: 139s tester.execute(options) 139s > assert tester.io.fetch_output() == expected 139s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 139s E 139s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - opt==2.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (2 lines hidden), use '-vv' to show 139s 139s tests/command/test_command_export.py:199: AssertionError 139s _ 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] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tester = 139s do_lock = None, options = '--with dev,opt' 139s 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' 139s 139s @pytest.mark.parametrize( 139s "options, expected", 139s [ 139s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 139s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 139s ( 139s "--with dev,opt", 139s ( 139s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 139s f" {MARKER_PY}\n" 139s ), 139s ), 139s (f"--without {MAIN_GROUP}", "\n"), 139s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s (f"--without {MAIN_GROUP},dev,opt", "\n"), 139s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 139s ( 139s f"--only {MAIN_GROUP},dev", 139s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 139s ), 139s ], 139s ) 139s def test_export_groups( 139s tester: CommandTester, do_lock: None, options: str, expected: str 139s ) -> None: 139s tester.execute(options) 139s > assert tester.io.fetch_output() == expected 139s E assert 'baz==2.0.0 ;...ion < "4.0"\n' == 'baz==2.0.0 ;...on == "2.7"\n' 139s E 139s E - baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + baz==2.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (6 lines hidden), use '-vv' to show 139s 139s tests/command/test_command_export.py:199: AssertionError 139s ____ test_exporter_can_export_requirements_txt_with_standard_packages[1.1] _____ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi0') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_standard_packages( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s bar==4.5.6 ; {MARKER_PY} 139s foo==1.2.3 ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (2 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:159: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s ____ test_exporter_can_export_requirements_txt_with_standard_packages[2.1] _____ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi1') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_standard_packages( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s bar==4.5.6 ; {MARKER_PY} 139s foo==1.2.3 ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (2 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:159: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_markers[1.1] _ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi2') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_standard_packages_and_markers( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "baz", 139s "version": "7.8.9", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": [], "baz": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["markers"] = "python_version < '3.7'" 139s lock_data["package"][2]["markers"] = "sys_platform == 'win32'" 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s markers = { 139s "foo": "python_version < '3.7'", 139s "bar": "extra =='foo'", 139s "baz": "sys_platform == 'win32'", 139s } 139s set_package_requires(poetry, markers=markers) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s bar==4.5.6 ; {MARKER_PY} 139s baz==7.8.9 ; {MARKER_PY_WIN32} 139s foo==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_ONLY)} 139s """ 139s 139s > assert content == expected 139s E assert 'bar==4.5.6 ;...on == "3.6"\n' == 'bar==4.5.6 ;...on == "3.6"\n' 139s E 139s E Skipping 57 identical trailing characters in diff, use -v to show 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - baz==7.8.9 ; (python_version >= "3.6" or python_version == "2.7") and sys_platform == "win32" and python_version < "4.0"... 139s E 139s E ...Full output truncated (2 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:218: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_export_groups[--without dev-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tester = 139s do_lock = None, options = '--without dev' 139s expected = 'foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 139s 139s @pytest.mark.parametrize( 139s "options, expected", 139s [ 139s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 139s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 139s ( 139s "--with dev,opt", 139s ( 139s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 139s f" {MARKER_PY}\n" 139s ), 139s ), 139s (f"--without {MAIN_GROUP}", "\n"), 139s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s (f"--without {MAIN_GROUP},dev,opt", "\n"), 139s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 139s ( 139s f"--only {MAIN_GROUP},dev", 139s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 139s ), 139s ], 139s ) 139s def test_export_groups( 139s tester: CommandTester, do_lock: None, options: str, expected: str 139s ) -> None: 139s tester.execute(options) 139s > assert tester.io.fetch_output() == expected 139s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 139s E 139s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s 139s tests/command/test_command_export.py:199: AssertionError 139s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_markers[2.1] _ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi3') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_standard_packages_and_markers( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "baz", 139s "version": "7.8.9", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": [], "baz": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["markers"] = "python_version < '3.7'" 139s lock_data["package"][2]["markers"] = "sys_platform == 'win32'" 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s markers = { 139s "foo": "python_version < '3.7'", 139s "bar": "extra =='foo'", 139s "baz": "sys_platform == 'win32'", 139s } 139s set_package_requires(poetry, markers=markers) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s bar==4.5.6 ; {MARKER_PY} 139s baz==7.8.9 ; {MARKER_PY_WIN32} 139s foo==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_ONLY)} 139s """ 139s 139s > assert content == expected 139s E assert 'bar==4.5.6 ;...on == "3.6"\n' == 'bar==4.5.6 ;...on == "3.6"\n' 139s E 139s E Skipping 57 identical trailing characters in diff, use -v to show 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - baz==7.8.9 ; (python_version >= "3.6" or python_version == "2.7") and sys_platform == "win32" and python_version < "4.0"... 139s E 139s E ...Full output truncated (2 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:218: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s ____________ test_exporter_can_export_requirements_txt_poetry[1.1] _____________ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi4') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_poetry( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s """Regression test for #3254""" 139s 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "poetry", 139s "version": "1.1.4", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"keyring": "*"}, 139s }, 139s { 139s "name": "junit-xml", 139s "version": "1.9", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"six": "*"}, 139s }, 139s { 139s "name": "keyring", 139s "version": "21.8.0", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": { 139s "SecretStorage": { 139s "version": "*", 139s "markers": "sys_platform == 'linux'", 139s } 139s }, 139s }, 139s { 139s "name": "secretstorage", 139s "version": "3.3.0", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"cryptography": "*"}, 139s }, 139s { 139s "name": "cryptography", 139s "version": "3.2", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"six": "*"}, 139s }, 139s { 139s "name": "six", 139s "version": "1.15.0", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "poetry": [], 139s "keyring": [], 139s "secretstorage": [], 139s "cryptography": [], 139s "six": [], 139s "junit-xml": [], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][3]["markers"] = "sys_platform == 'linux'" 139s lock_data["package"][4]["markers"] = "sys_platform == 'linux'" 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires( 139s poetry, skip={"keyring", "secretstorage", "cryptography", "six"} 139s ) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s # The dependency graph: 139s # junit-xml 1.9 Creates JUnit XML test result documents that can be read by tools 139s # └── six * such as Jenkins 139s # poetry 1.1.4 Python dependency management and packaging made easy. 139s # ├── keyring >=21.2.0,<22.0.0 139s # │ ├── importlib-metadata >=1 139s # │ │ └── zipp >=0.5 139s # │ ├── jeepney >=0.4.2 139s # │ ├── pywin32-ctypes <0.1.0 || >0.1.0,<0.1.1 || >0.1.1 139s # │ └── secretstorage >=3.2 -- On linux only 139s # │ ├── cryptography >=2.0 139s # │ │ └── six >=1.4.1 139s # │ └── jeepney >=0.6 (circular dependency aborted here) 139s expected = { 139s "poetry": Dependency.create_from_pep_508(f"poetry==1.1.4; {MARKER_PY}"), 139s "junit-xml": Dependency.create_from_pep_508(f"junit-xml==1.9 ; {MARKER_PY}"), 139s "keyring": Dependency.create_from_pep_508(f"keyring==21.8.0 ; {MARKER_PY}"), 139s "secretstorage": Dependency.create_from_pep_508( 139s f"secretstorage==3.3.0 ; {MARKER_PY_LINUX}" 139s ), 139s "cryptography": Dependency.create_from_pep_508( 139s f"cryptography==3.2 ; {MARKER_PY_LINUX}" 139s ), 139s "six": Dependency.create_from_pep_508( 139s f"six==1.15.0 ; {MARKER_PY.union(MARKER_PY_LINUX)}" 139s ), 139s } 139s 139s for line in content.strip().split("\n"): 139s dependency = Dependency.create_from_pep_508(line) 139s assert dependency.name in expected 139s expected_dependency = expected.pop(dependency.name) 139s assert dependency == expected_dependency 139s > assert dependency.marker == expected_dependency.marker 139s 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"> 139s E + where = "3.6") and python_version < "4.0" and sys_platform == "linux"> = .marker 139s E + and = "3.6" or python_version == "2.7") and sys_platform == "linux" and python_version < "4.0"> = .marker 139s 139s tests/test_exporter.py:338: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_export_groups[--without opt-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tester = 139s do_lock = None, options = '--without opt' 139s expected = 'foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 139s 139s @pytest.mark.parametrize( 139s "options, expected", 139s [ 139s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 139s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 139s ( 139s "--with dev,opt", 139s ( 139s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 139s f" {MARKER_PY}\n" 139s ), 139s ), 139s (f"--without {MAIN_GROUP}", "\n"), 139s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s (f"--without {MAIN_GROUP},dev,opt", "\n"), 139s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 139s ( 139s f"--only {MAIN_GROUP},dev", 139s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 139s ), 139s ], 139s ) 139s def test_export_groups( 139s tester: CommandTester, do_lock: None, options: str, expected: str 139s ) -> None: 139s tester.execute(options) 139s > assert tester.io.fetch_output() == expected 139s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 139s E 139s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s 139s tests/command/test_command_export.py:199: AssertionError 139s ____________ test_exporter_can_export_requirements_txt_poetry[2.1] _____________ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi5') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_poetry( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s """Regression test for #3254""" 139s 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "poetry", 139s "version": "1.1.4", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"keyring": "*"}, 139s }, 139s { 139s "name": "junit-xml", 139s "version": "1.9", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"six": "*"}, 139s }, 139s { 139s "name": "keyring", 139s "version": "21.8.0", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": { 139s "SecretStorage": { 139s "version": "*", 139s "markers": "sys_platform == 'linux'", 139s } 139s }, 139s }, 139s { 139s "name": "secretstorage", 139s "version": "3.3.0", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"cryptography": "*"}, 139s }, 139s { 139s "name": "cryptography", 139s "version": "3.2", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"six": "*"}, 139s }, 139s { 139s "name": "six", 139s "version": "1.15.0", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "poetry": [], 139s "keyring": [], 139s "secretstorage": [], 139s "cryptography": [], 139s "six": [], 139s "junit-xml": [], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][3]["markers"] = "sys_platform == 'linux'" 139s lock_data["package"][4]["markers"] = "sys_platform == 'linux'" 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires( 139s poetry, skip={"keyring", "secretstorage", "cryptography", "six"} 139s ) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s # The dependency graph: 139s # junit-xml 1.9 Creates JUnit XML test result documents that can be read by tools 139s # └── six * such as Jenkins 139s # poetry 1.1.4 Python dependency management and packaging made easy. 139s # ├── keyring >=21.2.0,<22.0.0 139s # │ ├── importlib-metadata >=1 139s # │ │ └── zipp >=0.5 139s # │ ├── jeepney >=0.4.2 139s # │ ├── pywin32-ctypes <0.1.0 || >0.1.0,<0.1.1 || >0.1.1 139s # │ └── secretstorage >=3.2 -- On linux only 139s # │ ├── cryptography >=2.0 139s # │ │ └── six >=1.4.1 139s # │ └── jeepney >=0.6 (circular dependency aborted here) 139s expected = { 139s "poetry": Dependency.create_from_pep_508(f"poetry==1.1.4; {MARKER_PY}"), 139s "junit-xml": Dependency.create_from_pep_508(f"junit-xml==1.9 ; {MARKER_PY}"), 139s "keyring": Dependency.create_from_pep_508(f"keyring==21.8.0 ; {MARKER_PY}"), 139s "secretstorage": Dependency.create_from_pep_508( 139s f"secretstorage==3.3.0 ; {MARKER_PY_LINUX}" 139s ), 139s "cryptography": Dependency.create_from_pep_508( 139s f"cryptography==3.2 ; {MARKER_PY_LINUX}" 139s ), 139s "six": Dependency.create_from_pep_508( 139s f"six==1.15.0 ; {MARKER_PY.union(MARKER_PY_LINUX)}" 139s ), 139s } 139s 139s for line in content.strip().split("\n"): 139s dependency = Dependency.create_from_pep_508(line) 139s assert dependency.name in expected 139s expected_dependency = expected.pop(dependency.name) 139s assert dependency == expected_dependency 139s > assert dependency.marker == expected_dependency.marker 139s 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"> 139s E + where = "3.6") and python_version < "4.0" and sys_platform == "linux"> = .marker 139s E + and = "3.6" or python_version == "2.7") and sys_platform == "linux" and python_version < "4.0"> = .marker 139s 139s tests/test_exporter.py:338: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s __________ test_exporter_can_export_requirements_txt_pyinstaller[1.1] __________ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi6') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_pyinstaller( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s """Regression test for #3254""" 139s 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "pyinstaller", 139s "version": "4.0", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": { 139s "altgraph": "*", 139s "macholib": { 139s "version": "*", 139s "markers": "sys_platform == 'darwin'", 139s }, 139s }, 139s }, 139s { 139s "name": "altgraph", 139s "version": "0.17", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "macholib", 139s "version": "1.8", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"altgraph": ">=0.15"}, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"pyinstaller": [], "altgraph": [], "macholib": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][2]["markers"] = "sys_platform == 'darwin'" 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, skip={"altgraph", "macholib"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s # Rationale for the results: 139s # * PyInstaller has an explicit dependency on altgraph, so it must always be 139s # installed. 139s # * PyInstaller requires macholib on Darwin, which in turn requires altgraph. 139s # The dependency graph: 139s # pyinstaller 4.0 PyInstaller bundles a Python application and all its 139s # ├── altgraph * dependencies into a single package. 139s # ├── macholib >=1.8 -- only on Darwin 139s # │ └── altgraph >=0.15 139s expected = { 139s "pyinstaller": Dependency.create_from_pep_508( 139s f"pyinstaller==4.0 ; {MARKER_PY}" 139s ), 139s "altgraph": Dependency.create_from_pep_508( 139s f"altgraph==0.17 ; {MARKER_PY.union(MARKER_PY_DARWIN)}" 139s ), 139s "macholib": Dependency.create_from_pep_508( 139s f"macholib==1.8 ; {MARKER_PY_DARWIN}" 139s ), 139s } 139s 139s for line in content.strip().split("\n"): 139s dependency = Dependency.create_from_pep_508(line) 139s assert dependency.name in expected 139s expected_dependency = expected.pop(dependency.name) 139s assert dependency == expected_dependency 139s > assert dependency.marker == expected_dependency.marker 139s E assert = "3.6" and python_version < "4.0"> == = "3.6" and python_version < "4.0" or python_version == "2.7"> 139s E + where = "3.6" and python_version < "4.0"> = .marker 139s E + and = "3.6" and python_version < "4.0" or python_version == "2.7"> = .marker 139s 139s tests/test_exporter.py:421: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s __________ test_exporter_can_export_requirements_txt_pyinstaller[2.1] __________ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi7') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_pyinstaller( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s """Regression test for #3254""" 139s 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "pyinstaller", 139s "version": "4.0", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": { 139s "altgraph": "*", 139s "macholib": { 139s "version": "*", 139s "markers": "sys_platform == 'darwin'", 139s }, 139s }, 139s }, 139s { 139s "name": "altgraph", 139s "version": "0.17", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "macholib", 139s "version": "1.8", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"altgraph": ">=0.15"}, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"pyinstaller": [], "altgraph": [], "macholib": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][2]["markers"] = "sys_platform == 'darwin'" 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, skip={"altgraph", "macholib"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s # Rationale for the results: 139s # * PyInstaller has an explicit dependency on altgraph, so it must always be 139s # installed. 139s # * PyInstaller requires macholib on Darwin, which in turn requires altgraph. 139s # The dependency graph: 139s # pyinstaller 4.0 PyInstaller bundles a Python application and all its 139s # ├── altgraph * dependencies into a single package. 139s # ├── macholib >=1.8 -- only on Darwin 139s # │ └── altgraph >=0.15 139s expected = { 139s "pyinstaller": Dependency.create_from_pep_508( 139s f"pyinstaller==4.0 ; {MARKER_PY}" 139s ), 139s "altgraph": Dependency.create_from_pep_508( 139s f"altgraph==0.17 ; {MARKER_PY.union(MARKER_PY_DARWIN)}" 139s ), 139s "macholib": Dependency.create_from_pep_508( 139s f"macholib==1.8 ; {MARKER_PY_DARWIN}" 139s ), 139s } 139s 139s for line in content.strip().split("\n"): 139s dependency = Dependency.create_from_pep_508(line) 139s assert dependency.name in expected 139s expected_dependency = expected.pop(dependency.name) 139s assert dependency == expected_dependency 139s > assert dependency.marker == expected_dependency.marker 139s E assert = "3.6" and python_version < "4.0"> == = "3.6" and python_version < "4.0" or python_version == "2.7"> 139s E + where = "3.6" and python_version < "4.0"> = .marker 139s E + and = "3.6" and python_version < "4.0" or python_version == "2.7"> = .marker 139s 139s tests/test_exporter.py:421: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_export_groups[--only main-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tester = 139s do_lock = None, options = '--only main' 139s expected = 'foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 139s 139s @pytest.mark.parametrize( 139s "options, expected", 139s [ 139s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 139s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 139s ( 139s "--with dev,opt", 139s ( 139s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 139s f" {MARKER_PY}\n" 139s ), 139s ), 139s (f"--without {MAIN_GROUP}", "\n"), 139s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s (f"--without {MAIN_GROUP},dev,opt", "\n"), 139s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 139s ( 139s f"--only {MAIN_GROUP},dev", 139s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 139s ), 139s ], 139s ) 139s def test_export_groups( 139s tester: CommandTester, do_lock: None, options: str, expected: str 139s ) -> None: 139s tester.execute(options) 139s > assert tester.io.fetch_output() == expected 139s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 139s E 139s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s 139s tests/command/test_command_export.py:199: AssertionError 139s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[1.1-False-lines0] _ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi10') 139s poetry = , dev = False 139s lines = ['a==1.2.3 ; python_version >= "3.6" and python_version < "3.8" or python_version == "2.7"'] 139s lock_version = '1.1' 139s 139s @pytest.mark.parametrize( 139s ["dev", "lines"], 139s [ 139s ( 139s False, 139s [f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38)}"], 139s ), 139s ( 139s True, 139s [ 139s f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38).union(MARKER_PY36)}", 139s f"b==4.5.6 ; {MARKER_PY}", 139s ], 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any( 139s tmp_path: Path, poetry: Poetry, dev: bool, lines: list[str], lock_version: str 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "a", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "b", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"a": ">=1.2.3"}, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"a": [], "b": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["groups"] = ["main", "dev"] 139s lock_data["package"][0]["markers"] = {"main": "python_version < '3.8'"} 139s lock_data["package"][1]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s 139s root = poetry.package.with_dependency_groups([], only=True) 139s root.add_dependency( 139s Factory.create_dependency( 139s name="a", constraint={"version": "^1.2.3", "python": "<3.8"} 139s ) 139s ) 139s root.add_dependency( 139s Factory.create_dependency( 139s name="b", constraint={"version": "^4.5.6"}, groups=["dev"] 139s ) 139s ) 139s poetry._package = root 139s 139s exporter = Exporter(poetry, NullIO()) 139s if dev: 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s > assert content.strip() == "\n".join(lines) 139s E assert 'a==1.2.3 ; p...rsion < "3.8"' == 'a==1.2.3 ; p...sion == "2.7"' 139s E 139s E - a==1.2.3 ; python_version >= "3.6" and python_version < "3.8" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^^ ^^ ^ ^ 139s E + a==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "3.8" 139s E ? + ^ ^ ^^ ^^ ^ ^^^ ^ ^ ^ 139s 139s tests/test_exporter.py:592: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[1.1-True-lines1] _ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi11') 139s poetry = , dev = True 139s 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"'] 139s lock_version = '1.1' 139s 139s @pytest.mark.parametrize( 139s ["dev", "lines"], 139s [ 139s ( 139s False, 139s [f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38)}"], 139s ), 139s ( 139s True, 139s [ 139s f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38).union(MARKER_PY36)}", 139s f"b==4.5.6 ; {MARKER_PY}", 139s ], 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any( 139s tmp_path: Path, poetry: Poetry, dev: bool, lines: list[str], lock_version: str 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "a", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "b", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"a": ">=1.2.3"}, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"a": [], "b": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["groups"] = ["main", "dev"] 139s lock_data["package"][0]["markers"] = {"main": "python_version < '3.8'"} 139s lock_data["package"][1]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s 139s root = poetry.package.with_dependency_groups([], only=True) 139s root.add_dependency( 139s Factory.create_dependency( 139s name="a", constraint={"version": "^1.2.3", "python": "<3.8"} 139s ) 139s ) 139s root.add_dependency( 139s Factory.create_dependency( 139s name="b", constraint={"version": "^4.5.6"}, groups=["dev"] 139s ) 139s ) 139s poetry._package = root 139s 139s exporter = Exporter(poetry, NullIO()) 139s if dev: 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s > assert content.strip() == "\n".join(lines) 139s E assert 'a==1.2.3 ; p...rsion < "4.0"' == 'a==1.2.3 ; p...sion == "2.7"' 139s E 139s E - a==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + a==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - b==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (2 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:592: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_export_groups[--only dev-baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tester = 139s do_lock = None, options = '--only dev' 139s expected = 'baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 139s 139s @pytest.mark.parametrize( 139s "options, expected", 139s [ 139s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 139s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 139s ( 139s "--with dev,opt", 139s ( 139s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 139s f" {MARKER_PY}\n" 139s ), 139s ), 139s (f"--without {MAIN_GROUP}", "\n"), 139s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s (f"--without {MAIN_GROUP},dev,opt", "\n"), 139s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 139s ( 139s f"--only {MAIN_GROUP},dev", 139s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 139s ), 139s ], 139s ) 139s def test_export_groups( 139s tester: CommandTester, do_lock: None, options: str, expected: str 139s ) -> None: 139s tester.execute(options) 139s > assert tester.io.fetch_output() == expected 139s E assert 'baz==2.0.0 ;...ion < "4.0"\n' == 'baz==2.0.0 ;...on == "2.7"\n' 139s E 139s E - baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + baz==2.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s 139s tests/command/test_command_export.py:199: AssertionError 139s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[2.1-False-lines0] _ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi12') 139s poetry = , dev = False 139s lines = ['a==1.2.3 ; python_version >= "3.6" and python_version < "3.8" or python_version == "2.7"'] 139s lock_version = '2.1' 139s 139s @pytest.mark.parametrize( 139s ["dev", "lines"], 139s [ 139s ( 139s False, 139s [f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38)}"], 139s ), 139s ( 139s True, 139s [ 139s f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38).union(MARKER_PY36)}", 139s f"b==4.5.6 ; {MARKER_PY}", 139s ], 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any( 139s tmp_path: Path, poetry: Poetry, dev: bool, lines: list[str], lock_version: str 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "a", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "b", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"a": ">=1.2.3"}, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"a": [], "b": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["groups"] = ["main", "dev"] 139s lock_data["package"][0]["markers"] = {"main": "python_version < '3.8'"} 139s lock_data["package"][1]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s 139s root = poetry.package.with_dependency_groups([], only=True) 139s root.add_dependency( 139s Factory.create_dependency( 139s name="a", constraint={"version": "^1.2.3", "python": "<3.8"} 139s ) 139s ) 139s root.add_dependency( 139s Factory.create_dependency( 139s name="b", constraint={"version": "^4.5.6"}, groups=["dev"] 139s ) 139s ) 139s poetry._package = root 139s 139s exporter = Exporter(poetry, NullIO()) 139s if dev: 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s > assert content.strip() == "\n".join(lines) 139s E assert 'a==1.2.3 ; p...rsion < "3.8"' == 'a==1.2.3 ; p...sion == "2.7"' 139s E 139s E - a==1.2.3 ; python_version >= "3.6" and python_version < "3.8" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^^ ^^ ^ ^ 139s E + a==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "3.8" 139s E ? + ^ ^ ^^ ^^ ^ ^^^ ^ ^ ^ 139s 139s tests/test_exporter.py:592: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[2.1-True-lines1] _ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi13') 139s poetry = , dev = True 139s 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"'] 139s lock_version = '2.1' 139s 139s @pytest.mark.parametrize( 139s ["dev", "lines"], 139s [ 139s ( 139s False, 139s [f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38)}"], 139s ), 139s ( 139s True, 139s [ 139s f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38).union(MARKER_PY36)}", 139s f"b==4.5.6 ; {MARKER_PY}", 139s ], 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any( 139s tmp_path: Path, poetry: Poetry, dev: bool, lines: list[str], lock_version: str 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "a", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "b", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"a": ">=1.2.3"}, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"a": [], "b": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["groups"] = ["main", "dev"] 139s lock_data["package"][0]["markers"] = {"main": "python_version < '3.8'"} 139s lock_data["package"][1]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s 139s root = poetry.package.with_dependency_groups([], only=True) 139s root.add_dependency( 139s Factory.create_dependency( 139s name="a", constraint={"version": "^1.2.3", "python": "<3.8"} 139s ) 139s ) 139s root.add_dependency( 139s Factory.create_dependency( 139s name="b", constraint={"version": "^4.5.6"}, groups=["dev"] 139s ) 139s ) 139s poetry._package = root 139s 139s exporter = Exporter(poetry, NullIO()) 139s if dev: 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s > assert content.strip() == "\n".join(lines) 139s E assert 'a==1.2.3 ; p...rsion < "4.0"' == 'a==1.2.3 ; p...sion == "2.7"' 139s E 139s E - a==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + a==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - b==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (2 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:592: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ 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] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tester = 139s do_lock = None, options = '--only main,dev' 139s 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' 139s 139s @pytest.mark.parametrize( 139s "options, expected", 139s [ 139s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 139s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 139s ( 139s "--with dev,opt", 139s ( 139s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 139s f" {MARKER_PY}\n" 139s ), 139s ), 139s (f"--without {MAIN_GROUP}", "\n"), 139s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s (f"--without {MAIN_GROUP},dev,opt", "\n"), 139s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 139s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 139s ( 139s f"--only {MAIN_GROUP},dev", 139s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 139s ), 139s ], 139s ) 139s def test_export_groups( 139s tester: CommandTester, do_lock: None, options: str, expected: str 139s ) -> None: 139s tester.execute(options) 139s > assert tester.io.fetch_output() == expected 139s E assert 'baz==2.0.0 ;...ion < "4.0"\n' == 'baz==2.0.0 ;...on == "2.7"\n' 139s E 139s E - baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + baz==2.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (2 lines hidden), use '-vv' to show 139s 139s tests/command/test_command_export.py:199: AssertionError 139s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes[1.1] _ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi14') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected 139s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 139s E 139s E ...Full output truncated (4 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:641: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes[2.1] _ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi15') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected 139s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 139s E 139s E ...Full output truncated (4 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:641: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _______ test_exporter_can_export_requirements_txt_with_git_packages[2.1] _______ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi0') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_git_packages( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "git", 139s "url": "https://github.com/foo/foo.git", 139s "reference": "123456", 139s "resolved_reference": "abcdef", 139s }, 139s } 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s foo @ git+https://github.com/foo/foo.git@abcdef ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'foo @ git+ht...ion < "4.0"\n' == 'foo @ git+ht...on == "2.7"\n' 139s E 139s E Skipping 55 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s 139s tests/test_exporter.py:1066: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes[1.1] _ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi16') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [ 139s {"name": "foo1.whl", "hash": "67890"}, 139s {"name": "foo2.whl", "hash": "12345"}, 139s ], 139s "bar": [ 139s {"name": "bar1.whl", "hash": "67890"}, 139s {"name": "bar2.whl", "hash": "12345"}, 139s ], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:12345 \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 \\ 139s --hash=sha256:67890 139s """ 139s 139s > assert content == expected 139s E assert 'bar==4.5.6 ;...ha256:67890\n' == 'bar==4.5.6 ;...ha256:67890\n' 139s E 139s E Skipping 45 identical trailing characters in diff, use -v to show 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:12345 \... 139s E 139s E ...Full output truncated (6 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:698: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _____ test_exporter_can_export_requirements_txt_with_nested_packages[1.1] ______ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi1') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_nested_packages( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "git", 139s "url": "https://github.com/foo/foo.git", 139s "reference": "123456", 139s "resolved_reference": "abcdef", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": { 139s "foo": { 139s "git": "https://github.com/foo/foo.git", 139s "rev": "123456", 139s } 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, skip={"foo"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s bar==4.5.6 ; {MARKER_PY} 139s foo @ git+https://github.com/foo/foo.git@abcdef ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - foo @ git+https://github.com/foo/foo.git@abcdef ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (2 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:1122: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes[2.1] _ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi17') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [ 139s {"name": "foo1.whl", "hash": "67890"}, 139s {"name": "foo2.whl", "hash": "12345"}, 139s ], 139s "bar": [ 139s {"name": "bar1.whl", "hash": "67890"}, 139s {"name": "bar2.whl", "hash": "12345"}, 139s ], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:12345 \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 \\ 139s --hash=sha256:67890 139s """ 139s 139s > assert content == expected 139s E assert 'bar==4.5.6 ;...ha256:67890\n' == 'bar==4.5.6 ;...ha256:67890\n' 139s E 139s E Skipping 45 identical trailing characters in diff, use -v to show 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:12345 \... 139s E 139s E ...Full output truncated (6 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:698: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _____ test_exporter_can_export_requirements_txt_with_nested_packages[2.1] ______ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi2') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_nested_packages( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "git", 139s "url": "https://github.com/foo/foo.git", 139s "reference": "123456", 139s "resolved_reference": "abcdef", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": { 139s "foo": { 139s "git": "https://github.com/foo/foo.git", 139s "rev": "123456", 139s } 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, skip={"foo"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s bar==4.5.6 ; {MARKER_PY} 139s foo @ git+https://github.com/foo/foo.git@abcdef ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - foo @ git+https://github.com/foo/foo.git@abcdef ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (2 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:1122: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled[1.1] _ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi18') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.with_hashes(False) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s bar==4.5.6 ; {MARKER_PY} 139s foo==1.2.3 ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (2 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:746: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s __ test_exporter_can_export_requirements_txt_with_nested_packages_cyclic[1.1] __ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi3') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_nested_packages_cyclic( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"bar": {"version": "4.5.6"}}, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"baz": {"version": "7.8.9"}}, 139s }, 139s { 139s "name": "baz", 139s "version": "7.8.9", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"foo": {"version": "1.2.3"}}, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": [], "baz": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, skip={"bar", "baz"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s bar==4.5.6 ; {MARKER_PY} 139s baz==7.8.9 ; {MARKER_PY} 139s foo==1.2.3 ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - baz==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (6 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:1176: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled[2.1] _ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi19') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.with_hashes(False) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s bar==4.5.6 ; {MARKER_PY} 139s foo==1.2.3 ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (2 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:746: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s __ test_exporter_can_export_requirements_txt_with_nested_packages_cyclic[2.1] __ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi4') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_nested_packages_cyclic( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"bar": {"version": "4.5.6"}}, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"baz": {"version": "7.8.9"}}, 139s }, 139s { 139s "name": "baz", 139s "version": "7.8.9", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"foo": {"version": "1.2.3"}}, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": [], "baz": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, skip={"bar", "baz"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s bar==4.5.6 ; {MARKER_PY} 139s baz==7.8.9 ; {MARKER_PY} 139s foo==1.2.3 ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - baz==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (6 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:1176: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_exports_requirements_txt_without_dev_packages_by_default[1.1] __ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem0') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_without_dev_packages_by_default( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][1]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected 139s E assert 'foo==1.2.3 ;...ha256:12345\n' == 'foo==1.2.3 ;...ha256:12345\n' 139s E 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:12345 139s 139s tests/test_exporter.py:795: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_can_export_requirements_txt_with_circular_root_dependency[1.1] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi5') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_circular_root_dependency( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {poetry.package.pretty_name: {"version": "1.2.3"}}, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s foo==1.2.3 ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'foo==1.2.3 ;...ion < "4.0"\n' == 'foo==1.2.3 ;...on == "2.7"\n' 139s E 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s 139s tests/test_exporter.py:1214: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_exports_requirements_txt_without_dev_packages_by_default[2.1] __ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem1') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_without_dev_packages_by_default( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][1]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected 139s E assert 'foo==1.2.3 ;...ha256:12345\n' == 'foo==1.2.3 ;...ha256:12345\n' 139s E 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:12345 139s 139s tests/test_exporter.py:795: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_can_export_requirements_txt_with_circular_root_dependency[2.1] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi6') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_circular_root_dependency( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {poetry.package.pretty_name: {"version": "1.2.3"}}, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s foo==1.2.3 ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'foo==1.2.3 ;...ion < "4.0"\n' == 'foo==1.2.3 ;...on == "2.7"\n' 139s E 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s 139s tests/test_exporter.py:1214: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s __ test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in[1.1] ___ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem2') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][1]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected 139s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 139s E 139s E ...Full output truncated (4 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:847: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers[1.1] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi7') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": { 139s "bar": [ 139s { 139s "version": ">=1.2.3,<7.8.10", 139s "markers": 'platform_system != "Windows"', 139s }, 139s { 139s "version": ">=4.5.6,<7.8.10", 139s "markers": 'platform_system == "Windows"', 139s }, 139s ] 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "7.8.9", 139s "optional": True, 139s "python-versions": "*", 139s "dependencies": { 139s "baz": { 139s "version": "!=10.11.12", 139s "markers": 'platform_system == "Windows"', 139s } 139s }, 139s }, 139s { 139s "name": "baz", 139s "version": "10.11.13", 139s "optional": True, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": [], "baz": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][2]["markers"] = 'platform_system == "Windows"' 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.with_hashes(False) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s marker_py_not_windows = MARKER_PY.intersect( 139s parse_marker('platform_system != "Windows"') 139s ) 139s expected = f"""\ 139s bar==7.8.9 ; {marker_py_not_windows.union(MARKER_PY_WINDOWS)} 139s baz==10.11.13 ; {MARKER_PY_WINDOWS} 139s foo==1.2.3 ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'bar==7.8.9 ;...ion < "4.0"\n' == 'bar==7.8.9 ;...on == "2.7"\n' 139s E 139s E - bar==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==7.8.9 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - baz==10.11.13 ; (python_version >= "3.6" or python_version == "2.7") and platform_system == "Windows" and python_version < "4.0" 139s E + baz==10.11.13 ; (python_version == "2.7" or python_version >= "3.6") and python_version < "4.0" and platform_system == "Windows"... 139s E 139s E ...Full output truncated (4 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:1289: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s __ test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in[2.1] ___ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem3') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][1]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected 139s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 139s E 139s E ...Full output truncated (4 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:847: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers[2.1] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi8') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": { 139s "bar": [ 139s { 139s "version": ">=1.2.3,<7.8.10", 139s "markers": 'platform_system != "Windows"', 139s }, 139s { 139s "version": ">=4.5.6,<7.8.10", 139s "markers": 'platform_system == "Windows"', 139s }, 139s ] 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "7.8.9", 139s "optional": True, 139s "python-versions": "*", 139s "dependencies": { 139s "baz": { 139s "version": "!=10.11.12", 139s "markers": 'platform_system == "Windows"', 139s } 139s }, 139s }, 139s { 139s "name": "baz", 139s "version": "10.11.13", 139s "optional": True, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": [], "baz": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][2]["markers"] = 'platform_system == "Windows"' 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.with_hashes(False) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s marker_py_not_windows = MARKER_PY.intersect( 139s parse_marker('platform_system != "Windows"') 139s ) 139s expected = f"""\ 139s bar==7.8.9 ; {marker_py_not_windows.union(MARKER_PY_WINDOWS)} 139s baz==10.11.13 ; {MARKER_PY_WINDOWS} 139s foo==1.2.3 ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'bar==7.8.9 ;...ion < "4.0"\n' == 'bar==7.8.9 ;...on == "2.7"\n' 139s E 139s E - bar==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==7.8.9 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - baz==10.11.13 ; (python_version >= "3.6" or python_version == "2.7") and platform_system == "Windows" and python_version < "4.0" 139s E + baz==10.11.13 ; (python_version == "2.7" or python_version >= "3.6") and python_version < "4.0" and platform_system == "Windows"... 139s E 139s E ...Full output truncated (4 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:1289: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s ____ test_exporter_exports_requirements_txt_without_optional_packages[1.1] _____ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem6') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_without_optional_packages( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": True, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][1]["groups"] = ["dev"] 139s lock_data["package"][1]["markers"] = 'extra == "feature-bar"' 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected 139s E assert 'foo==1.2.3 ;...ha256:12345\n' == 'foo==1.2.3 ;...ha256:12345\n' 139s E 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:12345 139s 139s tests/test_exporter.py:943: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s ____ test_exporter_can_export_requirements_txt_with_directory_packages[1.1] ____ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi11') 139s poetry = 139s fixture_root_uri = 'file:///tmp/autopkgtest.aTzr1T/autopkgtest_tmp/build/tests/fixtures' 139s lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_directory_packages( 139s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "directory", 139s "url": "sample_project", 139s "reference": "", 139s }, 139s } 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s foo @ {fixture_root_uri}/sample_project ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'foo @ file:/...ion < "4.0"\n' == 'foo @ file:/...on == "2.7"\n' 139s E 139s E Skipping 96 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s 139s tests/test_exporter.py:1376: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s ____ test_exporter_exports_requirements_txt_without_optional_packages[2.1] _____ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem7') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_without_optional_packages( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": True, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][1]["groups"] = ["dev"] 139s lock_data["package"][1]["markers"] = 'extra == "feature-bar"' 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected 139s E assert 'foo==1.2.3 ;...ha256:12345\n' == 'foo==1.2.3 ;...ha256:12345\n' 139s E 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:12345 139s 139s tests/test_exporter.py:943: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s ____ test_exporter_can_export_requirements_txt_with_directory_packages[2.1] ____ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi12') 139s poetry = 139s fixture_root_uri = 'file:///tmp/autopkgtest.aTzr1T/autopkgtest_tmp/build/tests/fixtures' 139s lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_directory_packages( 139s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "directory", 139s "url": "sample_project", 139s "reference": "", 139s }, 139s } 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s foo @ {fixture_root_uri}/sample_project ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'foo @ file:/...ion < "4.0"\n' == 'foo @ file:/...on == "2.7"\n' 139s E 139s E Skipping 96 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s 139s tests/test_exporter.py:1376: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_exports_requirements_txt_with_optional_packages[1.1-extras0-lines0] _ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem8') 139s poetry = 139s extras = ['feature-bar'] 139s 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"'] 139s lock_version = '1.1' 139s 139s @pytest.mark.parametrize( 139s ["extras", "lines"], 139s [ 139s ( 139s ["feature-bar"], 139s [ 139s f"bar==4.5.6 ; {MARKER_PY}", 139s f"foo==1.2.3 ; {MARKER_PY}", 139s f"spam==0.1.0 ; {MARKER_PY}", 139s ], 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_with_optional_packages( 139s tmp_path: Path, 139s poetry: Poetry, 139s extras: Collection[NormalizedName], 139s lines: list[str], 139s lock_version: str, 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": True, 139s "python-versions": "*", 139s "dependencies": {"spam": ">=0.1"}, 139s }, 139s { 139s "name": "spam", 139s "version": "0.1.0", 139s "optional": True, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s "spam": [{"name": "spam.whl", "hash": "abcde"}], 139s }, 139s }, 139s "extras": {"feature_bar": ["bar"]}, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][1]["markers"] = 'extra == "feature-bar"' 139s lock_data["package"][2]["markers"] = 'extra == "feature-bar"' 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.with_hashes(False) 139s exporter.with_extras(extras) 139s exporter.export( 139s "requirements.txt", 139s tmp_path, 139s "requirements.txt", 139s ) 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = "\n".join(lines) 139s 139s > assert content.strip() == expected 139s E assert 'bar==4.5.6 ;...rsion < "4.0"' == 'bar==4.5.6 ;...sion == "2.7"' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (6 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:1023: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_can_export_requirements_txt_with_directory_packages_editable[1.1] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi13') 139s poetry = 139s fixture_root_uri = 'file:///tmp/autopkgtest.aTzr1T/autopkgtest_tmp/build/tests/fixtures' 139s lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_directory_packages_editable( 139s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "develop": True, 139s "source": { 139s "type": "directory", 139s "url": "sample_project", 139s "reference": "", 139s }, 139s } 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s -e {fixture_root_uri}/sample_project ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert '-e file:///t...ion < "4.0"\n' == '-e file:///t...on == "2.7"\n' 139s E 139s E Skipping 93 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s 139s tests/test_exporter.py:1419: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_exports_requirements_txt_with_optional_packages[2.1-extras0-lines0] _ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem9') 139s poetry = 139s extras = ['feature-bar'] 139s 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"'] 139s lock_version = '2.1' 139s 139s @pytest.mark.parametrize( 139s ["extras", "lines"], 139s [ 139s ( 139s ["feature-bar"], 139s [ 139s f"bar==4.5.6 ; {MARKER_PY}", 139s f"foo==1.2.3 ; {MARKER_PY}", 139s f"spam==0.1.0 ; {MARKER_PY}", 139s ], 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_with_optional_packages( 139s tmp_path: Path, 139s poetry: Poetry, 139s extras: Collection[NormalizedName], 139s lines: list[str], 139s lock_version: str, 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": True, 139s "python-versions": "*", 139s "dependencies": {"spam": ">=0.1"}, 139s }, 139s { 139s "name": "spam", 139s "version": "0.1.0", 139s "optional": True, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s "spam": [{"name": "spam.whl", "hash": "abcde"}], 139s }, 139s }, 139s "extras": {"feature_bar": ["bar"]}, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][1]["markers"] = 'extra == "feature-bar"' 139s lock_data["package"][2]["markers"] = 'extra == "feature-bar"' 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.with_hashes(False) 139s exporter.with_extras(extras) 139s exporter.export( 139s "requirements.txt", 139s tmp_path, 139s "requirements.txt", 139s ) 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = "\n".join(lines) 139s 139s > assert content.strip() == expected 139s E assert 'bar==4.5.6 ;...rsion < "4.0"' == 'bar==4.5.6 ;...sion == "2.7"' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (6 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:1023: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_can_export_requirements_txt_with_directory_packages_editable[2.1] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi14') 139s poetry = 139s fixture_root_uri = 'file:///tmp/autopkgtest.aTzr1T/autopkgtest_tmp/build/tests/fixtures' 139s lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_directory_packages_editable( 139s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "develop": True, 139s "source": { 139s "type": "directory", 139s "url": "sample_project", 139s "reference": "", 139s }, 139s } 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s -e {fixture_root_uri}/sample_project ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert '-e file:///t...ion < "4.0"\n' == '-e file:///t...on == "2.7"\n' 139s E 139s E Skipping 93 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s 139s tests/test_exporter.py:1419: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _______ test_exporter_can_export_requirements_txt_with_git_packages[1.1] _______ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi20') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_git_packages( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "git", 139s "url": "https://github.com/foo/foo.git", 139s "reference": "123456", 139s "resolved_reference": "abcdef", 139s }, 139s } 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s foo @ git+https://github.com/foo/foo.git@abcdef ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'foo @ git+ht...ion < "4.0"\n' == 'foo @ git+ht...on == "2.7"\n' 139s E 139s E Skipping 55 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s 139s tests/test_exporter.py:1066: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_can_export_requirements_txt_with_nested_directory_packages[1.1] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi15') 139s poetry = 139s fixture_root_uri = 'file:///tmp/autopkgtest.aTzr1T/autopkgtest_tmp/build/tests/fixtures' 139s lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_nested_directory_packages( 139s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "directory", 139s "url": "sample_project", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "directory", 139s "url": "sample_project/../project_with_nested_local/bar", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "baz", 139s "version": "7.8.9", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "directory", 139s "url": "sample_project/../project_with_nested_local/bar/..", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": [], "baz": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s bar @ {fixture_root_uri}/project_with_nested_local/bar ; {MARKER_PY} 139s baz @ {fixture_root_uri}/project_with_nested_local ; {MARKER_PY} 139s foo @ {fixture_root_uri}/sample_project ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'bar @ file:/...ion < "4.0"\n' == 'bar @ file:/...on == "2.7"\n' 139s E 139s E Skipping 111 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - baz @ file:///tmp/autopkgtest.aTzr1T/autopkgtest_tmp/build/tests/fixtures/project_with_nested_local ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"... 139s E 139s E ...Full output truncated (7 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:1485: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s ______ test_exporter_can_export_requirements_txt_with_file_packages[1.1] _______ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi21') 139s poetry = 139s fixture_root_uri = 'file:///tmp/autopkgtest.aTzr1T/autopkgtest_tmp/build/tests/fixtures' 139s lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_file_packages( 139s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "file", 139s "url": "distributions/demo-0.1.0.tar.gz", 139s "reference": "", 139s }, 139s } 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s foo @ {fixture_root_uri}/distributions/demo-0.1.0.tar.gz ;\ 139s {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'foo @ file:/...ion < "4.0"\n' == 'foo @ file:/...on == "2.7"\n' 139s E 139s E Skipping 113 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s 139s tests/test_exporter.py:1573: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_can_export_requirements_txt_with_nested_directory_packages[2.1] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi16') 139s poetry = 139s fixture_root_uri = 'file:///tmp/autopkgtest.aTzr1T/autopkgtest_tmp/build/tests/fixtures' 139s lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_nested_directory_packages( 139s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "directory", 139s "url": "sample_project", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "directory", 139s "url": "sample_project/../project_with_nested_local/bar", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "baz", 139s "version": "7.8.9", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "directory", 139s "url": "sample_project/../project_with_nested_local/bar/..", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": [], "baz": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s bar @ {fixture_root_uri}/project_with_nested_local/bar ; {MARKER_PY} 139s baz @ {fixture_root_uri}/project_with_nested_local ; {MARKER_PY} 139s foo @ {fixture_root_uri}/sample_project ; {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'bar @ file:/...ion < "4.0"\n' == 'bar @ file:/...on == "2.7"\n' 139s E 139s E Skipping 111 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - baz @ file:///tmp/autopkgtest.aTzr1T/autopkgtest_tmp/build/tests/fixtures/project_with_nested_local ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"... 139s E 139s E ...Full output truncated (7 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:1485: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s ______ test_exporter_can_export_requirements_txt_with_file_packages[2.1] _______ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi22') 139s poetry = 139s fixture_root_uri = 'file:///tmp/autopkgtest.aTzr1T/autopkgtest_tmp/build/tests/fixtures' 139s lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_can_export_requirements_txt_with_file_packages( 139s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "file", 139s "url": "distributions/demo-0.1.0.tar.gz", 139s "reference": "", 139s }, 139s } 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s foo @ {fixture_root_uri}/distributions/demo-0.1.0.tar.gz ;\ 139s {MARKER_PY} 139s """ 139s 139s > assert content == expected 139s E assert 'foo @ file:/...ion < "4.0"\n' == 'foo @ file:/...on == "2.7"\n' 139s E 139s E Skipping 113 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s 139s tests/test_exporter.py:1573: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host[2.1] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem0') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s poetry.pool.add_repository( 139s LegacyRepository( 139s "custom", 139s "http://example.com/simple", 139s ) 139s ) 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "http://example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s --trusted-host example.com 139s --extra-index-url http://example.com/simple 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s """ 139s 139s > assert content == expected 139s E assert '--trusted-ho...ha256:67890\n' == '--trusted-ho...ha256:67890\n' 139s E 139s E Skipping 90 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890 139s 139s tests/test_exporter.py:1803: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _______ test_exporter_exports_requirements_txt_with_legacy_packages[1.1] _______ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem10') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_with_legacy_packages( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s poetry.pool.add_repository( 139s LegacyRepository( 139s "custom", 139s "https://example.com/simple", 139s ) 139s ) 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][1]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s --extra-index-url https://example.com/simple 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected 139s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 139s E 139s E Skipping 64 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (5 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:1683: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s __ test_exporter_exports_requirements_txt_with_dev_extras[1.1-True-expected0] __ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem1') 139s poetry = , dev = True 139s 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"'] 139s lock_version = '1.1' 139s 139s @pytest.mark.parametrize( 139s ["dev", "expected"], 139s [ 139s ( 139s True, 139s [ 139s f"bar==1.2.2 ; {MARKER_PY}", 139s f"baz==1.2.3 ; {MARKER_PY}", 139s f"foo==1.2.1 ; {MARKER_PY}", 139s ], 139s ), 139s ( 139s False, 139s [ 139s f"bar==1.2.2 ; {MARKER_PY}", 139s f"foo==1.2.1 ; {MARKER_PY}", 139s ], 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_with_dev_extras( 139s tmp_path: Path, poetry: Poetry, dev: bool, expected: list[str], lock_version: str 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.1", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "1.2.2", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": { 139s "baz": { 139s "version": ">=0.1.0", 139s "optional": True, 139s "markers": "extra == 'baz'", 139s } 139s }, 139s "extras": {"baz": ["baz (>=0.1.0)"]}, 139s }, 139s { 139s "name": "baz", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": [], "baz": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][2]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"baz"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s if dev: 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s > assert content == "\n".join(expected) + "\n" 139s E assert 'bar==1.2.2 ;...ion < "4.0"\n' == 'bar==1.2.2 ;...on == "2.7"\n' 139s E 139s E - bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==1.2.2 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - baz==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (6 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:1880: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _______ test_exporter_exports_requirements_txt_with_legacy_packages[2.1] _______ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem11') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_with_legacy_packages( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s poetry.pool.add_repository( 139s LegacyRepository( 139s "custom", 139s "https://example.com/simple", 139s ) 139s ) 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][1]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s --extra-index-url https://example.com/simple 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected 139s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 139s E 139s E Skipping 64 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (5 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:1683: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_exports_requirements_txt_with_dev_extras[1.1-False-expected1] __ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem2') 139s poetry = , dev = False 139s 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"'] 139s lock_version = '1.1' 139s 139s @pytest.mark.parametrize( 139s ["dev", "expected"], 139s [ 139s ( 139s True, 139s [ 139s f"bar==1.2.2 ; {MARKER_PY}", 139s f"baz==1.2.3 ; {MARKER_PY}", 139s f"foo==1.2.1 ; {MARKER_PY}", 139s ], 139s ), 139s ( 139s False, 139s [ 139s f"bar==1.2.2 ; {MARKER_PY}", 139s f"foo==1.2.1 ; {MARKER_PY}", 139s ], 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_with_dev_extras( 139s tmp_path: Path, poetry: Poetry, dev: bool, expected: list[str], lock_version: str 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.1", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "1.2.2", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": { 139s "baz": { 139s "version": ">=0.1.0", 139s "optional": True, 139s "markers": "extra == 'baz'", 139s } 139s }, 139s "extras": {"baz": ["baz (>=0.1.0)"]}, 139s }, 139s { 139s "name": "baz", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": [], "baz": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][2]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"baz"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s if dev: 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s > assert content == "\n".join(expected) + "\n" 139s E assert 'bar==1.2.2 ;...ion < "4.0"\n' == 'bar==1.2.2 ;...on == "2.7"\n' 139s E 139s E - bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==1.2.2 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - foo==1.2.1 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (2 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:1880: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s __________ test_exporter_exports_requirements_txt_with_url_false[1.1] __________ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem12') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_with_url_false( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s poetry.pool.add_repository( 139s LegacyRepository( 139s "custom", 139s "https://example.com/simple", 139s ) 139s ) 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][1]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.with_urls(False) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected 139s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 139s E 139s E ...Full output truncated (4 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:1747: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s __ test_exporter_exports_requirements_txt_with_dev_extras[2.1-True-expected0] __ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem3') 139s poetry = , dev = True 139s 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"'] 139s lock_version = '2.1' 139s 139s @pytest.mark.parametrize( 139s ["dev", "expected"], 139s [ 139s ( 139s True, 139s [ 139s f"bar==1.2.2 ; {MARKER_PY}", 139s f"baz==1.2.3 ; {MARKER_PY}", 139s f"foo==1.2.1 ; {MARKER_PY}", 139s ], 139s ), 139s ( 139s False, 139s [ 139s f"bar==1.2.2 ; {MARKER_PY}", 139s f"foo==1.2.1 ; {MARKER_PY}", 139s ], 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_with_dev_extras( 139s tmp_path: Path, poetry: Poetry, dev: bool, expected: list[str], lock_version: str 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.1", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "1.2.2", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": { 139s "baz": { 139s "version": ">=0.1.0", 139s "optional": True, 139s "markers": "extra == 'baz'", 139s } 139s }, 139s "extras": {"baz": ["baz (>=0.1.0)"]}, 139s }, 139s { 139s "name": "baz", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": [], "baz": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][2]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"baz"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s if dev: 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s > assert content == "\n".join(expected) + "\n" 139s E assert 'bar==1.2.2 ;...ion < "4.0"\n' == 'bar==1.2.2 ;...on == "2.7"\n' 139s E 139s E - bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==1.2.2 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - baz==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (6 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:1880: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s __________ test_exporter_exports_requirements_txt_with_url_false[2.1] __________ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem13') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_with_url_false( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s poetry.pool.add_repository( 139s LegacyRepository( 139s "custom", 139s "https://example.com/simple", 139s ) 139s ) 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][1]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.with_urls(False) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected 139s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 139s E 139s E ...Full output truncated (4 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:1747: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_exports_requirements_txt_with_dev_extras[2.1-False-expected1] __ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem4') 139s poetry = , dev = False 139s 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"'] 139s lock_version = '2.1' 139s 139s @pytest.mark.parametrize( 139s ["dev", "expected"], 139s [ 139s ( 139s True, 139s [ 139s f"bar==1.2.2 ; {MARKER_PY}", 139s f"baz==1.2.3 ; {MARKER_PY}", 139s f"foo==1.2.1 ; {MARKER_PY}", 139s ], 139s ), 139s ( 139s False, 139s [ 139s f"bar==1.2.2 ; {MARKER_PY}", 139s f"foo==1.2.1 ; {MARKER_PY}", 139s ], 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_with_dev_extras( 139s tmp_path: Path, poetry: Poetry, dev: bool, expected: list[str], lock_version: str 139s ) -> None: 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.1", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "1.2.2", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": { 139s "baz": { 139s "version": ">=0.1.0", 139s "optional": True, 139s "markers": "extra == 'baz'", 139s } 139s }, 139s "extras": {"baz": ["baz (>=0.1.0)"]}, 139s }, 139s { 139s "name": "baz", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": [], "baz": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][2]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"baz"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s if dev: 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s > assert content == "\n".join(expected) + "\n" 139s E assert 'bar==1.2.2 ;...ion < "4.0"\n' == 'bar==1.2.2 ;...on == "2.7"\n' 139s E 139s E - bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==1.2.2 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - foo==1.2.1 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (2 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:1880: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host[1.1] _ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem14') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s poetry.pool.add_repository( 139s LegacyRepository( 139s "custom", 139s "http://example.com/simple", 139s ) 139s ) 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "http://example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s --trusted-host example.com 139s --extra-index-url http://example.com/simple 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s """ 139s 139s > assert content == expected 139s E assert '--trusted-ho...ha256:67890\n' == '--trusted-ho...ha256:67890\n' 139s E 139s E Skipping 90 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890 139s 139s tests/test_exporter.py:1803: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources[1.1] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem5') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s poetry.pool.add_repository( 139s LegacyRepository( 139s "custom-example", 139s "https://example.com/simple", 139s ) 139s ) 139s poetry.pool.add_repository( 139s LegacyRepository( 139s "custom-foobaz", 139s "https://foobaz.com/simple", 139s ) 139s ) 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "baz", 139s "version": "7.8.9", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://foobaz.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s "baz": [{"name": "baz.whl", "hash": "24680"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][1]["groups"] = ["dev"] 139s lock_data["package"][2]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar", "baz"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s --extra-index-url https://example.com/simple 139s --extra-index-url https://foobaz.com/simple 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s baz==7.8.9 ; {MARKER_PY} \\ 139s --hash=sha256:24680 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected 139s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 139s E 139s E Skipping 108 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (10 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:1972: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s ________ test_exporter_exports_requirements_txt_to_standard_output[2.1] ________ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem15') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_to_standard_output( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s io = BufferedIO() 139s exporter.export("requirements.txt", tmp_path, io) 139s 139s expected = f"""\ 139s bar==4.5.6 ; {MARKER_PY} 139s foo==1.2.3 ; {MARKER_PY} 139s """ 139s 139s > assert io.fetch_output() == expected 139s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (2 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:2195: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources[2.1] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem6') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s poetry.pool.add_repository( 139s LegacyRepository( 139s "custom-example", 139s "https://example.com/simple", 139s ) 139s ) 139s poetry.pool.add_repository( 139s LegacyRepository( 139s "custom-foobaz", 139s "https://foobaz.com/simple", 139s ) 139s ) 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "baz", 139s "version": "7.8.9", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://foobaz.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s "baz": [{"name": "baz.whl", "hash": "24680"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][1]["groups"] = ["dev"] 139s lock_data["package"][2]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar", "baz"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s --extra-index-url https://example.com/simple 139s --extra-index-url https://foobaz.com/simple 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s baz==7.8.9 ; {MARKER_PY} \\ 139s --hash=sha256:24680 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected 139s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 139s E 139s E Skipping 108 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (10 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:1972: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _____________ test_exporter_doesnt_confuse_repeated_packages[1.1] ______________ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_doesnt_confuse_r0') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_doesnt_confuse_repeated_packages( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s # Testcase derived from . 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "celery", 139s "version": "5.1.2", 139s "optional": False, 139s "python-versions": "<3.7", 139s "dependencies": { 139s "click": ">=7.0,<8.0", 139s "click-didyoumean": ">=0.0.3", 139s "click-plugins": ">=1.1.1", 139s }, 139s }, 139s { 139s "name": "celery", 139s "version": "5.2.3", 139s "optional": False, 139s "python-versions": ">=3.7", 139s "dependencies": { 139s "click": ">=8.0.3,<9.0", 139s "click-didyoumean": ">=0.0.3", 139s "click-plugins": ">=1.1.1", 139s }, 139s }, 139s { 139s "name": "click", 139s "version": "7.1.2", 139s "optional": False, 139s "python-versions": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", 139s }, 139s { 139s "name": "click", 139s "version": "8.0.3", 139s "optional": False, 139s "python-versions": ">=3.6", 139s "dependencies": {}, 139s }, 139s { 139s "name": "click-didyoumean", 139s "version": "0.0.3", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"click": "*"}, 139s }, 139s { 139s "name": "click-didyoumean", 139s "version": "0.3.0", 139s "optional": False, 139s "python-versions": ">=3.6.2,<4.0.0", 139s "dependencies": {"click": ">=7"}, 139s }, 139s { 139s "name": "click-plugins", 139s "version": "1.1.1", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"click": ">=4.0"}, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "^3.6", 139s "content-hash": ( 139s "832b13a88e5020c27cbcd95faa577bf0dbf054a65c023b45dc9442b640d414e6" 139s ), 139s "files": { 139s "celery": [], 139s "click-didyoumean": [], 139s "click-plugins": [], 139s "click": [], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["markers"] = "python_version < '3.7'" 139s lock_data["package"][1]["markers"] = "python_version >= '3.7'" 139s lock_data["package"][2]["markers"] = "python_version < '3.7'" 139s lock_data["package"][3]["markers"] = "python_version >= '3.7'" 139s lock_data["package"][4]["markers"] = "python_full_version < '3.6.2'" 139s lock_data["package"][5]["markers"] = "python_full_version >= '3.6.2'" 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s root = poetry.package.with_dependency_groups([], only=True) 139s root.python_versions = "^3.6" 139s root.add_dependency( 139s Factory.create_dependency( 139s name="celery", constraint={"version": "5.1.2", "python": "<3.7"} 139s ) 139s ) 139s root.add_dependency( 139s Factory.create_dependency( 139s name="celery", constraint={"version": "5.2.3", "python": ">=3.7"} 139s ) 139s ) 139s poetry._package = root 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s io = BufferedIO() 139s exporter.export("requirements.txt", tmp_path, io) 139s 139s expected = f"""\ 139s celery==5.1.2 ; {MARKER_PY36_ONLY} 139s celery==5.2.3 ; {MARKER_PY37} 139s click-didyoumean==0.0.3 ; {MARKER_PY36_PY362} 139s click-didyoumean==0.3.0 ; {MARKER_PY362_PY40} 139s click-plugins==1.1.1 ; {MARKER_PY36} 139s click==7.1.2 ; {MARKER_PY36_ONLY} 139s click==8.0.3 ; {MARKER_PY37} 139s """ 139s 139s > assert io.fetch_output() == expected 139s E assert 'celery==5.1....ion < "4.0"\n' == 'celery==5.1....ion < "4.0"\n' 139s E 139s E Skipping 130 identical leading characters in diff, use -v to show 139s E Skipping 256 identical trailing characters in diff, use -v to show 139s E - ; python_version >= "3.6" and python_full_version < "3.6.2" 139s E + ; python_full_version < "3.6.2" and python_version == "3.6" 139s E click-d 139s 139s tests/test_exporter.py:2314: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _____ test_exporter_exports_requirements_txt_with_two_primary_sources[1.1] _____ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem7') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_with_two_primary_sources( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s poetry.pool.remove_repository("PyPI") 139s poetry.config.merge( 139s { 139s "repositories": { 139s "custom-a": {"url": "https://a.example.com/simple"}, 139s "custom-b": {"url": "https://b.example.com/simple"}, 139s }, 139s "http-basic": { 139s "custom-a": {"username": "foo", "password": "bar"}, 139s "custom-b": {"username": "baz", "password": "qux"}, 139s }, 139s } 139s ) 139s poetry.pool.add_repository( 139s LegacyRepository( 139s "custom-b", 139s "https://b.example.com/simple", 139s config=poetry.config, 139s ), 139s ) 139s poetry.pool.add_repository( 139s LegacyRepository( 139s "custom-a", 139s "https://a.example.com/simple", 139s config=poetry.config, 139s ), 139s ) 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://a.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://b.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "baz", 139s "version": "7.8.9", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://b.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s "baz": [{"name": "baz.whl", "hash": "24680"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][1]["groups"] = ["dev"] 139s lock_data["package"][2]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar", "baz"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.with_credentials() 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s --index-url https://baz:qux@b.example.com/simple 139s --extra-index-url https://foo:bar@a.example.com/simple 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s baz==7.8.9 ; {MARKER_PY} \\ 139s --hash=sha256:24680 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected 139s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 139s E 139s E Skipping 123 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (10 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:2080: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _____ test_exporter_exports_requirements_txt_with_two_primary_sources[2.1] _____ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem8') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_with_two_primary_sources( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s poetry.pool.remove_repository("PyPI") 139s poetry.config.merge( 139s { 139s "repositories": { 139s "custom-a": {"url": "https://a.example.com/simple"}, 139s "custom-b": {"url": "https://b.example.com/simple"}, 139s }, 139s "http-basic": { 139s "custom-a": {"username": "foo", "password": "bar"}, 139s "custom-b": {"username": "baz", "password": "qux"}, 139s }, 139s } 139s ) 139s poetry.pool.add_repository( 139s LegacyRepository( 139s "custom-b", 139s "https://b.example.com/simple", 139s config=poetry.config, 139s ), 139s ) 139s poetry.pool.add_repository( 139s LegacyRepository( 139s "custom-a", 139s "https://a.example.com/simple", 139s config=poetry.config, 139s ), 139s ) 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://a.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://b.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "baz", 139s "version": "7.8.9", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://b.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s "baz": [{"name": "baz.whl", "hash": "24680"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][1]["groups"] = ["dev"] 139s lock_data["package"][2]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar", "baz"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.with_credentials() 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s --index-url https://baz:qux@b.example.com/simple 139s --extra-index-url https://foo:bar@a.example.com/simple 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s baz==7.8.9 ; {MARKER_PY} \\ 139s --hash=sha256:24680 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected 139s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 139s E 139s E Skipping 123 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (10 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:2080: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials[1.1] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem9') 139s poetry = 139s config = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials( 139s tmp_path: Path, poetry: Poetry, config: Config, lock_version: str 139s ) -> None: 139s poetry.config.merge( 139s { 139s "repositories": {"custom": {"url": "https://example.com/simple"}}, 139s "http-basic": {"custom": {"username": "foo", "password": "bar"}}, 139s } 139s ) 139s poetry.pool.add_repository( 139s LegacyRepository("custom", "https://example.com/simple", config=poetry.config) 139s ) 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][1]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.with_credentials() 139s exporter.export( 139s "requirements.txt", 139s tmp_path, 139s "requirements.txt", 139s ) 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s --extra-index-url https://foo:bar@example.com/simple 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected 139s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 139s E 139s E Skipping 72 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (5 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:2153: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials[2.1] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem10') 139s poetry = 139s config = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials( 139s tmp_path: Path, poetry: Poetry, config: Config, lock_version: str 139s ) -> None: 139s poetry.config.merge( 139s { 139s "repositories": {"custom": {"url": "https://example.com/simple"}}, 139s "http-basic": {"custom": {"username": "foo", "password": "bar"}}, 139s } 139s ) 139s poetry.pool.add_repository( 139s LegacyRepository("custom", "https://example.com/simple", config=poetry.config) 139s ) 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][1]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.with_credentials() 139s exporter.export( 139s "requirements.txt", 139s tmp_path, 139s "requirements.txt", 139s ) 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s --extra-index-url https://foo:bar@example.com/simple 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected 139s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 139s E 139s E Skipping 72 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (5 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:2153: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s ________ test_exporter_exports_requirements_txt_to_standard_output[1.1] ________ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem11') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_requirements_txt_to_standard_output( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s io = BufferedIO() 139s exporter.export("requirements.txt", tmp_path, io) 139s 139s expected = f"""\ 139s bar==4.5.6 ; {MARKER_PY} 139s foo==1.2.3 ; {MARKER_PY} 139s """ 139s 139s > assert io.fetch_output() == expected 139s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (2 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:2195: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_omits_and_includes_extras_for_txt_formats[2.1-requirements.txt-expected1] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_omits_and_includ0') 139s poetry = 139s fmt = 'requirements.txt' 139s 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"'] 139s lock_version = '2.1' 139s 139s @pytest.mark.parametrize( 139s ["fmt", "expected"], 139s [ 139s ( 139s "constraints.txt", 139s [ 139s f"bar==4.5.6 ; {MARKER_PY}", 139s f"baz==7.8.9 ; {MARKER_PY}", 139s f"foo==1.2.3 ; {MARKER_PY}", 139s ], 139s ), 139s ( 139s "requirements.txt", 139s [ 139s f"bar==4.5.6 ; {MARKER_PY}", 139s f"bar[baz]==4.5.6 ; {MARKER_PY}", 139s f"baz==7.8.9 ; {MARKER_PY}", 139s f"foo==1.2.3 ; {MARKER_PY}", 139s ], 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_omits_and_includes_extras_for_txt_formats( 139s tmp_path: Path, poetry: Poetry, fmt: str, expected: list[str], lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": { 139s "bar": { 139s "extras": ["baz"], 139s "version": ">=0.1.0", 139s } 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": { 139s "baz": { 139s "version": ">=0.1.0", 139s "optional": True, 139s "markers": "extra == 'baz'", 139s } 139s }, 139s "extras": {"baz": ["baz (>=0.1.0)"]}, 139s }, 139s { 139s "name": "baz", 139s "version": "7.8.9", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": [], "baz": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export(fmt, tmp_path, "exported.txt") 139s 139s with (tmp_path / "exported.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s # It does not matter whether packages are exported with extras or not 139s # because all dependencies are listed explicitly. 139s if lock_version == "2.1": 139s expected = [req for req in expected if not req.startswith("bar[baz]")] 139s > assert content == "\n".join(expected) + "\n" 139s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - baz==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (6 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:2703: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_prints_warning_for_constraints_txt_with_editable_packages[1.1] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_prints_warning_f0') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_prints_warning_for_constraints_txt_with_editable_packages( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "git", 139s "url": "https://github.com/foo/foo.git", 139s "reference": "123456", 139s }, 139s "develop": True, 139s }, 139s { 139s "name": "bar", 139s "version": "7.8.9", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "baz", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "directory", 139s "url": "sample_project", 139s "reference": "", 139s }, 139s "develop": True, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": [], "baz": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s io = BufferedIO() 139s exporter = Exporter(poetry, io) 139s exporter.export("constraints.txt", tmp_path, "constraints.txt") 139s 139s expected_error_out = ( 139s "Warning: foo is locked in develop (editable) mode, which is " 139s "incompatible with the constraints.txt format.\n" 139s "Warning: baz is locked in develop (editable) mode, which is " 139s "incompatible with the constraints.txt format.\n" 139s ) 139s 139s assert io.fetch_error() == expected_error_out 139s 139s with (tmp_path / "constraints.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s > assert content == f"bar==7.8.9 ; {MARKER_PY}\n" 139s E assert 'bar==7.8.9 ;...ion < "4.0"\n' == 'bar==7.8.9 ;...on == "2.7"\n' 139s E 139s E - bar==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==7.8.9 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s 139s tests/test_exporter.py:2770: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_omits_and_includes_extras_for_txt_formats[1.1-constraints.txt-expected0] _ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_omits_and_includ0') 139s poetry = 139s fmt = 'constraints.txt' 139s 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"'] 139s lock_version = '1.1' 139s 139s @pytest.mark.parametrize( 139s ["fmt", "expected"], 139s [ 139s ( 139s "constraints.txt", 139s [ 139s f"bar==4.5.6 ; {MARKER_PY}", 139s f"baz==7.8.9 ; {MARKER_PY}", 139s f"foo==1.2.3 ; {MARKER_PY}", 139s ], 139s ), 139s ( 139s "requirements.txt", 139s [ 139s f"bar==4.5.6 ; {MARKER_PY}", 139s f"bar[baz]==4.5.6 ; {MARKER_PY}", 139s f"baz==7.8.9 ; {MARKER_PY}", 139s f"foo==1.2.3 ; {MARKER_PY}", 139s ], 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_omits_and_includes_extras_for_txt_formats( 139s tmp_path: Path, poetry: Poetry, fmt: str, expected: list[str], lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": { 139s "bar": { 139s "extras": ["baz"], 139s "version": ">=0.1.0", 139s } 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": { 139s "baz": { 139s "version": ">=0.1.0", 139s "optional": True, 139s "markers": "extra == 'baz'", 139s } 139s }, 139s "extras": {"baz": ["baz (>=0.1.0)"]}, 139s }, 139s { 139s "name": "baz", 139s "version": "7.8.9", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": [], "baz": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export(fmt, tmp_path, "exported.txt") 139s 139s with (tmp_path / "exported.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s # It does not matter whether packages are exported with extras or not 139s # because all dependencies are listed explicitly. 139s if lock_version == "2.1": 139s expected = [req for req in expected if not req.startswith("bar[baz]")] 139s > assert content == "\n".join(expected) + "\n" 139s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - baz==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (6 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:2703: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_prints_warning_for_constraints_txt_with_editable_packages[2.1] _ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_prints_warning_f1') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_prints_warning_for_constraints_txt_with_editable_packages( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "git", 139s "url": "https://github.com/foo/foo.git", 139s "reference": "123456", 139s }, 139s "develop": True, 139s }, 139s { 139s "name": "bar", 139s "version": "7.8.9", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "baz", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "directory", 139s "url": "sample_project", 139s "reference": "", 139s }, 139s "develop": True, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": [], "baz": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s io = BufferedIO() 139s exporter = Exporter(poetry, io) 139s exporter.export("constraints.txt", tmp_path, "constraints.txt") 139s 139s expected_error_out = ( 139s "Warning: foo is locked in develop (editable) mode, which is " 139s "incompatible with the constraints.txt format.\n" 139s "Warning: baz is locked in develop (editable) mode, which is " 139s "incompatible with the constraints.txt format.\n" 139s ) 139s 139s assert io.fetch_error() == expected_error_out 139s 139s with (tmp_path / "constraints.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s > assert content == f"bar==7.8.9 ; {MARKER_PY}\n" 139s E assert 'bar==7.8.9 ;...ion < "4.0"\n' == 'bar==7.8.9 ;...on == "2.7"\n' 139s E 139s E - bar==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==7.8.9 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /tmp/autopkgtest.aTzr1T/autopkgtest_tmp/build; python3.13 -m pytest tests 139s pybuild-autopkgtest: error: pybuild --autopkgtest --test-pytest -i python{version} -p 3.13 returned exit code 13 139s make: *** [/tmp/tZh_sQQwkx/run:4: pybuild-autopkgtest] Error 25 139s pybuild-autopkgtest: error: /tmp/tZh_sQQwkx/run pybuild-autopkgtest returned exit code 2 139s + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s 139s tests/test_exporter.py:2770: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_omits_and_includes_extras_for_txt_formats[1.1-requirements.txt-expected1] _ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_omits_and_includ1') 139s poetry = 139s fmt = 'requirements.txt' 139s 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"'] 139s lock_version = '1.1' 139s 139s @pytest.mark.parametrize( 139s ["fmt", "expected"], 139s [ 139s ( 139s "constraints.txt", 139s [ 139s f"bar==4.5.6 ; {MARKER_PY}", 139s f"baz==7.8.9 ; {MARKER_PY}", 139s f"foo==1.2.3 ; {MARKER_PY}", 139s ], 139s ), 139s ( 139s "requirements.txt", 139s [ 139s f"bar==4.5.6 ; {MARKER_PY}", 139s f"bar[baz]==4.5.6 ; {MARKER_PY}", 139s f"baz==7.8.9 ; {MARKER_PY}", 139s f"foo==1.2.3 ; {MARKER_PY}", 139s ], 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_omits_and_includes_extras_for_txt_formats( 139s tmp_path: Path, poetry: Poetry, fmt: str, expected: list[str], lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": { 139s "bar": { 139s "extras": ["baz"], 139s "version": ">=0.1.0", 139s } 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": { 139s "baz": { 139s "version": ">=0.1.0", 139s "optional": True, 139s "markers": "extra == 'baz'", 139s } 139s }, 139s "extras": {"baz": ["baz (>=0.1.0)"]}, 139s }, 139s { 139s "name": "baz", 139s "version": "7.8.9", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": [], "baz": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export(fmt, tmp_path, "exported.txt") 139s 139s with (tmp_path / "exported.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s # It does not matter whether packages are exported with extras or not 139s # because all dependencies are listed explicitly. 139s if lock_version == "2.1": 139s expected = [req for req in expected if not req.startswith("bar[baz]")] 139s > assert content == "\n".join(expected) + "\n" 139s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - bar[baz]==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (10 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:2703: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _ test_exporter_omits_and_includes_extras_for_txt_formats[2.1-constraints.txt-expected0] _ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_omits_and_includ2') 139s poetry = 139s fmt = 'constraints.txt' 139s 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"'] 139s lock_version = '2.1' 139s 139s @pytest.mark.parametrize( 139s ["fmt", "expected"], 139s [ 139s ( 139s "constraints.txt", 139s [ 139s f"bar==4.5.6 ; {MARKER_PY}", 139s f"baz==7.8.9 ; {MARKER_PY}", 139s f"foo==1.2.3 ; {MARKER_PY}", 139s ], 139s ), 139s ( 139s "requirements.txt", 139s [ 139s f"bar==4.5.6 ; {MARKER_PY}", 139s f"bar[baz]==4.5.6 ; {MARKER_PY}", 139s f"baz==7.8.9 ; {MARKER_PY}", 139s f"foo==1.2.3 ; {MARKER_PY}", 139s ], 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_omits_and_includes_extras_for_txt_formats( 139s tmp_path: Path, poetry: Poetry, fmt: str, expected: list[str], lock_version: str 139s ) -> None: 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": { 139s "bar": { 139s "extras": ["baz"], 139s "version": ">=0.1.0", 139s } 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": { 139s "baz": { 139s "version": ">=0.1.0", 139s "optional": True, 139s "markers": "extra == 'baz'", 139s } 139s }, 139s "extras": {"baz": ["baz (>=0.1.0)"]}, 139s }, 139s { 139s "name": "baz", 139s "version": "7.8.9", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": [], "baz": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export(fmt, tmp_path, "exported.txt") 139s 139s with (tmp_path / "exported.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s # It does not matter whether packages are exported with extras or not 139s # because all dependencies are listed explicitly. 139s if lock_version == "2.1": 139s expected = [req for req in expected if not req.startswith("bar[baz]")] 139s > assert content == "\n".join(expected) + "\n" 139s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 139s E 139s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - baz==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 139s E 139s E ...Full output truncated (6 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:2703: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _________ test_exporter_exports_extra_index_url_and_trusted_host[1.1] __________ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_extra_in0') 139s poetry = , lock_version = '1.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_extra_index_url_and_trusted_host( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s poetry.pool.add_repository( 139s LegacyRepository( 139s "custom", 139s "http://example.com/simple", 139s ), 139s priority=Priority.EXPLICIT, 139s ) 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"bar": "*"}, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "http://example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s --trusted-host example.com 139s --extra-index-url http://example.com/simple 139s 139s bar==4.5.6 ; {MARKER_PY} 139s foo==1.2.3 ; {MARKER_PY} 139s """ 139s > assert content == expected 139s E assert '--trusted-ho...ion < "4.0"\n' == '--trusted-ho...on == "2.7"\n' 139s E 139s E Skipping 90 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"... 139s E 139s E ...Full output truncated (3 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:2965: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _____________ test_exporter_index_urls[1.1-priorities0-expected0] ______________ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_1_1_p0') 139s poetry = 139s priorities = [('custom-a', ), ('custom-b', )] 139s expected = ('a', 'b'), lock_version = '1.1' 139s 139s @pytest.mark.parametrize( 139s ("priorities", "expected"), 139s [ 139s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 139s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 139s ( 139s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 139s ("a", "b"), 139s ), 139s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 139s ( 139s [ 139s ("PyPI", Priority.PRIMARY), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("PyPI", Priority.EXPLICIT), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ("PyPI", Priority.SUPPLEMENTAL), 139s ], 139s ("", "a", "b"), 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_index_urls( 139s tmp_path: Path, 139s poetry: Poetry, 139s priorities: list[tuple[str, Priority]], 139s expected: tuple[str, ...], 139s lock_version: str, 139s ) -> None: 139s pypi = poetry.pool.repository("PyPI") 139s poetry.pool.remove_repository("PyPI") 139s for name, prio in priorities: 139s if name.lower() == "pypi": 139s repo = pypi 139s else: 139s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 139s poetry.pool.add_repository(repo, priority=prio) 139s 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://a.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://b.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected_urls = [ 139s f"--extra-index-url https://{name[-1]}.example.com/simple" 139s for name in expected[1:] 139s ] 139s if expected[0]: 139s expected_urls = [ 139s f"--index-url https://{expected[0]}.example.com/simple", 139s *expected_urls, 139s ] 139s url_string = "\n".join(expected_urls) 139s 139s expected_content = f"""\ 139s {url_string} 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected_content 139s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 139s E 139s E Skipping 107 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (5 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:3175: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _________ test_exporter_exports_extra_index_url_and_trusted_host[2.1] __________ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_extra_in1') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_exports_extra_index_url_and_trusted_host( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s poetry.pool.add_repository( 139s LegacyRepository( 139s "custom", 139s "http://example.com/simple", 139s ), 139s priority=Priority.EXPLICIT, 139s ) 139s lock_data = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"bar": "*"}, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "http://example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = f"""\ 139s --trusted-host example.com 139s --extra-index-url http://example.com/simple 139s 139s bar==4.5.6 ; {MARKER_PY} 139s foo==1.2.3 ; {MARKER_PY} 139s """ 139s > assert content == expected 139s E assert '--trusted-ho...ion < "4.0"\n' == '--trusted-ho...on == "2.7"\n' 139s E 139s E Skipping 90 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"... 139s E 139s E ...Full output truncated (3 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:2965: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _____________ test_exporter_index_urls[1.1-priorities1-expected1] ______________ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_1_1_p1') 139s poetry = 139s priorities = [('custom-b', ), ('custom-a', )] 139s expected = ('b', 'a'), lock_version = '1.1' 139s 139s @pytest.mark.parametrize( 139s ("priorities", "expected"), 139s [ 139s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 139s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 139s ( 139s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 139s ("a", "b"), 139s ), 139s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 139s ( 139s [ 139s ("PyPI", Priority.PRIMARY), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("PyPI", Priority.EXPLICIT), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ("PyPI", Priority.SUPPLEMENTAL), 139s ], 139s ("", "a", "b"), 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_index_urls( 139s tmp_path: Path, 139s poetry: Poetry, 139s priorities: list[tuple[str, Priority]], 139s expected: tuple[str, ...], 139s lock_version: str, 139s ) -> None: 139s pypi = poetry.pool.repository("PyPI") 139s poetry.pool.remove_repository("PyPI") 139s for name, prio in priorities: 139s if name.lower() == "pypi": 139s repo = pypi 139s else: 139s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 139s poetry.pool.add_repository(repo, priority=prio) 139s 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://a.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://b.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected_urls = [ 139s f"--extra-index-url https://{name[-1]}.example.com/simple" 139s for name in expected[1:] 139s ] 139s if expected[0]: 139s expected_urls = [ 139s f"--index-url https://{expected[0]}.example.com/simple", 139s *expected_urls, 139s ] 139s url_string = "\n".join(expected_urls) 139s 139s expected_content = f"""\ 139s {url_string} 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected_content 139s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 139s E 139s E Skipping 107 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (5 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:3175: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _____________ test_exporter_index_urls[1.1-priorities2-expected2] ______________ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_1_1_p2') 139s poetry = 139s priorities = [('custom-b', ), ('custom-a', )] 139s expected = ('a', 'b'), lock_version = '1.1' 139s 139s @pytest.mark.parametrize( 139s ("priorities", "expected"), 139s [ 139s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 139s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 139s ( 139s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 139s ("a", "b"), 139s ), 139s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 139s ( 139s [ 139s ("PyPI", Priority.PRIMARY), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("PyPI", Priority.EXPLICIT), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ("PyPI", Priority.SUPPLEMENTAL), 139s ], 139s ("", "a", "b"), 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_index_urls( 139s tmp_path: Path, 139s poetry: Poetry, 139s priorities: list[tuple[str, Priority]], 139s expected: tuple[str, ...], 139s lock_version: str, 139s ) -> None: 139s pypi = poetry.pool.repository("PyPI") 139s poetry.pool.remove_repository("PyPI") 139s for name, prio in priorities: 139s if name.lower() == "pypi": 139s repo = pypi 139s else: 139s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 139s poetry.pool.add_repository(repo, priority=prio) 139s 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://a.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://b.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected_urls = [ 139s f"--extra-index-url https://{name[-1]}.example.com/simple" 139s for name in expected[1:] 139s ] 139s if expected[0]: 139s expected_urls = [ 139s f"--index-url https://{expected[0]}.example.com/simple", 139s *expected_urls, 139s ] 139s url_string = "\n".join(expected_urls) 139s 139s expected_content = f"""\ 139s {url_string} 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected_content 139s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 139s E 139s E Skipping 107 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (5 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:3175: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _____________ test_exporter_index_urls[1.1-priorities4-expected4] ______________ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_index_urls_1_1_p0') 139s poetry = 139s priorities = [('PyPI', ), ('custom-a', ), ('custom-b', )] 139s expected = ('', 'a', 'b'), lock_version = '1.1' 139s 139s @pytest.mark.parametrize( 139s ("priorities", "expected"), 139s [ 139s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 139s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 139s ( 139s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 139s ("a", "b"), 139s ), 139s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 139s ( 139s [ 139s ("PyPI", Priority.PRIMARY), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("PyPI", Priority.EXPLICIT), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ("PyPI", Priority.SUPPLEMENTAL), 139s ], 139s ("", "a", "b"), 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_index_urls( 139s tmp_path: Path, 139s poetry: Poetry, 139s priorities: list[tuple[str, Priority]], 139s expected: tuple[str, ...], 139s lock_version: str, 139s ) -> None: 139s pypi = poetry.pool.repository("PyPI") 139s poetry.pool.remove_repository("PyPI") 139s for name, prio in priorities: 139s if name.lower() == "pypi": 139s repo = pypi 139s else: 139s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 139s poetry.pool.add_repository(repo, priority=prio) 139s 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://a.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://b.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected_urls = [ 139s f"--extra-index-url https://{name[-1]}.example.com/simple" 139s for name in expected[1:] 139s ] 139s if expected[0]: 139s expected_urls = [ 139s f"--index-url https://{expected[0]}.example.com/simple", 139s *expected_urls, 139s ] 139s url_string = "\n".join(expected_urls) 139s 139s expected_content = f"""\ 139s {url_string} 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected_content 139s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 139s E 139s E Skipping 113 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (5 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:3175: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _____________ test_exporter_index_urls[1.1-priorities3-expected3] ______________ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_1_1_p3') 139s poetry = 139s priorities = [('custom-b', ), ('custom-a', )] 139s expected = ('a', 'b'), lock_version = '1.1' 139s 139s @pytest.mark.parametrize( 139s ("priorities", "expected"), 139s [ 139s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 139s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 139s ( 139s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 139s ("a", "b"), 139s ), 139s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 139s ( 139s [ 139s ("PyPI", Priority.PRIMARY), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("PyPI", Priority.EXPLICIT), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ("PyPI", Priority.SUPPLEMENTAL), 139s ], 139s ("", "a", "b"), 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_index_urls( 139s tmp_path: Path, 139s poetry: Poetry, 139s priorities: list[tuple[str, Priority]], 139s expected: tuple[str, ...], 139s lock_version: str, 139s ) -> None: 139s pypi = poetry.pool.repository("PyPI") 139s poetry.pool.remove_repository("PyPI") 139s for name, prio in priorities: 139s if name.lower() == "pypi": 139s repo = pypi 139s else: 139s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 139s poetry.pool.add_repository(repo, priority=prio) 139s 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://a.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://b.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected_urls = [ 139s f"--extra-index-url https://{name[-1]}.example.com/simple" 139s for name in expected[1:] 139s ] 139s if expected[0]: 139s expected_urls = [ 139s f"--index-url https://{expected[0]}.example.com/simple", 139s *expected_urls, 139s ] 139s url_string = "\n".join(expected_urls) 139s 139s expected_content = f"""\ 139s {url_string} 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected_content 139s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 139s E 139s E Skipping 107 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (5 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:3175: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _____________ test_exporter_index_urls[1.1-priorities5-expected5] ______________ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_index_urls_1_1_p1') 139s poetry = 139s priorities = [('PyPI', ), ('custom-a', ), ('custom-b', )] 139s expected = ('', 'a', 'b'), lock_version = '1.1' 139s 139s @pytest.mark.parametrize( 139s ("priorities", "expected"), 139s [ 139s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 139s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 139s ( 139s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 139s ("a", "b"), 139s ), 139s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 139s ( 139s [ 139s ("PyPI", Priority.PRIMARY), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("PyPI", Priority.EXPLICIT), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ("PyPI", Priority.SUPPLEMENTAL), 139s ], 139s ("", "a", "b"), 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_index_urls( 139s tmp_path: Path, 139s poetry: Poetry, 139s priorities: list[tuple[str, Priority]], 139s expected: tuple[str, ...], 139s lock_version: str, 139s ) -> None: 139s pypi = poetry.pool.repository("PyPI") 139s poetry.pool.remove_repository("PyPI") 139s for name, prio in priorities: 139s if name.lower() == "pypi": 139s repo = pypi 139s else: 139s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 139s poetry.pool.add_repository(repo, priority=prio) 139s 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://a.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://b.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected_urls = [ 139s f"--extra-index-url https://{name[-1]}.example.com/simple" 139s for name in expected[1:] 139s ] 139s if expected[0]: 139s expected_urls = [ 139s f"--index-url https://{expected[0]}.example.com/simple", 139s *expected_urls, 139s ] 139s url_string = "\n".join(expected_urls) 139s 139s expected_content = f"""\ 139s {url_string} 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected_content 139s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 139s E 139s E Skipping 113 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (5 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:3175: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _____________ test_exporter_index_urls[1.1-priorities6-expected6] ______________ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_1_1_p4') 139s poetry = 139s priorities = [('custom-a', ), ('custom-b', ), ('PyPI', )] 139s expected = ('', 'a', 'b'), lock_version = '1.1' 139s 139s @pytest.mark.parametrize( 139s ("priorities", "expected"), 139s [ 139s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 139s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 139s ( 139s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 139s ("a", "b"), 139s ), 139s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 139s ( 139s [ 139s ("PyPI", Priority.PRIMARY), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("PyPI", Priority.EXPLICIT), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ("PyPI", Priority.SUPPLEMENTAL), 139s ], 139s ("", "a", "b"), 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_index_urls( 139s tmp_path: Path, 139s poetry: Poetry, 139s priorities: list[tuple[str, Priority]], 139s expected: tuple[str, ...], 139s lock_version: str, 139s ) -> None: 139s pypi = poetry.pool.repository("PyPI") 139s poetry.pool.remove_repository("PyPI") 139s for name, prio in priorities: 139s if name.lower() == "pypi": 139s repo = pypi 139s else: 139s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 139s poetry.pool.add_repository(repo, priority=prio) 139s 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://a.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://b.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected_urls = [ 139s f"--extra-index-url https://{name[-1]}.example.com/simple" 139s for name in expected[1:] 139s ] 139s if expected[0]: 139s expected_urls = [ 139s f"--index-url https://{expected[0]}.example.com/simple", 139s *expected_urls, 139s ] 139s url_string = "\n".join(expected_urls) 139s 139s expected_content = f"""\ 139s {url_string} 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected_content 139s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 139s E 139s E Skipping 113 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (5 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:3175: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _____________ test_exporter_index_urls[2.1-priorities0-expected0] ______________ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_index_urls_2_1_p0') 139s poetry = 139s priorities = [('custom-a', ), ('custom-b', )] 139s expected = ('a', 'b'), lock_version = '2.1' 139s 139s @pytest.mark.parametrize( 139s ("priorities", "expected"), 139s [ 139s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 139s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 139s ( 139s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 139s ("a", "b"), 139s ), 139s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 139s ( 139s [ 139s ("PyPI", Priority.PRIMARY), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("PyPI", Priority.EXPLICIT), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ("PyPI", Priority.SUPPLEMENTAL), 139s ], 139s ("", "a", "b"), 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_index_urls( 139s tmp_path: Path, 139s poetry: Poetry, 139s priorities: list[tuple[str, Priority]], 139s expected: tuple[str, ...], 139s lock_version: str, 139s ) -> None: 139s pypi = poetry.pool.repository("PyPI") 139s poetry.pool.remove_repository("PyPI") 139s for name, prio in priorities: 139s if name.lower() == "pypi": 139s repo = pypi 139s else: 139s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 139s poetry.pool.add_repository(repo, priority=prio) 139s 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://a.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://b.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected_urls = [ 139s f"--extra-index-url https://{name[-1]}.example.com/simple" 139s for name in expected[1:] 139s ] 139s if expected[0]: 139s expected_urls = [ 139s f"--index-url https://{expected[0]}.example.com/simple", 139s *expected_urls, 139s ] 139s url_string = "\n".join(expected_urls) 139s 139s expected_content = f"""\ 139s {url_string} 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected_content 139s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 139s E 139s E Skipping 107 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (5 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:3175: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _____________ test_exporter_index_urls[2.1-priorities1-expected1] ______________ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_2_1_p0') 139s poetry = 139s priorities = [('custom-b', ), ('custom-a', )] 139s expected = ('b', 'a'), lock_version = '2.1' 139s 139s @pytest.mark.parametrize( 139s ("priorities", "expected"), 139s [ 139s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 139s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 139s ( 139s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 139s ("a", "b"), 139s ), 139s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 139s ( 139s [ 139s ("PyPI", Priority.PRIMARY), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("PyPI", Priority.EXPLICIT), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ("PyPI", Priority.SUPPLEMENTAL), 139s ], 139s ("", "a", "b"), 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_index_urls( 139s tmp_path: Path, 139s poetry: Poetry, 139s priorities: list[tuple[str, Priority]], 139s expected: tuple[str, ...], 139s lock_version: str, 139s ) -> None: 139s pypi = poetry.pool.repository("PyPI") 139s poetry.pool.remove_repository("PyPI") 139s for name, prio in priorities: 139s if name.lower() == "pypi": 139s repo = pypi 139s else: 139s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 139s poetry.pool.add_repository(repo, priority=prio) 139s 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://a.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://b.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected_urls = [ 139s f"--extra-index-url https://{name[-1]}.example.com/simple" 139s for name in expected[1:] 139s ] 139s if expected[0]: 139s expected_urls = [ 139s f"--index-url https://{expected[0]}.example.com/simple", 139s *expected_urls, 139s ] 139s url_string = "\n".join(expected_urls) 139s 139s expected_content = f"""\ 139s {url_string} 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected_content 139s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 139s E 139s E Skipping 107 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (5 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:3175: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _____________ test_exporter_index_urls[2.1-priorities2-expected2] ______________ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_index_urls_2_1_p1') 139s poetry = 139s priorities = [('custom-b', ), ('custom-a', )] 139s expected = ('a', 'b'), lock_version = '2.1' 139s 139s @pytest.mark.parametrize( 139s ("priorities", "expected"), 139s [ 139s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 139s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 139s ( 139s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 139s ("a", "b"), 139s ), 139s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 139s ( 139s [ 139s ("PyPI", Priority.PRIMARY), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("PyPI", Priority.EXPLICIT), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ("PyPI", Priority.SUPPLEMENTAL), 139s ], 139s ("", "a", "b"), 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_index_urls( 139s tmp_path: Path, 139s poetry: Poetry, 139s priorities: list[tuple[str, Priority]], 139s expected: tuple[str, ...], 139s lock_version: str, 139s ) -> None: 139s pypi = poetry.pool.repository("PyPI") 139s poetry.pool.remove_repository("PyPI") 139s for name, prio in priorities: 139s if name.lower() == "pypi": 139s repo = pypi 139s else: 139s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 139s poetry.pool.add_repository(repo, priority=prio) 139s 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://a.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://b.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected_urls = [ 139s f"--extra-index-url https://{name[-1]}.example.com/simple" 139s for name in expected[1:] 139s ] 139s if expected[0]: 139s expected_urls = [ 139s f"--index-url https://{expected[0]}.example.com/simple", 139s *expected_urls, 139s ] 139s url_string = "\n".join(expected_urls) 139s 139s expected_content = f"""\ 139s {url_string} 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected_content 139s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 139s E 139s E Skipping 107 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (5 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:3175: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _____________ test_exporter_index_urls[2.1-priorities3-expected3] ______________ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_2_1_p1') 139s poetry = 139s priorities = [('custom-b', ), ('custom-a', )] 139s expected = ('a', 'b'), lock_version = '2.1' 139s 139s @pytest.mark.parametrize( 139s ("priorities", "expected"), 139s [ 139s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 139s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 139s ( 139s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 139s ("a", "b"), 139s ), 139s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 139s ( 139s [ 139s ("PyPI", Priority.PRIMARY), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("PyPI", Priority.EXPLICIT), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ("PyPI", Priority.SUPPLEMENTAL), 139s ], 139s ("", "a", "b"), 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_index_urls( 139s tmp_path: Path, 139s poetry: Poetry, 139s priorities: list[tuple[str, Priority]], 139s expected: tuple[str, ...], 139s lock_version: str, 139s ) -> None: 139s pypi = poetry.pool.repository("PyPI") 139s poetry.pool.remove_repository("PyPI") 139s for name, prio in priorities: 139s if name.lower() == "pypi": 139s repo = pypi 139s else: 139s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 139s poetry.pool.add_repository(repo, priority=prio) 139s 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://a.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://b.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected_urls = [ 139s f"--extra-index-url https://{name[-1]}.example.com/simple" 139s for name in expected[1:] 139s ] 139s if expected[0]: 139s expected_urls = [ 139s f"--index-url https://{expected[0]}.example.com/simple", 139s *expected_urls, 139s ] 139s url_string = "\n".join(expected_urls) 139s 139s expected_content = f"""\ 139s {url_string} 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected_content 139s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 139s E 139s E Skipping 107 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (5 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:3175: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _____________ test_exporter_index_urls[2.1-priorities4-expected4] ______________ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_index_urls_2_1_p2') 139s poetry = 139s priorities = [('PyPI', ), ('custom-a', ), ('custom-b', )] 139s expected = ('', 'a', 'b'), lock_version = '2.1' 139s 139s @pytest.mark.parametrize( 139s ("priorities", "expected"), 139s [ 139s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 139s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 139s ( 139s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 139s ("a", "b"), 139s ), 139s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 139s ( 139s [ 139s ("PyPI", Priority.PRIMARY), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("PyPI", Priority.EXPLICIT), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ("PyPI", Priority.SUPPLEMENTAL), 139s ], 139s ("", "a", "b"), 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_index_urls( 139s tmp_path: Path, 139s poetry: Poetry, 139s priorities: list[tuple[str, Priority]], 139s expected: tuple[str, ...], 139s lock_version: str, 139s ) -> None: 139s pypi = poetry.pool.repository("PyPI") 139s poetry.pool.remove_repository("PyPI") 139s for name, prio in priorities: 139s if name.lower() == "pypi": 139s repo = pypi 139s else: 139s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 139s poetry.pool.add_repository(repo, priority=prio) 139s 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://a.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://b.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected_urls = [ 139s f"--extra-index-url https://{name[-1]}.example.com/simple" 139s for name in expected[1:] 139s ] 139s if expected[0]: 139s expected_urls = [ 139s f"--index-url https://{expected[0]}.example.com/simple", 139s *expected_urls, 139s ] 139s url_string = "\n".join(expected_urls) 139s 139s expected_content = f"""\ 139s {url_string} 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected_content 139s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 139s E 139s E Skipping 113 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (5 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:3175: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _____________ test_exporter_index_urls[2.1-priorities5-expected5] ______________ 139s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_2_1_p2') 139s poetry = 139s priorities = [('PyPI', ), ('custom-a', ), ('custom-b', )] 139s expected = ('', 'a', 'b'), lock_version = '2.1' 139s 139s @pytest.mark.parametrize( 139s ("priorities", "expected"), 139s [ 139s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 139s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 139s ( 139s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 139s ("a", "b"), 139s ), 139s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 139s ( 139s [ 139s ("PyPI", Priority.PRIMARY), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("PyPI", Priority.EXPLICIT), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ("PyPI", Priority.SUPPLEMENTAL), 139s ], 139s ("", "a", "b"), 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_index_urls( 139s tmp_path: Path, 139s poetry: Poetry, 139s priorities: list[tuple[str, Priority]], 139s expected: tuple[str, ...], 139s lock_version: str, 139s ) -> None: 139s pypi = poetry.pool.repository("PyPI") 139s poetry.pool.remove_repository("PyPI") 139s for name, prio in priorities: 139s if name.lower() == "pypi": 139s repo = pypi 139s else: 139s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 139s poetry.pool.add_repository(repo, priority=prio) 139s 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://a.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://b.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected_urls = [ 139s f"--extra-index-url https://{name[-1]}.example.com/simple" 139s for name in expected[1:] 139s ] 139s if expected[0]: 139s expected_urls = [ 139s f"--index-url https://{expected[0]}.example.com/simple", 139s *expected_urls, 139s ] 139s url_string = "\n".join(expected_urls) 139s 139s expected_content = f"""\ 139s {url_string} 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected_content 139s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 139s E 139s E Skipping 113 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (5 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:3175: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _____________ test_exporter_index_urls[2.1-priorities6-expected6] ______________ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_index_urls_2_1_p3') 139s poetry = 139s priorities = [('custom-a', ), ('custom-b', ), ('PyPI', )] 139s expected = ('', 'a', 'b'), lock_version = '2.1' 139s 139s @pytest.mark.parametrize( 139s ("priorities", "expected"), 139s [ 139s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 139s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 139s ( 139s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 139s ("a", "b"), 139s ), 139s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 139s ( 139s [ 139s ("PyPI", Priority.PRIMARY), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("PyPI", Priority.EXPLICIT), 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ], 139s ("", "a", "b"), 139s ), 139s ( 139s [ 139s ("custom-a", Priority.PRIMARY), 139s ("custom-b", Priority.PRIMARY), 139s ("PyPI", Priority.SUPPLEMENTAL), 139s ], 139s ("", "a", "b"), 139s ), 139s ], 139s ) 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_exporter_index_urls( 139s tmp_path: Path, 139s poetry: Poetry, 139s priorities: list[tuple[str, Priority]], 139s expected: tuple[str, ...], 139s lock_version: str, 139s ) -> None: 139s pypi = poetry.pool.repository("PyPI") 139s poetry.pool.remove_repository("PyPI") 139s for name, prio in priorities: 139s if name.lower() == "pypi": 139s repo = pypi 139s else: 139s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 139s poetry.pool.add_repository(repo, priority=prio) 139s 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1.2.3", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://a.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s { 139s "name": "bar", 139s "version": "4.5.6", 139s "optional": False, 139s "python-versions": "*", 139s "source": { 139s "type": "legacy", 139s "url": "https://b.example.com/simple", 139s "reference": "", 139s }, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": { 139s "foo": [{"name": "foo.whl", "hash": "12345"}], 139s "bar": [{"name": "bar.whl", "hash": "67890"}], 139s }, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["groups"] = ["dev"] 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s set_package_requires(poetry, dev={"bar"}) 139s 139s exporter = Exporter(poetry, NullIO()) 139s exporter.only_groups([MAIN_GROUP, "dev"]) 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected_urls = [ 139s f"--extra-index-url https://{name[-1]}.example.com/simple" 139s for name in expected[1:] 139s ] 139s if expected[0]: 139s expected_urls = [ 139s f"--index-url https://{expected[0]}.example.com/simple", 139s *expected_urls, 139s ] 139s url_string = "\n".join(expected_urls) 139s 139s expected_content = f"""\ 139s {url_string} 139s 139s bar==4.5.6 ; {MARKER_PY} \\ 139s --hash=sha256:67890 139s foo==1.2.3 ; {MARKER_PY} \\ 139s --hash=sha256:12345 139s """ 139s 139s > assert content == expected_content 139s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 139s E 139s E Skipping 113 identical leading characters in diff, use -v to show 139s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 139s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 139s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 139s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 139s E --hash=sha256:67890... 139s E 139s E ...Full output truncated (5 lines hidden), use '-vv' to show 139s 139s tests/test_exporter.py:3175: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s _______________________ test_dependency_walk_error[2.1] ________________________ 139s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 139s 139s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_dependency_walk_error_2_10') 139s poetry = , lock_version = '2.1' 139s 139s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 139s def test_dependency_walk_error( 139s tmp_path: Path, poetry: Poetry, lock_version: str 139s ) -> None: 139s """ 139s With lock file version 2.1 we can export lock files 139s that resulted in a DependencyWalkerError with lower lock file versions. 139s 139s root 139s ├── foo >=0 ; python_version < "3.9" 139s ├── foo >=1 ; python_version >= "3.9" 139s ├── bar ==1 ; python_version < "3.9" 139s │ └── foo ==1 ; python_version < "3.9" 139s └── bar ==2 ; python_version >= "3.9" 139s └── foo ==2 ; python_version >= "3.9" 139s 139s Only considering the root dependency, foo 2 is a valid solution 139s for all environments. However, due to bar depending on foo, 139s foo 1 must be chosen for Python 3.8 and lower. 139s """ 139s lock_data: dict[str, Any] = { 139s "package": [ 139s { 139s "name": "foo", 139s "version": "1", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "foo", 139s "version": "2", 139s "optional": False, 139s "python-versions": "*", 139s }, 139s { 139s "name": "bar", 139s "version": "1", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"foo": "1"}, 139s }, 139s { 139s "name": "bar", 139s "version": "2", 139s "optional": False, 139s "python-versions": "*", 139s "dependencies": {"foo": "2"}, 139s }, 139s ], 139s "metadata": { 139s "lock-version": lock_version, 139s "python-versions": "*", 139s "content-hash": "123456789", 139s "files": {"foo": [], "bar": []}, 139s }, 139s } 139s fix_lock_data(lock_data) 139s if lock_version == "2.1": 139s lock_data["package"][0]["markers"] = "python_version < '3.9'" 139s lock_data["package"][1]["markers"] = "python_version >= '3.9'" 139s lock_data["package"][2]["markers"] = "python_version < '3.9'" 139s lock_data["package"][3]["markers"] = "python_version >= '3.9'" 139s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 139s poetry.package.python_versions = "^3.8" 139s poetry.package.add_dependency( 139s Factory.create_dependency( 139s name="foo", constraint={"version": ">=0", "python": "<3.9"} 139s ) 139s ) 139s poetry.package.add_dependency( 139s Factory.create_dependency( 139s name="foo", constraint={"version": ">=1", "python": ">=3.9"} 139s ) 139s ) 139s poetry.package.add_dependency( 139s Factory.create_dependency( 139s name="bar", constraint={"version": "1", "python": "<3.9"} 139s ) 139s ) 139s poetry.package.add_dependency( 139s Factory.create_dependency( 139s name="bar", constraint={"version": "2", "python": ">=3.9"} 139s ) 139s ) 139s 139s exporter = Exporter(poetry, NullIO()) 139s if lock_version == "1.1": 139s with pytest.raises(DependencyWalkerError): 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s return 139s 139s exporter.export("requirements.txt", tmp_path, "requirements.txt") 139s 139s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 139s content = f.read() 139s 139s expected = """\ 139s bar==1 ; python_version >= "3.8" and python_version < "3.9" 139s bar==2 ; python_version >= "3.9" and python_version < "4.0" 139s foo==1 ; python_version >= "3.8" and python_version < "3.9" 139s foo==2 ; python_version >= "3.9" and python_version < "4.0" 139s """ 139s 139s > assert content == expected 139s E assert 'bar==1 ; pyt...ion < "4.0"\n' == 'bar==1 ; pyt...ion < "4.0"\n' 139s E 139s E - bar==1 ; python_version >= "3.8" and python_version < "3.9" 139s E + bar==1 ; python_version == "3.8" 139s E bar==2 ; python_version >= "3.9" and python_version < "4.0" 139s E - foo==1 ; python_version >= "3.8" and python_version < "3.9" 139s E + foo==1 ; python_version == "3.8" 139s E foo==2 ; python_version >= "3.9" and python_version < "4.0" 139s 139s tests/test_exporter.py:3281: AssertionError 139s ------------------------------ Captured log setup ------------------------------ 139s 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. 139s =========================== short test summary info ============================ 139s 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] 139s 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] 139s FAILED tests/command/test_command_export.py::test_export_exports_requirements_txt_file_locks_if_no_lock_file 139s FAILED tests/command/test_command_export.py::test_export_exports_requirements_txt_uses_lock_file 139s FAILED tests/command/test_command_export.py::test_export_with_all_extras - as... 139s FAILED tests/command/test_command_export.py::test_export_with_all_groups - as... 139s FAILED tests/command/test_command_export.py::test_export_prints_to_stdout_by_default 139s FAILED tests/command/test_command_export.py::test_export_uses_requirements_txt_format_by_default 139s 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] 139s 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] 139s 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] 139s 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] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages[1.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages[2.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_markers[1.1] 139s 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] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_markers[2.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_poetry[1.1] 139s 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] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_poetry[2.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_pyinstaller[1.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_pyinstaller[2.1] 139s 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] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[1.1-False-lines0] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[1.1-True-lines1] 139s 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] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[2.1-False-lines0] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[2.1-True-lines1] 139s 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] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes[1.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes[2.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_git_packages[2.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes[1.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages[1.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes[2.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages[2.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled[1.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_cyclic[1.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled[2.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_cyclic[2.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_without_dev_packages_by_default[1.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_circular_root_dependency[1.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_without_dev_packages_by_default[2.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_circular_root_dependency[2.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in[1.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers[1.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in[2.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers[2.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_without_optional_packages[1.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_directory_packages[1.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_without_optional_packages[2.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_directory_packages[2.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_optional_packages[1.1-extras0-lines0] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_directory_packages_editable[1.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_optional_packages[2.1-extras0-lines0] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_directory_packages_editable[2.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_git_packages[1.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_directory_packages[1.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_file_packages[1.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_directory_packages[2.1] 139s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_file_packages[2.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host[2.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages[1.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_extras[1.1-True-expected0] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages[2.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_extras[1.1-False-expected1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_url_false[1.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_extras[2.1-True-expected0] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_url_false[2.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_extras[2.1-False-expected1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host[1.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources[1.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_to_standard_output[2.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources[2.1] 139s FAILED tests/test_exporter.py::test_exporter_doesnt_confuse_repeated_packages[1.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_two_primary_sources[1.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_two_primary_sources[2.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials[1.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials[2.1] 139s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_to_standard_output[1.1] 139s FAILED tests/test_exporter.py::test_exporter_omits_and_includes_extras_for_txt_formats[2.1-requirements.txt-expected1] 139s FAILED tests/test_exporter.py::test_exporter_prints_warning_for_constraints_txt_with_editable_packages[1.1] 139s FAILED tests/test_exporter.py::test_exporter_omits_and_includes_extras_for_txt_formats[1.1-constraints.txt-expected0] 139s FAILED tests/test_exporter.py::test_exporter_prints_warning_for_constraints_txt_with_editable_packages[2.1] 139s FAILED tests/test_exporter.py::test_exporter_omits_and_includes_extras_for_txt_formats[1.1-requirements.txt-expected1] 139s FAILED tests/test_exporter.py::test_exporter_omits_and_includes_extras_for_txt_formats[2.1-constraints.txt-expected0] 139s FAILED tests/test_exporter.py::test_exporter_exports_extra_index_url_and_trusted_host[1.1] 139s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities0-expected0] 139s FAILED tests/test_exporter.py::test_exporter_exports_extra_index_url_and_trusted_host[2.1] 139s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities1-expected1] 139s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities2-expected2] 139s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities4-expected4] 139s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities3-expected3] 139s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities5-expected5] 139s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities6-expected6] 139s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities0-expected0] 139s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities1-expected1] 139s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities2-expected2] 139s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities3-expected3] 139s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities4-expected4] 139s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities5-expected5] 139s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities6-expected6] 139s FAILED tests/test_exporter.py::test_dependency_walk_error[2.1] - assert 'bar=... 139s ======================= 103 failed, 38 passed in 12.27s ======================== 139s autopkgtest [09:20:51]: test pybuild-autopkgtest: -----------------------] 140s pybuild-autopkgtest FAIL non-zero exit status 25 140s autopkgtest [09:20:52]: test pybuild-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 140s autopkgtest [09:20:52]: @@@@@@@@@@@@@@@@@@@@ summary 140s pybuild-autopkgtest FAIL non-zero exit status 25 147s nova [W] Using flock in prodstack6-ppc64el 147s Creating nova instance adt-plucky-ppc64el-poetry-plugin-export-20250313-091832-juju-7f2275-prod-proposed-migration-environment-20-3ff25e1a-b910-4a63-aa08-e8d856b1d913 from image adt/ubuntu-plucky-ppc64el-server-20250313.img (UUID 039b69e3-5f2d-4af8-9d4f-d440c2e5edc9)... 147s nova [W] Timed out waiting for 47801dbe-3a36-4f67-b30d-d6405eb312b0 to get deleted.