0s autopkgtest [09:18:47]: starting date and time: 2025-03-13 09:18:47+0000 0s autopkgtest [09:18:47]: git checkout: 325255d2 Merge branch 'pin-any-arch' into 'ubuntu/production' 0s autopkgtest [09:18:47]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.mg2666z9/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-s390x --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-2@bos03-s390x-3.secgroup --name adt-plucky-s390x-poetry-plugin-export-20250313-091845-juju-7f2275-prod-proposed-migration-environment-2-9eec0949-e120-4a90-985e-c3d928d2c0a1 --image adt/ubuntu-plucky-s390x-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-2 --net-id=net_prod-proposed-migration-s390x -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/ 71s autopkgtest [09:19:58]: testbed dpkg architecture: s390x 71s autopkgtest [09:19:58]: testbed apt version: 2.9.32ubuntu1 71s autopkgtest [09:19:58]: @@@@@@@@@@@@@@@@@@@@ test bed setup 71s autopkgtest [09:19:58]: testbed release detected to be: None 72s autopkgtest [09:19:59]: updating testbed package index (apt update) 72s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [110 kB] 72s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 73s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 73s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 73s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [11.5 kB] 73s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [44.2 kB] 73s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [429 kB] 73s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x Packages [59.1 kB] 73s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/universe s390x Packages [342 kB] 73s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse s390x Packages [2512 B] 73s Fetched 999 kB in 1s (1220 kB/s) 73s Reading package lists... 74s Reading package lists... 74s Building dependency tree... 74s Reading state information... 74s Calculating upgrade... 74s Calculating upgrade... 74s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 75s Reading package lists... 75s Building dependency tree... 75s Reading state information... 75s Solving dependencies... 75s The following packages will be REMOVED: 75s linux-image-6.11.0-8-generic* 75s 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 75s After this operation, 10.5 MB disk space will be freed. 75s (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 ... 81495 files and directories currently installed.) 75s Removing linux-image-6.11.0-8-generic (6.11.0-8.8) ... 75s I: /boot/vmlinuz.old is now a symlink to vmlinuz-6.14.0-7-generic 75s I: /boot/initrd.img.old is now a symlink to initrd.img-6.14.0-7-generic 75s /etc/kernel/postrm.d/initramfs-tools: 75s update-initramfs: Deleting /boot/initrd.img-6.11.0-8-generic 75s /etc/kernel/postrm.d/zz-zipl: 75s Using config file '/etc/zipl.conf' 75s Building bootmap in '/boot' 75s Adding IPL section 'ubuntu' (default) 75s Preparing boot device for LD-IPL: vda (0000). 75s Done. 75s (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 ... 81491 files and directories currently installed.) 75s Purging configuration files for linux-image-6.11.0-8-generic (6.11.0-8.8) ... 75s rmdir: failed to remove '/lib/modules/6.11.0-8-generic': Directory not empty 76s autopkgtest [09:20:03]: upgrading testbed (apt dist-upgrade and autopurge) 76s Reading package lists... 76s Building dependency tree... 76s Reading state information... 76s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 76s Starting 2 pkgProblemResolver with broken count: 0 76s Done 76s Entering ResolveByKeep 76s 76s Calculating upgrade... 76s The following packages were automatically installed and are no longer required: 76s libnsl2 libpython3.12-minimal libpython3.12-stdlib libpython3.12t64 76s linux-headers-6.11.0-8 linux-headers-6.11.0-8-generic 76s linux-modules-6.11.0-8-generic linux-tools-6.11.0-8 76s linux-tools-6.11.0-8-generic 76s Use 'sudo apt autoremove' to remove them. 76s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 77s Reading package lists... 77s Building dependency tree... 77s Reading state information... 77s Starting pkgProblemResolver with broken count: 0 77s Starting 2 pkgProblemResolver with broken count: 0 77s Done 77s Solving dependencies... 77s The following packages will be REMOVED: 77s libnsl2* libpython3.12-minimal* libpython3.12-stdlib* libpython3.12t64* 77s linux-headers-6.11.0-8* linux-headers-6.11.0-8-generic* 77s linux-modules-6.11.0-8-generic* linux-tools-6.11.0-8* 77s linux-tools-6.11.0-8-generic* 77s 0 upgraded, 0 newly installed, 9 to remove and 0 not upgraded. 77s After this operation, 167 MB disk space will be freed. 77s (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 ... 81491 files and directories currently installed.) 77s Removing linux-tools-6.11.0-8-generic (6.11.0-8.8) ... 77s Removing linux-tools-6.11.0-8 (6.11.0-8.8) ... 77s Removing libpython3.12t64:s390x (3.12.9-1) ... 77s Removing libpython3.12-stdlib:s390x (3.12.9-1) ... 77s Removing libnsl2:s390x (1.3.0-3build3) ... 77s Removing libpython3.12-minimal:s390x (3.12.9-1) ... 77s Removing linux-headers-6.11.0-8-generic (6.11.0-8.8) ... 77s Removing linux-headers-6.11.0-8 (6.11.0-8.8) ... 78s Removing linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 78s Processing triggers for libc-bin (2.41-1ubuntu1) ... 78s (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 ... 56391 files and directories currently installed.) 78s Purging configuration files for libpython3.12-minimal:s390x (3.12.9-1) ... 78s Purging configuration files for linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 79s autopkgtest [09:20:06]: rebooting testbed after setup commands that affected boot 96s autopkgtest [09:20:23]: testbed running kernel: Linux 6.14.0-7-generic #7-Ubuntu SMP Fri Feb 28 10:57:32 UTC 2025 99s autopkgtest [09:20:26]: @@@@@@@@@@@@@@@@@@@@ apt-source poetry-plugin-export 100s Get:1 http://ftpmaster.internal/ubuntu plucky/universe poetry-plugin-export 1.9.0-1 (dsc) [2323 B] 100s Get:2 http://ftpmaster.internal/ubuntu plucky/universe poetry-plugin-export 1.9.0-1 (tar) [77.4 kB] 100s Get:3 http://ftpmaster.internal/ubuntu plucky/universe poetry-plugin-export 1.9.0-1 (diff) [2336 B] 100s gpgv: Signature made Thu Jan 23 02:44:17 2025 UTC 100s gpgv: using RSA key 13796755BBC72BB8ABE2AEB5FA9DEC5DE11C63F1 100s gpgv: issuer "eamanu@debian.org" 100s gpgv: Can't check signature: No public key 100s dpkg-source: warning: cannot verify inline signature for ./poetry-plugin-export_1.9.0-1.dsc: no acceptable signature found 100s autopkgtest [09:20:27]: testing package poetry-plugin-export version 1.9.0-1 101s autopkgtest [09:20:28]: build not needed 101s autopkgtest [09:20:28]: test pybuild-autopkgtest: preparing testbed 101s Reading package lists... 101s Building dependency tree... 101s Reading state information... 102s Starting pkgProblemResolver with broken count: 0 102s Starting 2 pkgProblemResolver with broken count: 0 102s Done 102s The following NEW packages will be installed: 102s autoconf automake autopoint autotools-dev build-essential cpp cpp-14 102s cpp-14-s390x-linux-gnu cpp-s390x-linux-gnu debhelper debugedit dh-autoreconf 102s dh-python dh-strip-nondeterminism dwz g++ g++-14 g++-14-s390x-linux-gnu 102s g++-s390x-linux-gnu gcc gcc-14 gcc-14-s390x-linux-gnu gcc-s390x-linux-gnu 102s gettext intltool-debian libarchive-zip-perl libasan8 libcc1-0 102s libdebhelper-perl libfile-stripnondeterminism-perl libgcc-14-dev libgomp1 102s libisl23 libitm1 libjs-jquery libjs-jquery-hotkeys libjs-jquery-isonscreen 102s libjs-jquery-metadata libjs-jquery-tablesorter 102s libjs-jquery-throttle-debounce libmpc3 libstdc++-14-dev libtool libubsan1 m4 102s po-debconf pybuild-plugin-autopkgtest pybuild-plugin-pyproject python3-all 102s python3-build python3-cachecontrol python3-cleo python3-coverage 102s python3-distlib python3-dulwich python3-execnet python3-fastjsonschema 102s python3-filelock python3-findpython python3-importlib-metadata 102s python3-iniconfig python3-installer python3-jaraco.classes python3-jeepney 102s python3-keyring python3-msgpack python3-packaging python3-pbs-installer 102s python3-pip-whl python3-pkginfo python3-platformdirs python3-pluggy 102s python3-poetry python3-poetry-core python3-poetry-plugin-export 102s python3-pyproject-hooks python3-pytest python3-pytest-cov 102s python3-pytest-mock python3-pytest-xdist python3-rapidfuzz 102s python3-requests-toolbelt python3-secretstorage python3-setuptools-whl 102s python3-shellingham python3-toml python3-tomlkit python3-trove-classifiers 102s python3-virtualenv python3-wheel python3-wheel-whl 102s 0 upgraded, 91 newly installed, 0 to remove and 0 not upgraded. 102s Need to get 60.4 MB of archives. 102s After this operation, 192 MB of additional disk space will be used. 102s Get:1 http://ftpmaster.internal/ubuntu plucky/main s390x m4 s390x 1.4.19-7 [259 kB] 102s Get:2 http://ftpmaster.internal/ubuntu plucky/main s390x autoconf all 2.72-3ubuntu1 [383 kB] 102s Get:3 http://ftpmaster.internal/ubuntu plucky/main s390x autotools-dev all 20220109.1 [44.9 kB] 102s Get:4 http://ftpmaster.internal/ubuntu plucky/main s390x automake all 1:1.17-3ubuntu1 [572 kB] 102s Get:5 http://ftpmaster.internal/ubuntu plucky/main s390x autopoint all 0.23.1-1 [619 kB] 102s Get:6 http://ftpmaster.internal/ubuntu plucky/main s390x libisl23 s390x 0.27-1 [704 kB] 103s Get:7 http://ftpmaster.internal/ubuntu plucky/main s390x libmpc3 s390x 1.3.1-1build2 [57.8 kB] 103s Get:8 http://ftpmaster.internal/ubuntu plucky/main s390x cpp-14-s390x-linux-gnu s390x 14.2.0-17ubuntu3 [9572 kB] 103s Get:9 http://ftpmaster.internal/ubuntu plucky/main s390x cpp-14 s390x 14.2.0-17ubuntu3 [1028 B] 103s Get:10 http://ftpmaster.internal/ubuntu plucky/main s390x cpp-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [5556 B] 103s Get:11 http://ftpmaster.internal/ubuntu plucky/main s390x cpp s390x 4:14.2.0-1ubuntu1 [22.4 kB] 103s Get:12 http://ftpmaster.internal/ubuntu plucky/main s390x libcc1-0 s390x 15-20250222-0ubuntu1 [49.2 kB] 103s Get:13 http://ftpmaster.internal/ubuntu plucky/main s390x libgomp1 s390x 15-20250222-0ubuntu1 [152 kB] 103s Get:14 http://ftpmaster.internal/ubuntu plucky/main s390x libitm1 s390x 15-20250222-0ubuntu1 [31.2 kB] 103s Get:15 http://ftpmaster.internal/ubuntu plucky/main s390x libasan8 s390x 15-20250222-0ubuntu1 [2970 kB] 103s Get:16 http://ftpmaster.internal/ubuntu plucky/main s390x libubsan1 s390x 15-20250222-0ubuntu1 [1212 kB] 103s Get:17 http://ftpmaster.internal/ubuntu plucky/main s390x libgcc-14-dev s390x 14.2.0-17ubuntu3 [1037 kB] 103s Get:18 http://ftpmaster.internal/ubuntu plucky/main s390x gcc-14-s390x-linux-gnu s390x 14.2.0-17ubuntu3 [18.7 MB] 103s Get:19 http://ftpmaster.internal/ubuntu plucky/main s390x gcc-14 s390x 14.2.0-17ubuntu3 [526 kB] 103s Get:20 http://ftpmaster.internal/ubuntu plucky/main s390x gcc-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [1204 B] 103s Get:21 http://ftpmaster.internal/ubuntu plucky/main s390x gcc s390x 4:14.2.0-1ubuntu1 [5004 B] 103s Get:22 http://ftpmaster.internal/ubuntu plucky/main s390x libstdc++-14-dev s390x 14.2.0-17ubuntu3 [2611 kB] 103s Get:23 http://ftpmaster.internal/ubuntu plucky/main s390x g++-14-s390x-linux-gnu s390x 14.2.0-17ubuntu3 [11.0 MB] 104s Get:24 http://ftpmaster.internal/ubuntu plucky/main s390x g++-14 s390x 14.2.0-17ubuntu3 [21.8 kB] 104s Get:25 http://ftpmaster.internal/ubuntu plucky/main s390x g++-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [956 B] 104s Get:26 http://ftpmaster.internal/ubuntu plucky/main s390x g++ s390x 4:14.2.0-1ubuntu1 [1080 B] 104s Get:27 http://ftpmaster.internal/ubuntu plucky/main s390x build-essential s390x 12.10ubuntu1 [4930 B] 104s Get:28 http://ftpmaster.internal/ubuntu plucky/main s390x libdebhelper-perl all 13.24.1ubuntu2 [95.4 kB] 104s Get:29 http://ftpmaster.internal/ubuntu plucky/main s390x libtool all 2.5.4-4 [168 kB] 104s Get:30 http://ftpmaster.internal/ubuntu plucky/main s390x dh-autoreconf all 20 [16.1 kB] 104s Get:31 http://ftpmaster.internal/ubuntu plucky/main s390x libarchive-zip-perl all 1.68-1 [90.2 kB] 104s Get:32 http://ftpmaster.internal/ubuntu plucky/main s390x libfile-stripnondeterminism-perl all 1.14.1-2 [20.3 kB] 104s Get:33 http://ftpmaster.internal/ubuntu plucky/main s390x dh-strip-nondeterminism all 1.14.1-2 [5064 B] 104s Get:34 http://ftpmaster.internal/ubuntu plucky/main s390x debugedit s390x 1:5.1-2 [50.1 kB] 104s Get:35 http://ftpmaster.internal/ubuntu plucky/main s390x dwz s390x 0.15-1build6 [122 kB] 104s Get:36 http://ftpmaster.internal/ubuntu plucky/main s390x gettext s390x 0.23.1-1 [1065 kB] 104s Get:37 http://ftpmaster.internal/ubuntu plucky/main s390x intltool-debian all 0.35.0+20060710.6 [23.2 kB] 104s Get:38 http://ftpmaster.internal/ubuntu plucky/main s390x po-debconf all 1.0.21+nmu1 [233 kB] 104s Get:39 http://ftpmaster.internal/ubuntu plucky/main s390x debhelper all 13.24.1ubuntu2 [895 kB] 104s Get:40 http://ftpmaster.internal/ubuntu plucky/universe s390x dh-python all 6.20250308 [118 kB] 104s Get:41 http://ftpmaster.internal/ubuntu plucky/main s390x libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [328 kB] 104s Get:42 http://ftpmaster.internal/ubuntu plucky/universe s390x libjs-jquery-metadata all 12-4 [6582 B] 104s Get:43 http://ftpmaster.internal/ubuntu plucky/universe s390x libjs-jquery-tablesorter all 1:2.31.3+dfsg1-4 [192 kB] 104s Get:44 http://ftpmaster.internal/ubuntu plucky/universe s390x libjs-jquery-throttle-debounce all 1.1+dfsg.1-2 [12.5 kB] 104s Get:45 http://ftpmaster.internal/ubuntu plucky/universe s390x pybuild-plugin-autopkgtest all 6.20250308 [1744 B] 104s Get:46 http://ftpmaster.internal/ubuntu plucky/main s390x python3-importlib-metadata all 8.6.1-1 [20.7 kB] 104s Get:47 http://ftpmaster.internal/ubuntu plucky/main s390x python3-packaging all 24.2-1 [51.5 kB] 104s Get:48 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-pyproject-hooks all 1.2.0-1 [10.2 kB] 104s Get:49 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-toml all 0.10.2-1 [16.5 kB] 104s Get:50 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-wheel all 0.45.1-1 [57.7 kB] 104s Get:51 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-build all 1.2.2-1 [31.0 kB] 104s Get:52 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-installer all 0.7.0+dfsg1-3 [17.4 kB] 104s Get:53 http://ftpmaster.internal/ubuntu plucky/universe s390x pybuild-plugin-pyproject all 6.20250308 [1726 B] 104s Get:54 http://ftpmaster.internal/ubuntu plucky/main s390x python3-all s390x 3.13.2-2 [886 B] 104s Get:55 http://ftpmaster.internal/ubuntu plucky/main s390x python3-msgpack s390x 1.0.3-3build4 [87.7 kB] 104s Get:56 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-cachecontrol all 0.14.2-1 [18.7 kB] 104s Get:57 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-rapidfuzz s390x 3.12.1+ds-1build1 [1526 kB] 104s Get:58 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-cleo all 2.2.1-4 [52.4 kB] 104s Get:59 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-coverage s390x 7.6.0+dfsg1-2build1 [153 kB] 104s Get:60 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-distlib all 0.3.9-1 [267 kB] 104s Get:61 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-dulwich s390x 0.22.7-1 [183 kB] 104s Get:62 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-execnet all 2.1.1-1 [33.4 kB] 104s Get:63 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-fastjsonschema all 2.21.1-1 [20.4 kB] 104s Get:64 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-filelock all 3.17.0-1 [13.0 kB] 104s Get:65 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-findpython all 0.6.2-1 [15.3 kB] 104s Get:66 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-iniconfig all 1.1.1-2 [6024 B] 104s Get:67 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-jaraco.classes all 3.4.0-1 [7664 B] 104s Get:68 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-jeepney all 0.8.0-4 [33.1 kB] 104s Get:69 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-secretstorage all 3.3.3-3 [13.7 kB] 104s Get:70 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-keyring all 25.6.0-1 [40.6 kB] 104s Get:71 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-pbs-installer all 2025.02.12-2 [43.8 kB] 104s Get:72 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-pip-whl all 25.0+dfsg-1 [1446 kB] 104s Get:73 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-pkginfo all 1.12.1.2-2 [17.4 kB] 104s Get:74 http://ftpmaster.internal/ubuntu plucky/main s390x python3-platformdirs all 4.3.6-1 [16.8 kB] 104s Get:75 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-pluggy all 1.5.0-1 [21.0 kB] 104s Get:76 http://ftpmaster.internal/ubuntu plucky-proposed/universe s390x python3-poetry-core all 2.1.1-1 [221 kB] 104s Get:77 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-requests-toolbelt all 1.0.0-4 [37.0 kB] 104s Get:78 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-shellingham all 1.5.4-1 [9482 B] 104s Get:79 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-tomlkit all 0.13.2-1 [37.6 kB] 104s Get:80 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-trove-classifiers all 2025.1.15.22-1 [10.9 kB] 104s Get:81 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-setuptools-whl all 75.8.0-1 [1152 kB] 104s Get:82 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-wheel-whl all 0.45.1-1 [74.6 kB] 104s Get:83 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-virtualenv all 20.29.1+ds-1 [72.6 kB] 104s Get:84 http://ftpmaster.internal/ubuntu plucky-proposed/universe s390x python3-poetry all 2.1.1+dfsg-1 [165 kB] 104s Get:85 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-poetry-plugin-export all 1.9.0-1 [10.3 kB] 104s Get:86 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-pytest all 8.3.4-1 [252 kB] 104s Get:87 http://ftpmaster.internal/ubuntu plucky/universe s390x libjs-jquery-hotkeys all 0.2.0-1 [13.3 kB] 104s Get:88 http://ftpmaster.internal/ubuntu plucky/universe s390x libjs-jquery-isonscreen all 1.2.0-1.1 [3244 B] 104s Get:89 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-pytest-cov all 5.0.0-1 [21.3 kB] 104s Get:90 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-pytest-mock all 3.14.0-2 [11.7 kB] 104s Get:91 http://ftpmaster.internal/ubuntu plucky/universe s390x python3-pytest-xdist all 3.6.1-1 [33.8 kB] 105s Fetched 60.4 MB in 3s (22.7 MB/s) 105s Selecting previously unselected package m4. 105s (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 ... 56389 files and directories currently installed.) 105s Preparing to unpack .../00-m4_1.4.19-7_s390x.deb ... 105s Unpacking m4 (1.4.19-7) ... 105s Selecting previously unselected package autoconf. 105s Preparing to unpack .../01-autoconf_2.72-3ubuntu1_all.deb ... 105s Unpacking autoconf (2.72-3ubuntu1) ... 105s Selecting previously unselected package autotools-dev. 105s Preparing to unpack .../02-autotools-dev_20220109.1_all.deb ... 105s Unpacking autotools-dev (20220109.1) ... 105s Selecting previously unselected package automake. 105s Preparing to unpack .../03-automake_1%3a1.17-3ubuntu1_all.deb ... 105s Unpacking automake (1:1.17-3ubuntu1) ... 105s Selecting previously unselected package autopoint. 105s Preparing to unpack .../04-autopoint_0.23.1-1_all.deb ... 105s Unpacking autopoint (0.23.1-1) ... 105s Selecting previously unselected package libisl23:s390x. 105s Preparing to unpack .../05-libisl23_0.27-1_s390x.deb ... 105s Unpacking libisl23:s390x (0.27-1) ... 105s Selecting previously unselected package libmpc3:s390x. 105s Preparing to unpack .../06-libmpc3_1.3.1-1build2_s390x.deb ... 105s Unpacking libmpc3:s390x (1.3.1-1build2) ... 105s Selecting previously unselected package cpp-14-s390x-linux-gnu. 105s Preparing to unpack .../07-cpp-14-s390x-linux-gnu_14.2.0-17ubuntu3_s390x.deb ... 105s Unpacking cpp-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 105s Selecting previously unselected package cpp-14. 105s Preparing to unpack .../08-cpp-14_14.2.0-17ubuntu3_s390x.deb ... 105s Unpacking cpp-14 (14.2.0-17ubuntu3) ... 105s Selecting previously unselected package cpp-s390x-linux-gnu. 105s Preparing to unpack .../09-cpp-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 105s Unpacking cpp-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 105s Selecting previously unselected package cpp. 105s Preparing to unpack .../10-cpp_4%3a14.2.0-1ubuntu1_s390x.deb ... 105s Unpacking cpp (4:14.2.0-1ubuntu1) ... 105s Selecting previously unselected package libcc1-0:s390x. 105s Preparing to unpack .../11-libcc1-0_15-20250222-0ubuntu1_s390x.deb ... 105s Unpacking libcc1-0:s390x (15-20250222-0ubuntu1) ... 105s Selecting previously unselected package libgomp1:s390x. 105s Preparing to unpack .../12-libgomp1_15-20250222-0ubuntu1_s390x.deb ... 105s Unpacking libgomp1:s390x (15-20250222-0ubuntu1) ... 105s Selecting previously unselected package libitm1:s390x. 105s Preparing to unpack .../13-libitm1_15-20250222-0ubuntu1_s390x.deb ... 105s Unpacking libitm1:s390x (15-20250222-0ubuntu1) ... 105s Selecting previously unselected package libasan8:s390x. 105s Preparing to unpack .../14-libasan8_15-20250222-0ubuntu1_s390x.deb ... 105s Unpacking libasan8:s390x (15-20250222-0ubuntu1) ... 105s Selecting previously unselected package libubsan1:s390x. 105s Preparing to unpack .../15-libubsan1_15-20250222-0ubuntu1_s390x.deb ... 105s Unpacking libubsan1:s390x (15-20250222-0ubuntu1) ... 105s Selecting previously unselected package libgcc-14-dev:s390x. 105s Preparing to unpack .../16-libgcc-14-dev_14.2.0-17ubuntu3_s390x.deb ... 105s Unpacking libgcc-14-dev:s390x (14.2.0-17ubuntu3) ... 105s Selecting previously unselected package gcc-14-s390x-linux-gnu. 105s Preparing to unpack .../17-gcc-14-s390x-linux-gnu_14.2.0-17ubuntu3_s390x.deb ... 105s Unpacking gcc-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 106s Selecting previously unselected package gcc-14. 106s Preparing to unpack .../18-gcc-14_14.2.0-17ubuntu3_s390x.deb ... 106s Unpacking gcc-14 (14.2.0-17ubuntu3) ... 106s Selecting previously unselected package gcc-s390x-linux-gnu. 106s Preparing to unpack .../19-gcc-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 106s Unpacking gcc-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 106s Selecting previously unselected package gcc. 106s Preparing to unpack .../20-gcc_4%3a14.2.0-1ubuntu1_s390x.deb ... 106s Unpacking gcc (4:14.2.0-1ubuntu1) ... 106s Selecting previously unselected package libstdc++-14-dev:s390x. 106s Preparing to unpack .../21-libstdc++-14-dev_14.2.0-17ubuntu3_s390x.deb ... 106s Unpacking libstdc++-14-dev:s390x (14.2.0-17ubuntu3) ... 106s Selecting previously unselected package g++-14-s390x-linux-gnu. 106s Preparing to unpack .../22-g++-14-s390x-linux-gnu_14.2.0-17ubuntu3_s390x.deb ... 106s Unpacking g++-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 106s Selecting previously unselected package g++-14. 106s Preparing to unpack .../23-g++-14_14.2.0-17ubuntu3_s390x.deb ... 106s Unpacking g++-14 (14.2.0-17ubuntu3) ... 106s Selecting previously unselected package g++-s390x-linux-gnu. 106s Preparing to unpack .../24-g++-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 106s Unpacking g++-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 106s Selecting previously unselected package g++. 106s Preparing to unpack .../25-g++_4%3a14.2.0-1ubuntu1_s390x.deb ... 106s Unpacking g++ (4:14.2.0-1ubuntu1) ... 106s Selecting previously unselected package build-essential. 106s Preparing to unpack .../26-build-essential_12.10ubuntu1_s390x.deb ... 106s Unpacking build-essential (12.10ubuntu1) ... 106s Selecting previously unselected package libdebhelper-perl. 106s Preparing to unpack .../27-libdebhelper-perl_13.24.1ubuntu2_all.deb ... 106s Unpacking libdebhelper-perl (13.24.1ubuntu2) ... 106s Selecting previously unselected package libtool. 106s Preparing to unpack .../28-libtool_2.5.4-4_all.deb ... 106s Unpacking libtool (2.5.4-4) ... 106s Selecting previously unselected package dh-autoreconf. 106s Preparing to unpack .../29-dh-autoreconf_20_all.deb ... 106s Unpacking dh-autoreconf (20) ... 106s Selecting previously unselected package libarchive-zip-perl. 106s Preparing to unpack .../30-libarchive-zip-perl_1.68-1_all.deb ... 106s Unpacking libarchive-zip-perl (1.68-1) ... 106s Selecting previously unselected package libfile-stripnondeterminism-perl. 106s Preparing to unpack .../31-libfile-stripnondeterminism-perl_1.14.1-2_all.deb ... 106s Unpacking libfile-stripnondeterminism-perl (1.14.1-2) ... 106s Selecting previously unselected package dh-strip-nondeterminism. 106s Preparing to unpack .../32-dh-strip-nondeterminism_1.14.1-2_all.deb ... 106s Unpacking dh-strip-nondeterminism (1.14.1-2) ... 106s Selecting previously unselected package debugedit. 106s Preparing to unpack .../33-debugedit_1%3a5.1-2_s390x.deb ... 106s Unpacking debugedit (1:5.1-2) ... 106s Selecting previously unselected package dwz. 106s Preparing to unpack .../34-dwz_0.15-1build6_s390x.deb ... 106s Unpacking dwz (0.15-1build6) ... 106s Selecting previously unselected package gettext. 106s Preparing to unpack .../35-gettext_0.23.1-1_s390x.deb ... 106s Unpacking gettext (0.23.1-1) ... 106s Selecting previously unselected package intltool-debian. 106s Preparing to unpack .../36-intltool-debian_0.35.0+20060710.6_all.deb ... 106s Unpacking intltool-debian (0.35.0+20060710.6) ... 106s Selecting previously unselected package po-debconf. 106s Preparing to unpack .../37-po-debconf_1.0.21+nmu1_all.deb ... 106s Unpacking po-debconf (1.0.21+nmu1) ... 106s Selecting previously unselected package debhelper. 106s Preparing to unpack .../38-debhelper_13.24.1ubuntu2_all.deb ... 106s Unpacking debhelper (13.24.1ubuntu2) ... 106s Selecting previously unselected package dh-python. 106s Preparing to unpack .../39-dh-python_6.20250308_all.deb ... 106s Unpacking dh-python (6.20250308) ... 106s Selecting previously unselected package libjs-jquery. 106s Preparing to unpack .../40-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ... 106s Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 106s Selecting previously unselected package libjs-jquery-metadata. 106s Preparing to unpack .../41-libjs-jquery-metadata_12-4_all.deb ... 106s Unpacking libjs-jquery-metadata (12-4) ... 106s Selecting previously unselected package libjs-jquery-tablesorter. 106s Preparing to unpack .../42-libjs-jquery-tablesorter_1%3a2.31.3+dfsg1-4_all.deb ... 106s Unpacking libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 106s Selecting previously unselected package libjs-jquery-throttle-debounce. 106s Preparing to unpack .../43-libjs-jquery-throttle-debounce_1.1+dfsg.1-2_all.deb ... 106s Unpacking libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 106s Selecting previously unselected package pybuild-plugin-autopkgtest. 106s Preparing to unpack .../44-pybuild-plugin-autopkgtest_6.20250308_all.deb ... 106s Unpacking pybuild-plugin-autopkgtest (6.20250308) ... 106s Selecting previously unselected package python3-importlib-metadata. 106s Preparing to unpack .../45-python3-importlib-metadata_8.6.1-1_all.deb ... 106s Unpacking python3-importlib-metadata (8.6.1-1) ... 106s Selecting previously unselected package python3-packaging. 106s Preparing to unpack .../46-python3-packaging_24.2-1_all.deb ... 106s Unpacking python3-packaging (24.2-1) ... 106s Selecting previously unselected package python3-pyproject-hooks. 106s Preparing to unpack .../47-python3-pyproject-hooks_1.2.0-1_all.deb ... 106s Unpacking python3-pyproject-hooks (1.2.0-1) ... 106s Selecting previously unselected package python3-toml. 106s Preparing to unpack .../48-python3-toml_0.10.2-1_all.deb ... 106s Unpacking python3-toml (0.10.2-1) ... 106s Selecting previously unselected package python3-wheel. 106s Preparing to unpack .../49-python3-wheel_0.45.1-1_all.deb ... 106s Unpacking python3-wheel (0.45.1-1) ... 106s Selecting previously unselected package python3-build. 106s Preparing to unpack .../50-python3-build_1.2.2-1_all.deb ... 106s Unpacking python3-build (1.2.2-1) ... 106s Selecting previously unselected package python3-installer. 106s Preparing to unpack .../51-python3-installer_0.7.0+dfsg1-3_all.deb ... 106s Unpacking python3-installer (0.7.0+dfsg1-3) ... 106s Selecting previously unselected package pybuild-plugin-pyproject. 106s Preparing to unpack .../52-pybuild-plugin-pyproject_6.20250308_all.deb ... 106s Unpacking pybuild-plugin-pyproject (6.20250308) ... 106s Selecting previously unselected package python3-all. 106s Preparing to unpack .../53-python3-all_3.13.2-2_s390x.deb ... 106s Unpacking python3-all (3.13.2-2) ... 106s Selecting previously unselected package python3-msgpack. 106s Preparing to unpack .../54-python3-msgpack_1.0.3-3build4_s390x.deb ... 106s Unpacking python3-msgpack (1.0.3-3build4) ... 106s Selecting previously unselected package python3-cachecontrol. 106s Preparing to unpack .../55-python3-cachecontrol_0.14.2-1_all.deb ... 106s Unpacking python3-cachecontrol (0.14.2-1) ... 106s Selecting previously unselected package python3-rapidfuzz. 106s Preparing to unpack .../56-python3-rapidfuzz_3.12.1+ds-1build1_s390x.deb ... 106s Unpacking python3-rapidfuzz (3.12.1+ds-1build1) ... 106s Selecting previously unselected package python3-cleo. 106s Preparing to unpack .../57-python3-cleo_2.2.1-4_all.deb ... 106s Unpacking python3-cleo (2.2.1-4) ... 106s Selecting previously unselected package python3-coverage. 106s Preparing to unpack .../58-python3-coverage_7.6.0+dfsg1-2build1_s390x.deb ... 106s Unpacking python3-coverage (7.6.0+dfsg1-2build1) ... 106s Selecting previously unselected package python3-distlib. 106s Preparing to unpack .../59-python3-distlib_0.3.9-1_all.deb ... 106s Unpacking python3-distlib (0.3.9-1) ... 106s Selecting previously unselected package python3-dulwich. 106s Preparing to unpack .../60-python3-dulwich_0.22.7-1_s390x.deb ... 106s Unpacking python3-dulwich (0.22.7-1) ... 106s Selecting previously unselected package python3-execnet. 106s Preparing to unpack .../61-python3-execnet_2.1.1-1_all.deb ... 106s Unpacking python3-execnet (2.1.1-1) ... 106s Selecting previously unselected package python3-fastjsonschema. 106s Preparing to unpack .../62-python3-fastjsonschema_2.21.1-1_all.deb ... 106s Unpacking python3-fastjsonschema (2.21.1-1) ... 106s Selecting previously unselected package python3-filelock. 106s Preparing to unpack .../63-python3-filelock_3.17.0-1_all.deb ... 106s Unpacking python3-filelock (3.17.0-1) ... 106s Selecting previously unselected package python3-findpython. 106s Preparing to unpack .../64-python3-findpython_0.6.2-1_all.deb ... 106s Unpacking python3-findpython (0.6.2-1) ... 106s Selecting previously unselected package python3-iniconfig. 106s Preparing to unpack .../65-python3-iniconfig_1.1.1-2_all.deb ... 106s Unpacking python3-iniconfig (1.1.1-2) ... 106s Selecting previously unselected package python3-jaraco.classes. 106s Preparing to unpack .../66-python3-jaraco.classes_3.4.0-1_all.deb ... 106s Unpacking python3-jaraco.classes (3.4.0-1) ... 106s Selecting previously unselected package python3-jeepney. 106s Preparing to unpack .../67-python3-jeepney_0.8.0-4_all.deb ... 106s Unpacking python3-jeepney (0.8.0-4) ... 106s Selecting previously unselected package python3-secretstorage. 106s Preparing to unpack .../68-python3-secretstorage_3.3.3-3_all.deb ... 106s Unpacking python3-secretstorage (3.3.3-3) ... 106s Selecting previously unselected package python3-keyring. 106s Preparing to unpack .../69-python3-keyring_25.6.0-1_all.deb ... 106s Unpacking python3-keyring (25.6.0-1) ... 106s Selecting previously unselected package python3-pbs-installer. 106s Preparing to unpack .../70-python3-pbs-installer_2025.02.12-2_all.deb ... 106s Unpacking python3-pbs-installer (2025.02.12-2) ... 106s Selecting previously unselected package python3-pip-whl. 106s Preparing to unpack .../71-python3-pip-whl_25.0+dfsg-1_all.deb ... 106s Unpacking python3-pip-whl (25.0+dfsg-1) ... 106s Selecting previously unselected package python3-pkginfo. 106s Preparing to unpack .../72-python3-pkginfo_1.12.1.2-2_all.deb ... 106s Unpacking python3-pkginfo (1.12.1.2-2) ... 106s Selecting previously unselected package python3-platformdirs. 106s Preparing to unpack .../73-python3-platformdirs_4.3.6-1_all.deb ... 106s Unpacking python3-platformdirs (4.3.6-1) ... 107s Selecting previously unselected package python3-pluggy. 107s Preparing to unpack .../74-python3-pluggy_1.5.0-1_all.deb ... 107s Unpacking python3-pluggy (1.5.0-1) ... 107s Selecting previously unselected package python3-poetry-core. 107s Preparing to unpack .../75-python3-poetry-core_2.1.1-1_all.deb ... 107s Unpacking python3-poetry-core (2.1.1-1) ... 107s Selecting previously unselected package python3-requests-toolbelt. 107s Preparing to unpack .../76-python3-requests-toolbelt_1.0.0-4_all.deb ... 107s Unpacking python3-requests-toolbelt (1.0.0-4) ... 107s Selecting previously unselected package python3-shellingham. 107s Preparing to unpack .../77-python3-shellingham_1.5.4-1_all.deb ... 107s Unpacking python3-shellingham (1.5.4-1) ... 107s Selecting previously unselected package python3-tomlkit. 107s Preparing to unpack .../78-python3-tomlkit_0.13.2-1_all.deb ... 107s Unpacking python3-tomlkit (0.13.2-1) ... 107s Selecting previously unselected package python3-trove-classifiers. 107s Preparing to unpack .../79-python3-trove-classifiers_2025.1.15.22-1_all.deb ... 107s Unpacking python3-trove-classifiers (2025.1.15.22-1) ... 107s Selecting previously unselected package python3-setuptools-whl. 107s Preparing to unpack .../80-python3-setuptools-whl_75.8.0-1_all.deb ... 107s Unpacking python3-setuptools-whl (75.8.0-1) ... 107s Selecting previously unselected package python3-wheel-whl. 107s Preparing to unpack .../81-python3-wheel-whl_0.45.1-1_all.deb ... 107s Unpacking python3-wheel-whl (0.45.1-1) ... 107s Selecting previously unselected package python3-virtualenv. 107s Preparing to unpack .../82-python3-virtualenv_20.29.1+ds-1_all.deb ... 107s Unpacking python3-virtualenv (20.29.1+ds-1) ... 107s Selecting previously unselected package python3-poetry. 107s Preparing to unpack .../83-python3-poetry_2.1.1+dfsg-1_all.deb ... 107s Unpacking python3-poetry (2.1.1+dfsg-1) ... 107s Selecting previously unselected package python3-poetry-plugin-export. 107s Preparing to unpack .../84-python3-poetry-plugin-export_1.9.0-1_all.deb ... 107s Unpacking python3-poetry-plugin-export (1.9.0-1) ... 107s Selecting previously unselected package python3-pytest. 107s Preparing to unpack .../85-python3-pytest_8.3.4-1_all.deb ... 107s Unpacking python3-pytest (8.3.4-1) ... 107s Selecting previously unselected package libjs-jquery-hotkeys. 107s Preparing to unpack .../86-libjs-jquery-hotkeys_0.2.0-1_all.deb ... 107s Unpacking libjs-jquery-hotkeys (0.2.0-1) ... 107s Selecting previously unselected package libjs-jquery-isonscreen. 107s Preparing to unpack .../87-libjs-jquery-isonscreen_1.2.0-1.1_all.deb ... 107s Unpacking libjs-jquery-isonscreen (1.2.0-1.1) ... 107s Selecting previously unselected package python3-pytest-cov. 107s Preparing to unpack .../88-python3-pytest-cov_5.0.0-1_all.deb ... 107s Unpacking python3-pytest-cov (5.0.0-1) ... 107s Selecting previously unselected package python3-pytest-mock. 107s Preparing to unpack .../89-python3-pytest-mock_3.14.0-2_all.deb ... 107s Unpacking python3-pytest-mock (3.14.0-2) ... 107s Selecting previously unselected package python3-pytest-xdist. 107s Preparing to unpack .../90-python3-pytest-xdist_3.6.1-1_all.deb ... 107s Unpacking python3-pytest-xdist (3.6.1-1) ... 107s Setting up dh-python (6.20250308) ... 107s Setting up python3-iniconfig (1.1.1-2) ... 107s Setting up python3-rapidfuzz (3.12.1+ds-1build1) ... 107s Setting up python3-setuptools-whl (75.8.0-1) ... 107s Setting up python3-filelock (3.17.0-1) ... 107s Setting up python3-jaraco.classes (3.4.0-1) ... 107s Setting up python3-requests-toolbelt (1.0.0-4) ... 107s Setting up python3-importlib-metadata (8.6.1-1) ... 107s Setting up python3-pkginfo (1.12.1.2-2) ... 107s Setting up python3-pip-whl (25.0+dfsg-1) ... 107s Setting up libarchive-zip-perl (1.68-1) ... 107s Setting up libdebhelper-perl (13.24.1ubuntu2) ... 107s Setting up m4 (1.4.19-7) ... 107s Setting up python3-all (3.13.2-2) ... 107s Setting up python3-coverage (7.6.0+dfsg1-2build1) ... 107s Setting up libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 107s Setting up python3-distlib (0.3.9-1) ... 108s Setting up libgomp1:s390x (15-20250222-0ubuntu1) ... 108s Setting up python3-wheel (0.45.1-1) ... 108s Setting up python3-platformdirs (4.3.6-1) ... 108s Setting up autotools-dev (20220109.1) ... 108s Setting up python3-packaging (24.2-1) ... 108s Setting up python3-pyproject-hooks (1.2.0-1) ... 108s Setting up python3-poetry-core (2.1.1-1) ... 108s Setting up libmpc3:s390x (1.3.1-1build2) ... 108s Setting up autopoint (0.23.1-1) ... 108s Setting up python3-toml (0.10.2-1) ... 108s Setting up python3-jeepney (0.8.0-4) ... 108s Setting up python3-installer (0.7.0+dfsg1-3) ... 108s Setting up autoconf (2.72-3ubuntu1) ... 108s Setting up python3-pluggy (1.5.0-1) ... 108s Setting up libubsan1:s390x (15-20250222-0ubuntu1) ... 108s Setting up python3-fastjsonschema (2.21.1-1) ... 109s Setting up dwz (0.15-1build6) ... 109s Setting up python3-trove-classifiers (2025.1.15.22-1) ... 109s Setting up python3-pbs-installer (2025.02.12-2) ... 109s Setting up python3-dulwich (0.22.7-1) ... 109s Setting up libasan8:s390x (15-20250222-0ubuntu1) ... 109s Setting up debugedit (1:5.1-2) ... 109s Setting up python3-cleo (2.2.1-4) ... 109s Setting up python3-msgpack (1.0.3-3build4) ... 109s Setting up python3-cachecontrol (0.14.2-1) ... 109s Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 109s Setting up libjs-jquery-hotkeys (0.2.0-1) ... 109s Setting up libisl23:s390x (0.27-1) ... 109s Setting up python3-build (1.2.2-1) ... 109s Setting up python3-execnet (2.1.1-1) ... 109s Setting up python3-shellingham (1.5.4-1) ... 109s Setting up python3-tomlkit (0.13.2-1) ... 110s Setting up python3-wheel-whl (0.45.1-1) ... 110s Setting up libcc1-0:s390x (15-20250222-0ubuntu1) ... 110s Setting up libitm1:s390x (15-20250222-0ubuntu1) ... 110s Setting up automake (1:1.17-3ubuntu1) ... 110s update-alternatives: using /usr/bin/automake-1.17 to provide /usr/bin/automake (automake) in auto mode 110s Setting up libfile-stripnondeterminism-perl (1.14.1-2) ... 110s Setting up gettext (0.23.1-1) ... 110s Setting up python3-findpython (0.6.2-1) ... 110s Setting up pybuild-plugin-pyproject (6.20250308) ... 110s Setting up python3-pytest (8.3.4-1) ... 110s Setting up python3-virtualenv (20.29.1+ds-1) ... 110s Setting up intltool-debian (0.35.0+20060710.6) ... 110s Setting up python3-secretstorage (3.3.3-3) ... 110s Setting up libjs-jquery-metadata (12-4) ... 110s Setting up libjs-jquery-isonscreen (1.2.0-1.1) ... 110s Setting up cpp-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 110s Setting up cpp-14 (14.2.0-17ubuntu3) ... 110s Setting up dh-strip-nondeterminism (1.14.1-2) ... 110s Setting up libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 110s Setting up python3-pytest-mock (3.14.0-2) ... 110s Setting up python3-keyring (25.6.0-1) ... 110s Setting up libgcc-14-dev:s390x (14.2.0-17ubuntu3) ... 110s Setting up libstdc++-14-dev:s390x (14.2.0-17ubuntu3) ... 110s Setting up python3-pytest-xdist (3.6.1-1) ... 110s Setting up cpp-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 110s Setting up po-debconf (1.0.21+nmu1) ... 110s Setting up python3-pytest-cov (5.0.0-1) ... 110s Setting up gcc-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 110s Setting up gcc-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 110s Setting up python3-poetry (2.1.1+dfsg-1) ... 111s Setting up g++-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 111s Setting up cpp (4:14.2.0-1ubuntu1) ... 111s Setting up python3-poetry-plugin-export (1.9.0-1) ... 111s Setting up g++-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 111s Setting up gcc-14 (14.2.0-17ubuntu3) ... 111s Setting up g++-14 (14.2.0-17ubuntu3) ... 111s Setting up libtool (2.5.4-4) ... 111s Setting up gcc (4:14.2.0-1ubuntu1) ... 111s Setting up dh-autoreconf (20) ... 111s Setting up g++ (4:14.2.0-1ubuntu1) ... 111s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 111s Setting up build-essential (12.10ubuntu1) ... 111s Setting up debhelper (13.24.1ubuntu2) ... 111s Setting up pybuild-plugin-autopkgtest (6.20250308) ... 111s Processing triggers for install-info (7.1.1-1) ... 111s Processing triggers for libc-bin (2.41-1ubuntu1) ... 111s Processing triggers for man-db (2.13.0-1) ... 112s autopkgtest [09:20:39]: test pybuild-autopkgtest: pybuild-autopkgtest 112s autopkgtest [09:20:39]: test pybuild-autopkgtest: [----------------------- 113s pybuild-autopkgtest 113s I: pybuild base:311: cd /tmp/autopkgtest.qECAE7/autopkgtest_tmp/build; python3.13 -m pytest tests 114s ============================= test session starts ============================== 114s platform linux -- Python 3.13.2, pytest-8.3.4, pluggy-1.5.0 114s rootdir: /tmp/autopkgtest.qECAE7/autopkgtest_tmp/build 114s configfile: pyproject.toml 114s plugins: xdist-3.6.1, mock-3.14.0, typeguard-4.4.2, cov-5.0.0 114s created: 2/2 workers 114s 2 workers [141 items] 114s 118s FFF.FF...FF..F.FFF.F.FF.F.FFFFFFFFFFF..FFFFFFFFFFFFFFFFFFFFFFFF..FFF.F.F [ 51%] 121s FFFF..FFFFF.F.FFFFFFFFFFFF..F.F.FF..F.F..FFF.F..F...FFFFFFFFFFFFF..FF [100%] 121s =================================== FAILURES =================================== 121s _ 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] _ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tester = 121s do_lock = None, extras = 'feature_bar' 121s 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' 121s 121s @pytest.mark.parametrize( 121s "extras, expected", 121s [ 121s ( 121s "feature_bar", 121s f"""\ 121s bar==1.1.0 ; {MARKER_PY} 121s foo==1.0.0 ; {MARKER_PY} 121s """, 121s ), 121s ( 121s "feature_bar feature_qux", 121s f"""\ 121s bar==1.1.0 ; {MARKER_PY} 121s foo==1.0.0 ; {MARKER_PY} 121s qux==1.2.0 ; {MARKER_PY} 121s """, 121s ), 121s ], 121s ) 121s def test_export_includes_extras_by_flag( 121s tester: CommandTester, do_lock: None, extras: str, expected: str 121s ) -> None: 121s tester.execute(f"--format requirements.txt --extras '{extras}'") 121s > assert tester.io.fetch_output() == expected 121s E assert 'bar==1.1.0 ;...ion < "4.0"\n' == 'bar==1.1.0 ;...on == "2.7"\n' 121s E 121s E - bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==1.1.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (2 lines hidden), use '-vv' to show 121s 121s tests/command/test_command_export.py:226: AssertionError 121s _ 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] _ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tester = 121s do_lock = None, extras = 'feature_bar feature_qux' 121s 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' 121s 121s @pytest.mark.parametrize( 121s "extras, expected", 121s [ 121s ( 121s "feature_bar", 121s f"""\ 121s bar==1.1.0 ; {MARKER_PY} 121s foo==1.0.0 ; {MARKER_PY} 121s """, 121s ), 121s ( 121s "feature_bar feature_qux", 121s f"""\ 121s bar==1.1.0 ; {MARKER_PY} 121s foo==1.0.0 ; {MARKER_PY} 121s qux==1.2.0 ; {MARKER_PY} 121s """, 121s ), 121s ], 121s ) 121s def test_export_includes_extras_by_flag( 121s tester: CommandTester, do_lock: None, extras: str, expected: str 121s ) -> None: 121s tester.execute(f"--format requirements.txt --extras '{extras}'") 121s > assert tester.io.fetch_output() == expected 121s E assert 'bar==1.1.0 ;...ion < "4.0"\n' == 'bar==1.1.0 ;...on == "2.7"\n' 121s E 121s E - bar==1.1.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==1.1.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (6 lines hidden), use '-vv' to show 121s 121s tests/command/test_command_export.py:226: AssertionError 121s _______ test_export_exports_requirements_txt_file_locks_if_no_lock_file ________ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tester = 121s poetry = 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_export_exports_requiremen0') 121s 121s def test_export_exports_requirements_txt_file_locks_if_no_lock_file( 121s tester: CommandTester, poetry: Poetry, tmp_path: Path 121s ) -> None: 121s assert not poetry.locker.lock.exists() 121s > _export_requirements(tester, poetry, tmp_path) 121s 121s tests/command/test_command_export.py:122: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s tester = 121s poetry = 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_export_exports_requiremen0') 121s 121s def _export_requirements(tester: CommandTester, poetry: Poetry, tmp_path: Path) -> None: 121s from tests.helpers import as_cwd 121s 121s with as_cwd(tmp_path): 121s tester.execute("--format requirements.txt --output requirements.txt") 121s 121s requirements = tmp_path / "requirements.txt" 121s assert requirements.exists() 121s 121s with requirements.open(encoding="utf-8") as f: 121s content = f.read() 121s 121s assert poetry.locker.lock.exists() 121s 121s expected = f"""\ 121s foo==1.0.0 ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 121s E 121s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s 121s tests/command/test_command_export.py:115: AssertionError 121s _____________ test_export_exports_requirements_txt_uses_lock_file ______________ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tester = 121s poetry = 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_export_exports_requiremen1') 121s do_lock = None 121s 121s def test_export_exports_requirements_txt_uses_lock_file( 121s tester: CommandTester, poetry: Poetry, tmp_path: Path, do_lock: None 121s ) -> None: 121s > _export_requirements(tester, poetry, tmp_path) 121s 121s tests/command/test_command_export.py:129: 121s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 121s 121s tester = 121s poetry = 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_export_exports_requiremen1') 121s 121s def _export_requirements(tester: CommandTester, poetry: Poetry, tmp_path: Path) -> None: 121s from tests.helpers import as_cwd 121s 121s with as_cwd(tmp_path): 121s tester.execute("--format requirements.txt --output requirements.txt") 121s 121s requirements = tmp_path / "requirements.txt" 121s assert requirements.exists() 121s 121s with requirements.open(encoding="utf-8") as f: 121s content = f.read() 121s 121s assert poetry.locker.lock.exists() 121s 121s expected = f"""\ 121s foo==1.0.0 ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 121s E 121s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s 121s tests/command/test_command_export.py:115: AssertionError 121s _________________________ test_export_with_all_extras __________________________ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tester = 121s do_lock = None 121s 121s def test_export_with_all_extras(tester: CommandTester, do_lock: None) -> None: 121s tester.execute("--format requirements.txt --all-extras") 121s output = tester.io.fetch_output() 121s > assert f"bar==1.1.0 ; {MARKER_PY}" in output 121s 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' 121s 121s tests/command/test_command_export.py:239: AssertionError 121s _________________________ test_export_with_all_groups __________________________ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tester = 121s do_lock = None 121s 121s def test_export_with_all_groups(tester: CommandTester, do_lock: None) -> None: 121s tester.execute("--format requirements.txt --all-groups") 121s output = tester.io.fetch_output() 121s > assert f"baz==2.0.0 ; {MARKER_PY}" in output 121s 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' 121s 121s tests/command/test_command_export.py:256: AssertionError 121s ___________________ test_export_prints_to_stdout_by_default ____________________ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tester = 121s do_lock = None 121s 121s def test_export_prints_to_stdout_by_default( 121s tester: CommandTester, do_lock: None 121s ) -> None: 121s tester.execute("--format requirements.txt") 121s expected = f"""\ 121s foo==1.0.0 ; {MARKER_PY} 121s """ 121s > assert tester.io.fetch_output() == expected 121s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 121s E 121s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s 121s tests/command/test_command_export.py:157: AssertionError 121s _____________ test_export_uses_requirements_txt_format_by_default ______________ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tester = 121s do_lock = None 121s 121s def test_export_uses_requirements_txt_format_by_default( 121s tester: CommandTester, do_lock: None 121s ) -> None: 121s tester.execute() 121s expected = f"""\ 121s foo==1.0.0 ; {MARKER_PY} 121s """ 121s > assert tester.io.fetch_output() == expected 121s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 121s E 121s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s 121s tests/command/test_command_export.py:167: AssertionError 121s _ test_export_groups[-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tester = 121s do_lock = None, options = '' 121s expected = 'foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 121s 121s @pytest.mark.parametrize( 121s "options, expected", 121s [ 121s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 121s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 121s ( 121s "--with dev,opt", 121s ( 121s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 121s f" {MARKER_PY}\n" 121s ), 121s ), 121s (f"--without {MAIN_GROUP}", "\n"), 121s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s (f"--without {MAIN_GROUP},dev,opt", "\n"), 121s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 121s ( 121s f"--only {MAIN_GROUP},dev", 121s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 121s ), 121s ], 121s ) 121s def test_export_groups( 121s tester: CommandTester, do_lock: None, options: str, expected: str 121s ) -> None: 121s tester.execute(options) 121s > assert tester.io.fetch_output() == expected 121s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 121s E 121s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s 121s tests/command/test_command_export.py:199: AssertionError 121s _ 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] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tester = 121s do_lock = None, options = '--with dev' 121s 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' 121s 121s @pytest.mark.parametrize( 121s "options, expected", 121s [ 121s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 121s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 121s ( 121s "--with dev,opt", 121s ( 121s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 121s f" {MARKER_PY}\n" 121s ), 121s ), 121s (f"--without {MAIN_GROUP}", "\n"), 121s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s (f"--without {MAIN_GROUP},dev,opt", "\n"), 121s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 121s ( 121s f"--only {MAIN_GROUP},dev", 121s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 121s ), 121s ], 121s ) 121s def test_export_groups( 121s tester: CommandTester, do_lock: None, options: str, expected: str 121s ) -> None: 121s tester.execute(options) 121s > assert tester.io.fetch_output() == expected 121s E assert 'baz==2.0.0 ;...ion < "4.0"\n' == 'baz==2.0.0 ;...on == "2.7"\n' 121s E 121s E - baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + baz==2.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (2 lines hidden), use '-vv' to show 121s 121s tests/command/test_command_export.py:199: AssertionError 121s _ 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] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tester = 121s do_lock = None, options = '--with opt' 121s 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' 121s 121s @pytest.mark.parametrize( 121s "options, expected", 121s [ 121s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 121s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 121s ( 121s "--with dev,opt", 121s ( 121s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 121s f" {MARKER_PY}\n" 121s ), 121s ), 121s (f"--without {MAIN_GROUP}", "\n"), 121s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s (f"--without {MAIN_GROUP},dev,opt", "\n"), 121s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 121s ( 121s f"--only {MAIN_GROUP},dev", 121s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 121s ), 121s ], 121s ) 121s def test_export_groups( 121s tester: CommandTester, do_lock: None, options: str, expected: str 121s ) -> None: 121s tester.execute(options) 121s > assert tester.io.fetch_output() == expected 121s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 121s E 121s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - opt==2.2.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (2 lines hidden), use '-vv' to show 121s 121s tests/command/test_command_export.py:199: AssertionError 121s _ 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] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tester = 121s do_lock = None, options = '--with dev,opt' 121s 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' 121s 121s @pytest.mark.parametrize( 121s "options, expected", 121s [ 121s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 121s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 121s ( 121s "--with dev,opt", 121s ( 121s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 121s f" {MARKER_PY}\n" 121s ), 121s ), 121s (f"--without {MAIN_GROUP}", "\n"), 121s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s (f"--without {MAIN_GROUP},dev,opt", "\n"), 121s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 121s ( 121s f"--only {MAIN_GROUP},dev", 121s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 121s ), 121s ], 121s ) 121s def test_export_groups( 121s tester: CommandTester, do_lock: None, options: str, expected: str 121s ) -> None: 121s tester.execute(options) 121s > assert tester.io.fetch_output() == expected 121s E assert 'baz==2.0.0 ;...ion < "4.0"\n' == 'baz==2.0.0 ;...on == "2.7"\n' 121s E 121s E - baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + baz==2.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (6 lines hidden), use '-vv' to show 121s 121s tests/command/test_command_export.py:199: AssertionError 121s _ test_export_groups[--without dev-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tester = 121s do_lock = None, options = '--without dev' 121s expected = 'foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 121s 121s @pytest.mark.parametrize( 121s "options, expected", 121s [ 121s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 121s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 121s ( 121s "--with dev,opt", 121s ( 121s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 121s f" {MARKER_PY}\n" 121s ), 121s ), 121s (f"--without {MAIN_GROUP}", "\n"), 121s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s (f"--without {MAIN_GROUP},dev,opt", "\n"), 121s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 121s ( 121s f"--only {MAIN_GROUP},dev", 121s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 121s ), 121s ], 121s ) 121s def test_export_groups( 121s tester: CommandTester, do_lock: None, options: str, expected: str 121s ) -> None: 121s tester.execute(options) 121s > assert tester.io.fetch_output() == expected 121s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 121s E 121s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s 121s tests/command/test_command_export.py:199: AssertionError 121s _ test_export_groups[--without opt-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tester = 121s do_lock = None, options = '--without opt' 121s expected = 'foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 121s 121s @pytest.mark.parametrize( 121s "options, expected", 121s [ 121s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 121s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 121s ( 121s "--with dev,opt", 121s ( 121s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 121s f" {MARKER_PY}\n" 121s ), 121s ), 121s (f"--without {MAIN_GROUP}", "\n"), 121s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s (f"--without {MAIN_GROUP},dev,opt", "\n"), 121s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 121s ( 121s f"--only {MAIN_GROUP},dev", 121s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 121s ), 121s ], 121s ) 121s def test_export_groups( 121s tester: CommandTester, do_lock: None, options: str, expected: str 121s ) -> None: 121s tester.execute(options) 121s > assert tester.io.fetch_output() == expected 121s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 121s E 121s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s 121s tests/command/test_command_export.py:199: AssertionError 121s ____ test_exporter_can_export_requirements_txt_with_standard_packages[1.1] _____ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi0') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_standard_packages( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s bar==4.5.6 ; {MARKER_PY} 121s foo==1.2.3 ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (2 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:159: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s ____ test_exporter_can_export_requirements_txt_with_standard_packages[2.1] _____ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi1') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_standard_packages( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s bar==4.5.6 ; {MARKER_PY} 121s foo==1.2.3 ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (2 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:159: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_markers[1.1] _ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi2') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_standard_packages_and_markers( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "baz", 121s "version": "7.8.9", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": [], "baz": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["markers"] = "python_version < '3.7'" 121s lock_data["package"][2]["markers"] = "sys_platform == 'win32'" 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s markers = { 121s "foo": "python_version < '3.7'", 121s "bar": "extra =='foo'", 121s "baz": "sys_platform == 'win32'", 121s } 121s set_package_requires(poetry, markers=markers) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s bar==4.5.6 ; {MARKER_PY} 121s baz==7.8.9 ; {MARKER_PY_WIN32} 121s foo==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_ONLY)} 121s """ 121s 121s > assert content == expected 121s E assert 'bar==4.5.6 ;...on == "3.6"\n' == 'bar==4.5.6 ;...on == "3.6"\n' 121s E 121s E Skipping 57 identical trailing characters in diff, use -v to show 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - baz==7.8.9 ; (python_version >= "3.6" or python_version == "2.7") and sys_platform == "win32" and python_version < "4.0"... 121s E 121s E ...Full output truncated (2 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:218: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_export_groups[--only main-foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tester = 121s do_lock = None, options = '--only main' 121s expected = 'foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 121s 121s @pytest.mark.parametrize( 121s "options, expected", 121s [ 121s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 121s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 121s ( 121s "--with dev,opt", 121s ( 121s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 121s f" {MARKER_PY}\n" 121s ), 121s ), 121s (f"--without {MAIN_GROUP}", "\n"), 121s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s (f"--without {MAIN_GROUP},dev,opt", "\n"), 121s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 121s ( 121s f"--only {MAIN_GROUP},dev", 121s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 121s ), 121s ], 121s ) 121s def test_export_groups( 121s tester: CommandTester, do_lock: None, options: str, expected: str 121s ) -> None: 121s tester.execute(options) 121s > assert tester.io.fetch_output() == expected 121s E assert 'foo==1.0.0 ;...ion < "4.0"\n' == 'foo==1.0.0 ;...on == "2.7"\n' 121s E 121s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + foo==1.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s 121s tests/command/test_command_export.py:199: AssertionError 121s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_markers[2.1] _ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi3') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_standard_packages_and_markers( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "baz", 121s "version": "7.8.9", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": [], "baz": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["markers"] = "python_version < '3.7'" 121s lock_data["package"][2]["markers"] = "sys_platform == 'win32'" 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s markers = { 121s "foo": "python_version < '3.7'", 121s "bar": "extra =='foo'", 121s "baz": "sys_platform == 'win32'", 121s } 121s set_package_requires(poetry, markers=markers) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s bar==4.5.6 ; {MARKER_PY} 121s baz==7.8.9 ; {MARKER_PY_WIN32} 121s foo==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_ONLY)} 121s """ 121s 121s > assert content == expected 121s E assert 'bar==4.5.6 ;...on == "3.6"\n' == 'bar==4.5.6 ;...on == "3.6"\n' 121s E 121s E Skipping 57 identical trailing characters in diff, use -v to show 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - baz==7.8.9 ; (python_version >= "3.6" or python_version == "2.7") and sys_platform == "win32" and python_version < "4.0"... 121s E 121s E ...Full output truncated (2 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:218: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s ____________ test_exporter_can_export_requirements_txt_poetry[1.1] _____________ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi4') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_poetry( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s """Regression test for #3254""" 121s 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "poetry", 121s "version": "1.1.4", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"keyring": "*"}, 121s }, 121s { 121s "name": "junit-xml", 121s "version": "1.9", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"six": "*"}, 121s }, 121s { 121s "name": "keyring", 121s "version": "21.8.0", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": { 121s "SecretStorage": { 121s "version": "*", 121s "markers": "sys_platform == 'linux'", 121s } 121s }, 121s }, 121s { 121s "name": "secretstorage", 121s "version": "3.3.0", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"cryptography": "*"}, 121s }, 121s { 121s "name": "cryptography", 121s "version": "3.2", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"six": "*"}, 121s }, 121s { 121s "name": "six", 121s "version": "1.15.0", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "poetry": [], 121s "keyring": [], 121s "secretstorage": [], 121s "cryptography": [], 121s "six": [], 121s "junit-xml": [], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][3]["markers"] = "sys_platform == 'linux'" 121s lock_data["package"][4]["markers"] = "sys_platform == 'linux'" 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires( 121s poetry, skip={"keyring", "secretstorage", "cryptography", "six"} 121s ) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s # The dependency graph: 121s # junit-xml 1.9 Creates JUnit XML test result documents that can be read by tools 121s # └── six * such as Jenkins 121s # poetry 1.1.4 Python dependency management and packaging made easy. 121s # ├── keyring >=21.2.0,<22.0.0 121s # │ ├── importlib-metadata >=1 121s # │ │ └── zipp >=0.5 121s # │ ├── jeepney >=0.4.2 121s # │ ├── pywin32-ctypes <0.1.0 || >0.1.0,<0.1.1 || >0.1.1 121s # │ └── secretstorage >=3.2 -- On linux only 121s # │ ├── cryptography >=2.0 121s # │ │ └── six >=1.4.1 121s # │ └── jeepney >=0.6 (circular dependency aborted here) 121s expected = { 121s "poetry": Dependency.create_from_pep_508(f"poetry==1.1.4; {MARKER_PY}"), 121s "junit-xml": Dependency.create_from_pep_508(f"junit-xml==1.9 ; {MARKER_PY}"), 121s "keyring": Dependency.create_from_pep_508(f"keyring==21.8.0 ; {MARKER_PY}"), 121s "secretstorage": Dependency.create_from_pep_508( 121s f"secretstorage==3.3.0 ; {MARKER_PY_LINUX}" 121s ), 121s "cryptography": Dependency.create_from_pep_508( 121s f"cryptography==3.2 ; {MARKER_PY_LINUX}" 121s ), 121s "six": Dependency.create_from_pep_508( 121s f"six==1.15.0 ; {MARKER_PY.union(MARKER_PY_LINUX)}" 121s ), 121s } 121s 121s for line in content.strip().split("\n"): 121s dependency = Dependency.create_from_pep_508(line) 121s assert dependency.name in expected 121s expected_dependency = expected.pop(dependency.name) 121s assert dependency == expected_dependency 121s > assert dependency.marker == expected_dependency.marker 121s 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"> 121s E + where = "3.6") and python_version < "4.0" and sys_platform == "linux"> = .marker 121s E + and = "3.6" or python_version == "2.7") and sys_platform == "linux" and python_version < "4.0"> = .marker 121s 121s tests/test_exporter.py:338: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_export_groups[--only dev-baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tester = 121s do_lock = None, options = '--only dev' 121s expected = 'baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"\n' 121s 121s @pytest.mark.parametrize( 121s "options, expected", 121s [ 121s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 121s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 121s ( 121s "--with dev,opt", 121s ( 121s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 121s f" {MARKER_PY}\n" 121s ), 121s ), 121s (f"--without {MAIN_GROUP}", "\n"), 121s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s (f"--without {MAIN_GROUP},dev,opt", "\n"), 121s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 121s ( 121s f"--only {MAIN_GROUP},dev", 121s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 121s ), 121s ], 121s ) 121s def test_export_groups( 121s tester: CommandTester, do_lock: None, options: str, expected: str 121s ) -> None: 121s tester.execute(options) 121s > assert tester.io.fetch_output() == expected 121s E assert 'baz==2.0.0 ;...ion < "4.0"\n' == 'baz==2.0.0 ;...on == "2.7"\n' 121s E 121s E - baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + baz==2.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s 121s tests/command/test_command_export.py:199: AssertionError 121s ____________ test_exporter_can_export_requirements_txt_poetry[2.1] _____________ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi5') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_poetry( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s """Regression test for #3254""" 121s 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "poetry", 121s "version": "1.1.4", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"keyring": "*"}, 121s }, 121s { 121s "name": "junit-xml", 121s "version": "1.9", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"six": "*"}, 121s }, 121s { 121s "name": "keyring", 121s "version": "21.8.0", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": { 121s "SecretStorage": { 121s "version": "*", 121s "markers": "sys_platform == 'linux'", 121s } 121s }, 121s }, 121s { 121s "name": "secretstorage", 121s "version": "3.3.0", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"cryptography": "*"}, 121s }, 121s { 121s "name": "cryptography", 121s "version": "3.2", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"six": "*"}, 121s }, 121s { 121s "name": "six", 121s "version": "1.15.0", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "poetry": [], 121s "keyring": [], 121s "secretstorage": [], 121s "cryptography": [], 121s "six": [], 121s "junit-xml": [], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][3]["markers"] = "sys_platform == 'linux'" 121s lock_data["package"][4]["markers"] = "sys_platform == 'linux'" 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires( 121s poetry, skip={"keyring", "secretstorage", "cryptography", "six"} 121s ) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s # The dependency graph: 121s # junit-xml 1.9 Creates JUnit XML test result documents that can be read by tools 121s # └── six * such as Jenkins 121s # poetry 1.1.4 Python dependency management and packaging made easy. 121s # ├── keyring >=21.2.0,<22.0.0 121s # │ ├── importlib-metadata >=1 121s # │ │ └── zipp >=0.5 121s # │ ├── jeepney >=0.4.2 121s # │ ├── pywin32-ctypes <0.1.0 || >0.1.0,<0.1.1 || >0.1.1 121s # │ └── secretstorage >=3.2 -- On linux only 121s # │ ├── cryptography >=2.0 121s # │ │ └── six >=1.4.1 121s # │ └── jeepney >=0.6 (circular dependency aborted here) 121s expected = { 121s "poetry": Dependency.create_from_pep_508(f"poetry==1.1.4; {MARKER_PY}"), 121s "junit-xml": Dependency.create_from_pep_508(f"junit-xml==1.9 ; {MARKER_PY}"), 121s "keyring": Dependency.create_from_pep_508(f"keyring==21.8.0 ; {MARKER_PY}"), 121s "secretstorage": Dependency.create_from_pep_508( 121s f"secretstorage==3.3.0 ; {MARKER_PY_LINUX}" 121s ), 121s "cryptography": Dependency.create_from_pep_508( 121s f"cryptography==3.2 ; {MARKER_PY_LINUX}" 121s ), 121s "six": Dependency.create_from_pep_508( 121s f"six==1.15.0 ; {MARKER_PY.union(MARKER_PY_LINUX)}" 121s ), 121s } 121s 121s for line in content.strip().split("\n"): 121s dependency = Dependency.create_from_pep_508(line) 121s assert dependency.name in expected 121s expected_dependency = expected.pop(dependency.name) 121s assert dependency == expected_dependency 121s > assert dependency.marker == expected_dependency.marker 121s 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"> 121s E + where = "3.6") and python_version < "4.0" and sys_platform == "linux"> = .marker 121s E + and = "3.6" or python_version == "2.7") and sys_platform == "linux" and python_version < "4.0"> = .marker 121s 121s tests/test_exporter.py:338: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s __________ test_exporter_can_export_requirements_txt_pyinstaller[1.1] __________ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi6') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_pyinstaller( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s """Regression test for #3254""" 121s 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "pyinstaller", 121s "version": "4.0", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": { 121s "altgraph": "*", 121s "macholib": { 121s "version": "*", 121s "markers": "sys_platform == 'darwin'", 121s }, 121s }, 121s }, 121s { 121s "name": "altgraph", 121s "version": "0.17", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "macholib", 121s "version": "1.8", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"altgraph": ">=0.15"}, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"pyinstaller": [], "altgraph": [], "macholib": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][2]["markers"] = "sys_platform == 'darwin'" 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, skip={"altgraph", "macholib"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s # Rationale for the results: 121s # * PyInstaller has an explicit dependency on altgraph, so it must always be 121s # installed. 121s # * PyInstaller requires macholib on Darwin, which in turn requires altgraph. 121s # The dependency graph: 121s # pyinstaller 4.0 PyInstaller bundles a Python application and all its 121s # ├── altgraph * dependencies into a single package. 121s # ├── macholib >=1.8 -- only on Darwin 121s # │ └── altgraph >=0.15 121s expected = { 121s "pyinstaller": Dependency.create_from_pep_508( 121s f"pyinstaller==4.0 ; {MARKER_PY}" 121s ), 121s "altgraph": Dependency.create_from_pep_508( 121s f"altgraph==0.17 ; {MARKER_PY.union(MARKER_PY_DARWIN)}" 121s ), 121s "macholib": Dependency.create_from_pep_508( 121s f"macholib==1.8 ; {MARKER_PY_DARWIN}" 121s ), 121s } 121s 121s for line in content.strip().split("\n"): 121s dependency = Dependency.create_from_pep_508(line) 121s assert dependency.name in expected 121s expected_dependency = expected.pop(dependency.name) 121s assert dependency == expected_dependency 121s > assert dependency.marker == expected_dependency.marker 121s E assert = "3.6" and python_version < "4.0"> == = "3.6" and python_version < "4.0" or python_version == "2.7"> 121s E + where = "3.6" and python_version < "4.0"> = .marker 121s E + and = "3.6" and python_version < "4.0" or python_version == "2.7"> = .marker 121s 121s tests/test_exporter.py:421: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ 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] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tester = 121s do_lock = None, options = '--only main,dev' 121s 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' 121s 121s @pytest.mark.parametrize( 121s "options, expected", 121s [ 121s ("", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--with dev", f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n"), 121s ("--with opt", f"foo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ; {MARKER_PY}\n"), 121s ( 121s "--with dev,opt", 121s ( 121s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\nopt==2.2.0 ;" 121s f" {MARKER_PY}\n" 121s ), 121s ), 121s (f"--without {MAIN_GROUP}", "\n"), 121s ("--without dev", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--without opt", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s (f"--without {MAIN_GROUP},dev,opt", "\n"), 121s (f"--only {MAIN_GROUP}", f"foo==1.0.0 ; {MARKER_PY}\n"), 121s ("--only dev", f"baz==2.0.0 ; {MARKER_PY}\n"), 121s ( 121s f"--only {MAIN_GROUP},dev", 121s f"baz==2.0.0 ; {MARKER_PY}\nfoo==1.0.0 ; {MARKER_PY}\n", 121s ), 121s ], 121s ) 121s def test_export_groups( 121s tester: CommandTester, do_lock: None, options: str, expected: str 121s ) -> None: 121s tester.execute(options) 121s > assert tester.io.fetch_output() == expected 121s E assert 'baz==2.0.0 ;...ion < "4.0"\n' == 'baz==2.0.0 ;...on == "2.7"\n' 121s E 121s E - baz==2.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + baz==2.0.0 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - foo==1.0.0 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (2 lines hidden), use '-vv' to show 121s 121s tests/command/test_command_export.py:199: AssertionError 121s __________ test_exporter_can_export_requirements_txt_pyinstaller[2.1] __________ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi7') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_pyinstaller( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s """Regression test for #3254""" 121s 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "pyinstaller", 121s "version": "4.0", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": { 121s "altgraph": "*", 121s "macholib": { 121s "version": "*", 121s "markers": "sys_platform == 'darwin'", 121s }, 121s }, 121s }, 121s { 121s "name": "altgraph", 121s "version": "0.17", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "macholib", 121s "version": "1.8", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"altgraph": ">=0.15"}, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"pyinstaller": [], "altgraph": [], "macholib": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][2]["markers"] = "sys_platform == 'darwin'" 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, skip={"altgraph", "macholib"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s # Rationale for the results: 121s # * PyInstaller has an explicit dependency on altgraph, so it must always be 121s # installed. 121s # * PyInstaller requires macholib on Darwin, which in turn requires altgraph. 121s # The dependency graph: 121s # pyinstaller 4.0 PyInstaller bundles a Python application and all its 121s # ├── altgraph * dependencies into a single package. 121s # ├── macholib >=1.8 -- only on Darwin 121s # │ └── altgraph >=0.15 121s expected = { 121s "pyinstaller": Dependency.create_from_pep_508( 121s f"pyinstaller==4.0 ; {MARKER_PY}" 121s ), 121s "altgraph": Dependency.create_from_pep_508( 121s f"altgraph==0.17 ; {MARKER_PY.union(MARKER_PY_DARWIN)}" 121s ), 121s "macholib": Dependency.create_from_pep_508( 121s f"macholib==1.8 ; {MARKER_PY_DARWIN}" 121s ), 121s } 121s 121s for line in content.strip().split("\n"): 121s dependency = Dependency.create_from_pep_508(line) 121s assert dependency.name in expected 121s expected_dependency = expected.pop(dependency.name) 121s assert dependency == expected_dependency 121s > assert dependency.marker == expected_dependency.marker 121s E assert = "3.6" and python_version < "4.0"> == = "3.6" and python_version < "4.0" or python_version == "2.7"> 121s E + where = "3.6" and python_version < "4.0"> = .marker 121s E + and = "3.6" and python_version < "4.0" or python_version == "2.7"> = .marker 121s 121s tests/test_exporter.py:421: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s ____ test_exporter_exports_requirements_txt_without_optional_packages[2.1] _____ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem0') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_without_optional_packages( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": True, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][1]["groups"] = ["dev"] 121s lock_data["package"][1]["markers"] = 'extra == "feature-bar"' 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected 121s E assert 'foo==1.2.3 ;...ha256:12345\n' == 'foo==1.2.3 ;...ha256:12345\n' 121s E 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:12345 121s 121s tests/test_exporter.py:943: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_exports_requirements_txt_with_optional_packages[1.1-extras0-lines0] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem1') 121s poetry = 121s extras = ['feature-bar'] 121s 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"'] 121s lock_version = '1.1' 121s 121s @pytest.mark.parametrize( 121s ["extras", "lines"], 121s [ 121s ( 121s ["feature-bar"], 121s [ 121s f"bar==4.5.6 ; {MARKER_PY}", 121s f"foo==1.2.3 ; {MARKER_PY}", 121s f"spam==0.1.0 ; {MARKER_PY}", 121s ], 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_with_optional_packages( 121s tmp_path: Path, 121s poetry: Poetry, 121s extras: Collection[NormalizedName], 121s lines: list[str], 121s lock_version: str, 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": True, 121s "python-versions": "*", 121s "dependencies": {"spam": ">=0.1"}, 121s }, 121s { 121s "name": "spam", 121s "version": "0.1.0", 121s "optional": True, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s "spam": [{"name": "spam.whl", "hash": "abcde"}], 121s }, 121s }, 121s "extras": {"feature_bar": ["bar"]}, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][1]["markers"] = 'extra == "feature-bar"' 121s lock_data["package"][2]["markers"] = 'extra == "feature-bar"' 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.with_hashes(False) 121s exporter.with_extras(extras) 121s exporter.export( 121s "requirements.txt", 121s tmp_path, 121s "requirements.txt", 121s ) 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = "\n".join(lines) 121s 121s > assert content.strip() == expected 121s E assert 'bar==4.5.6 ;...rsion < "4.0"' == 'bar==4.5.6 ;...sion == "2.7"' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (6 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:1023: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[1.1-False-lines0] _ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi10') 121s poetry = , dev = False 121s lines = ['a==1.2.3 ; python_version >= "3.6" and python_version < "3.8" or python_version == "2.7"'] 121s lock_version = '1.1' 121s 121s @pytest.mark.parametrize( 121s ["dev", "lines"], 121s [ 121s ( 121s False, 121s [f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38)}"], 121s ), 121s ( 121s True, 121s [ 121s f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38).union(MARKER_PY36)}", 121s f"b==4.5.6 ; {MARKER_PY}", 121s ], 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any( 121s tmp_path: Path, poetry: Poetry, dev: bool, lines: list[str], lock_version: str 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "a", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "b", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"a": ">=1.2.3"}, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"a": [], "b": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["groups"] = ["main", "dev"] 121s lock_data["package"][0]["markers"] = {"main": "python_version < '3.8'"} 121s lock_data["package"][1]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s 121s root = poetry.package.with_dependency_groups([], only=True) 121s root.add_dependency( 121s Factory.create_dependency( 121s name="a", constraint={"version": "^1.2.3", "python": "<3.8"} 121s ) 121s ) 121s root.add_dependency( 121s Factory.create_dependency( 121s name="b", constraint={"version": "^4.5.6"}, groups=["dev"] 121s ) 121s ) 121s poetry._package = root 121s 121s exporter = Exporter(poetry, NullIO()) 121s if dev: 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s > assert content.strip() == "\n".join(lines) 121s E assert 'a==1.2.3 ; p...rsion < "3.8"' == 'a==1.2.3 ; p...sion == "2.7"' 121s E 121s E - a==1.2.3 ; python_version >= "3.6" and python_version < "3.8" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^^ ^^ ^ ^ 121s E + a==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "3.8" 121s E ? + ^ ^ ^^ ^^ ^ ^^^ ^ ^ ^ 121s 121s tests/test_exporter.py:592: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_exports_requirements_txt_with_optional_packages[2.1-extras0-lines0] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem2') 121s poetry = 121s extras = ['feature-bar'] 121s 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"'] 121s lock_version = '2.1' 121s 121s @pytest.mark.parametrize( 121s ["extras", "lines"], 121s [ 121s ( 121s ["feature-bar"], 121s [ 121s f"bar==4.5.6 ; {MARKER_PY}", 121s f"foo==1.2.3 ; {MARKER_PY}", 121s f"spam==0.1.0 ; {MARKER_PY}", 121s ], 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_with_optional_packages( 121s tmp_path: Path, 121s poetry: Poetry, 121s extras: Collection[NormalizedName], 121s lines: list[str], 121s lock_version: str, 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": True, 121s "python-versions": "*", 121s "dependencies": {"spam": ">=0.1"}, 121s }, 121s { 121s "name": "spam", 121s "version": "0.1.0", 121s "optional": True, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s "spam": [{"name": "spam.whl", "hash": "abcde"}], 121s }, 121s }, 121s "extras": {"feature_bar": ["bar"]}, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][1]["markers"] = 'extra == "feature-bar"' 121s lock_data["package"][2]["markers"] = 'extra == "feature-bar"' 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.with_hashes(False) 121s exporter.with_extras(extras) 121s exporter.export( 121s "requirements.txt", 121s tmp_path, 121s "requirements.txt", 121s ) 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = "\n".join(lines) 121s 121s > assert content.strip() == expected 121s E assert 'bar==4.5.6 ;...rsion < "4.0"' == 'bar==4.5.6 ;...sion == "2.7"' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (6 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:1023: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[1.1-True-lines1] _ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi11') 121s poetry = , dev = True 121s 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"'] 121s lock_version = '1.1' 121s 121s @pytest.mark.parametrize( 121s ["dev", "lines"], 121s [ 121s ( 121s False, 121s [f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38)}"], 121s ), 121s ( 121s True, 121s [ 121s f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38).union(MARKER_PY36)}", 121s f"b==4.5.6 ; {MARKER_PY}", 121s ], 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any( 121s tmp_path: Path, poetry: Poetry, dev: bool, lines: list[str], lock_version: str 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "a", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "b", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"a": ">=1.2.3"}, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"a": [], "b": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["groups"] = ["main", "dev"] 121s lock_data["package"][0]["markers"] = {"main": "python_version < '3.8'"} 121s lock_data["package"][1]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s 121s root = poetry.package.with_dependency_groups([], only=True) 121s root.add_dependency( 121s Factory.create_dependency( 121s name="a", constraint={"version": "^1.2.3", "python": "<3.8"} 121s ) 121s ) 121s root.add_dependency( 121s Factory.create_dependency( 121s name="b", constraint={"version": "^4.5.6"}, groups=["dev"] 121s ) 121s ) 121s poetry._package = root 121s 121s exporter = Exporter(poetry, NullIO()) 121s if dev: 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s > assert content.strip() == "\n".join(lines) 121s E assert 'a==1.2.3 ; p...rsion < "4.0"' == 'a==1.2.3 ; p...sion == "2.7"' 121s E 121s E - a==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + a==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - b==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (2 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:592: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _______ test_exporter_can_export_requirements_txt_with_git_packages[1.1] _______ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi0') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_git_packages( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "git", 121s "url": "https://github.com/foo/foo.git", 121s "reference": "123456", 121s "resolved_reference": "abcdef", 121s }, 121s } 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s foo @ git+https://github.com/foo/foo.git@abcdef ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'foo @ git+ht...ion < "4.0"\n' == 'foo @ git+ht...on == "2.7"\n' 121s E 121s E Skipping 55 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s 121s tests/test_exporter.py:1066: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[2.1-False-lines0] _ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi12') 121s poetry = , dev = False 121s lines = ['a==1.2.3 ; python_version >= "3.6" and python_version < "3.8" or python_version == "2.7"'] 121s lock_version = '2.1' 121s 121s @pytest.mark.parametrize( 121s ["dev", "lines"], 121s [ 121s ( 121s False, 121s [f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38)}"], 121s ), 121s ( 121s True, 121s [ 121s f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38).union(MARKER_PY36)}", 121s f"b==4.5.6 ; {MARKER_PY}", 121s ], 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any( 121s tmp_path: Path, poetry: Poetry, dev: bool, lines: list[str], lock_version: str 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "a", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "b", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"a": ">=1.2.3"}, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"a": [], "b": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["groups"] = ["main", "dev"] 121s lock_data["package"][0]["markers"] = {"main": "python_version < '3.8'"} 121s lock_data["package"][1]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s 121s root = poetry.package.with_dependency_groups([], only=True) 121s root.add_dependency( 121s Factory.create_dependency( 121s name="a", constraint={"version": "^1.2.3", "python": "<3.8"} 121s ) 121s ) 121s root.add_dependency( 121s Factory.create_dependency( 121s name="b", constraint={"version": "^4.5.6"}, groups=["dev"] 121s ) 121s ) 121s poetry._package = root 121s 121s exporter = Exporter(poetry, NullIO()) 121s if dev: 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s > assert content.strip() == "\n".join(lines) 121s E assert 'a==1.2.3 ; p...rsion < "3.8"' == 'a==1.2.3 ; p...sion == "2.7"' 121s E 121s E - a==1.2.3 ; python_version >= "3.6" and python_version < "3.8" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^^ ^^ ^ ^ 121s E + a==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "3.8" 121s E ? + ^ ^ ^^ ^^ ^ ^^^ ^ ^ ^ 121s 121s tests/test_exporter.py:592: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _______ test_exporter_can_export_requirements_txt_with_git_packages[2.1] _______ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi1') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_git_packages( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "git", 121s "url": "https://github.com/foo/foo.git", 121s "reference": "123456", 121s "resolved_reference": "abcdef", 121s }, 121s } 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s foo @ git+https://github.com/foo/foo.git@abcdef ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'foo @ git+ht...ion < "4.0"\n' == 'foo @ git+ht...on == "2.7"\n' 121s E 121s E Skipping 55 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s 121s tests/test_exporter.py:1066: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[2.1-True-lines1] _ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi13') 121s poetry = , dev = True 121s 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"'] 121s lock_version = '2.1' 121s 121s @pytest.mark.parametrize( 121s ["dev", "lines"], 121s [ 121s ( 121s False, 121s [f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38)}"], 121s ), 121s ( 121s True, 121s [ 121s f"a==1.2.3 ; {MARKER_PY27.union(MARKER_PY36_38).union(MARKER_PY36)}", 121s f"b==4.5.6 ; {MARKER_PY}", 121s ], 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any( 121s tmp_path: Path, poetry: Poetry, dev: bool, lines: list[str], lock_version: str 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "a", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "b", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"a": ">=1.2.3"}, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"a": [], "b": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["groups"] = ["main", "dev"] 121s lock_data["package"][0]["markers"] = {"main": "python_version < '3.8'"} 121s lock_data["package"][1]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s 121s root = poetry.package.with_dependency_groups([], only=True) 121s root.add_dependency( 121s Factory.create_dependency( 121s name="a", constraint={"version": "^1.2.3", "python": "<3.8"} 121s ) 121s ) 121s root.add_dependency( 121s Factory.create_dependency( 121s name="b", constraint={"version": "^4.5.6"}, groups=["dev"] 121s ) 121s ) 121s poetry._package = root 121s 121s exporter = Exporter(poetry, NullIO()) 121s if dev: 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s > assert content.strip() == "\n".join(lines) 121s E assert 'a==1.2.3 ; p...rsion < "4.0"' == 'a==1.2.3 ; p...sion == "2.7"' 121s E 121s E - a==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + a==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - b==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (2 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:592: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _____ test_exporter_can_export_requirements_txt_with_nested_packages[1.1] ______ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi2') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_nested_packages( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "git", 121s "url": "https://github.com/foo/foo.git", 121s "reference": "123456", 121s "resolved_reference": "abcdef", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": { 121s "foo": { 121s "git": "https://github.com/foo/foo.git", 121s "rev": "123456", 121s } 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, skip={"foo"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s bar==4.5.6 ; {MARKER_PY} 121s foo @ git+https://github.com/foo/foo.git@abcdef ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - foo @ git+https://github.com/foo/foo.git@abcdef ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (2 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:1122: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes[1.1] _ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi14') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected 121s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 121s E 121s E ...Full output truncated (4 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:641: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _____ test_exporter_can_export_requirements_txt_with_nested_packages[2.1] ______ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi3') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_nested_packages( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "git", 121s "url": "https://github.com/foo/foo.git", 121s "reference": "123456", 121s "resolved_reference": "abcdef", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": { 121s "foo": { 121s "git": "https://github.com/foo/foo.git", 121s "rev": "123456", 121s } 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, skip={"foo"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s bar==4.5.6 ; {MARKER_PY} 121s foo @ git+https://github.com/foo/foo.git@abcdef ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - foo @ git+https://github.com/foo/foo.git@abcdef ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (2 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:1122: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes[2.1] _ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi15') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected 121s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 121s E 121s E ...Full output truncated (4 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:641: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s __ test_exporter_can_export_requirements_txt_with_nested_packages_cyclic[1.1] __ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi4') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_nested_packages_cyclic( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"bar": {"version": "4.5.6"}}, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"baz": {"version": "7.8.9"}}, 121s }, 121s { 121s "name": "baz", 121s "version": "7.8.9", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"foo": {"version": "1.2.3"}}, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": [], "baz": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, skip={"bar", "baz"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s bar==4.5.6 ; {MARKER_PY} 121s baz==7.8.9 ; {MARKER_PY} 121s foo==1.2.3 ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - baz==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (6 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:1176: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes[1.1] _ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi16') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [ 121s {"name": "foo1.whl", "hash": "67890"}, 121s {"name": "foo2.whl", "hash": "12345"}, 121s ], 121s "bar": [ 121s {"name": "bar1.whl", "hash": "67890"}, 121s {"name": "bar2.whl", "hash": "12345"}, 121s ], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:12345 \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 \\ 121s --hash=sha256:67890 121s """ 121s 121s > assert content == expected 121s E assert 'bar==4.5.6 ;...ha256:67890\n' == 'bar==4.5.6 ;...ha256:67890\n' 121s E 121s E Skipping 45 identical trailing characters in diff, use -v to show 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:12345 \... 121s E 121s E ...Full output truncated (6 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:698: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s __ test_exporter_can_export_requirements_txt_with_nested_packages_cyclic[2.1] __ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi5') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_nested_packages_cyclic( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"bar": {"version": "4.5.6"}}, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"baz": {"version": "7.8.9"}}, 121s }, 121s { 121s "name": "baz", 121s "version": "7.8.9", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"foo": {"version": "1.2.3"}}, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": [], "baz": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, skip={"bar", "baz"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s bar==4.5.6 ; {MARKER_PY} 121s baz==7.8.9 ; {MARKER_PY} 121s foo==1.2.3 ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - baz==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (6 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:1176: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes[2.1] _ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi17') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [ 121s {"name": "foo1.whl", "hash": "67890"}, 121s {"name": "foo2.whl", "hash": "12345"}, 121s ], 121s "bar": [ 121s {"name": "bar1.whl", "hash": "67890"}, 121s {"name": "bar2.whl", "hash": "12345"}, 121s ], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:12345 \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 \\ 121s --hash=sha256:67890 121s """ 121s 121s > assert content == expected 121s E assert 'bar==4.5.6 ;...ha256:67890\n' == 'bar==4.5.6 ;...ha256:67890\n' 121s E 121s E Skipping 45 identical trailing characters in diff, use -v to show 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:12345 \... 121s E 121s E ...Full output truncated (6 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:698: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_can_export_requirements_txt_with_circular_root_dependency[1.1] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi6') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_circular_root_dependency( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {poetry.package.pretty_name: {"version": "1.2.3"}}, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s foo==1.2.3 ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'foo==1.2.3 ;...ion < "4.0"\n' == 'foo==1.2.3 ;...on == "2.7"\n' 121s E 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s 121s tests/test_exporter.py:1214: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled[1.1] _ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi18') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.with_hashes(False) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s bar==4.5.6 ; {MARKER_PY} 121s foo==1.2.3 ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (2 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:746: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_can_export_requirements_txt_with_circular_root_dependency[2.1] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi7') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_circular_root_dependency( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {poetry.package.pretty_name: {"version": "1.2.3"}}, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s foo==1.2.3 ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'foo==1.2.3 ;...ion < "4.0"\n' == 'foo==1.2.3 ;...on == "2.7"\n' 121s E 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s 121s tests/test_exporter.py:1214: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled[2.1] _ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi19') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.with_hashes(False) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s bar==4.5.6 ; {MARKER_PY} 121s foo==1.2.3 ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (2 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:746: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers[1.1] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi8') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": { 121s "bar": [ 121s { 121s "version": ">=1.2.3,<7.8.10", 121s "markers": 'platform_system != "Windows"', 121s }, 121s { 121s "version": ">=4.5.6,<7.8.10", 121s "markers": 'platform_system == "Windows"', 121s }, 121s ] 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "7.8.9", 121s "optional": True, 121s "python-versions": "*", 121s "dependencies": { 121s "baz": { 121s "version": "!=10.11.12", 121s "markers": 'platform_system == "Windows"', 121s } 121s }, 121s }, 121s { 121s "name": "baz", 121s "version": "10.11.13", 121s "optional": True, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": [], "baz": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][2]["markers"] = 'platform_system == "Windows"' 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.with_hashes(False) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s marker_py_not_windows = MARKER_PY.intersect( 121s parse_marker('platform_system != "Windows"') 121s ) 121s expected = f"""\ 121s bar==7.8.9 ; {marker_py_not_windows.union(MARKER_PY_WINDOWS)} 121s baz==10.11.13 ; {MARKER_PY_WINDOWS} 121s foo==1.2.3 ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'bar==7.8.9 ;...ion < "4.0"\n' == 'bar==7.8.9 ;...on == "2.7"\n' 121s E 121s E - bar==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==7.8.9 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - baz==10.11.13 ; (python_version >= "3.6" or python_version == "2.7") and platform_system == "Windows" and python_version < "4.0" 121s E + baz==10.11.13 ; (python_version == "2.7" or python_version >= "3.6") and python_version < "4.0" and platform_system == "Windows"... 121s E 121s E ...Full output truncated (4 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:1289: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_exports_requirements_txt_without_dev_packages_by_default[1.1] __ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem0') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_without_dev_packages_by_default( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][1]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected 121s E assert 'foo==1.2.3 ;...ha256:12345\n' == 'foo==1.2.3 ;...ha256:12345\n' 121s E 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:12345 121s 121s tests/test_exporter.py:795: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers[2.1] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi9') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": { 121s "bar": [ 121s { 121s "version": ">=1.2.3,<7.8.10", 121s "markers": 'platform_system != "Windows"', 121s }, 121s { 121s "version": ">=4.5.6,<7.8.10", 121s "markers": 'platform_system == "Windows"', 121s }, 121s ] 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "7.8.9", 121s "optional": True, 121s "python-versions": "*", 121s "dependencies": { 121s "baz": { 121s "version": "!=10.11.12", 121s "markers": 'platform_system == "Windows"', 121s } 121s }, 121s }, 121s { 121s "name": "baz", 121s "version": "10.11.13", 121s "optional": True, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": [], "baz": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][2]["markers"] = 'platform_system == "Windows"' 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.with_hashes(False) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s marker_py_not_windows = MARKER_PY.intersect( 121s parse_marker('platform_system != "Windows"') 121s ) 121s expected = f"""\ 121s bar==7.8.9 ; {marker_py_not_windows.union(MARKER_PY_WINDOWS)} 121s baz==10.11.13 ; {MARKER_PY_WINDOWS} 121s foo==1.2.3 ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'bar==7.8.9 ;...ion < "4.0"\n' == 'bar==7.8.9 ;...on == "2.7"\n' 121s E 121s E - bar==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==7.8.9 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - baz==10.11.13 ; (python_version >= "3.6" or python_version == "2.7") and platform_system == "Windows" and python_version < "4.0" 121s E + baz==10.11.13 ; (python_version == "2.7" or python_version >= "3.6") and python_version < "4.0" and platform_system == "Windows"... 121s E 121s E ...Full output truncated (4 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:1289: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_exports_requirements_txt_without_dev_packages_by_default[2.1] __ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem1') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_without_dev_packages_by_default( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][1]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected 121s E assert 'foo==1.2.3 ;...ha256:12345\n' == 'foo==1.2.3 ;...ha256:12345\n' 121s E 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:12345 121s 121s tests/test_exporter.py:795: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s __ test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in[1.1] ___ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem2') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][1]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected 121s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 121s E 121s E ...Full output truncated (4 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:847: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s ____ test_exporter_can_export_requirements_txt_with_directory_packages[1.1] ____ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi12') 121s poetry = 121s fixture_root_uri = 'file:///tmp/autopkgtest.qECAE7/autopkgtest_tmp/build/tests/fixtures' 121s lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_directory_packages( 121s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "directory", 121s "url": "sample_project", 121s "reference": "", 121s }, 121s } 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s foo @ {fixture_root_uri}/sample_project ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'foo @ file:/...ion < "4.0"\n' == 'foo @ file:/...on == "2.7"\n' 121s E 121s E Skipping 96 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s 121s tests/test_exporter.py:1376: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s __ test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in[2.1] ___ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem3') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][1]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected 121s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 121s E 121s E ...Full output truncated (4 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:847: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s ____ test_exporter_can_export_requirements_txt_with_directory_packages[2.1] ____ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi13') 121s poetry = 121s fixture_root_uri = 'file:///tmp/autopkgtest.qECAE7/autopkgtest_tmp/build/tests/fixtures' 121s lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_directory_packages( 121s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "directory", 121s "url": "sample_project", 121s "reference": "", 121s }, 121s } 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s foo @ {fixture_root_uri}/sample_project ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'foo @ file:/...ion < "4.0"\n' == 'foo @ file:/...on == "2.7"\n' 121s E 121s E Skipping 96 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s 121s tests/test_exporter.py:1376: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_can_export_requirements_txt_with_directory_packages_editable[1.1] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi14') 121s poetry = 121s fixture_root_uri = 'file:///tmp/autopkgtest.qECAE7/autopkgtest_tmp/build/tests/fixtures' 121s lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_directory_packages_editable( 121s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "develop": True, 121s "source": { 121s "type": "directory", 121s "url": "sample_project", 121s "reference": "", 121s }, 121s } 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s -e {fixture_root_uri}/sample_project ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert '-e file:///t...ion < "4.0"\n' == '-e file:///t...on == "2.7"\n' 121s E 121s E Skipping 93 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s 121s tests/test_exporter.py:1419: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s ____ test_exporter_exports_requirements_txt_without_optional_packages[1.1] _____ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem6') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_without_optional_packages( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": True, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][1]["groups"] = ["dev"] 121s lock_data["package"][1]["markers"] = 'extra == "feature-bar"' 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected 121s E assert 'foo==1.2.3 ;...ha256:12345\n' == 'foo==1.2.3 ;...ha256:12345\n' 121s E 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + foo==1.2.3 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:12345 121s 121s tests/test_exporter.py:943: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_can_export_requirements_txt_with_directory_packages_editable[2.1] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi15') 121s poetry = 121s fixture_root_uri = 'file:///tmp/autopkgtest.qECAE7/autopkgtest_tmp/build/tests/fixtures' 121s lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_directory_packages_editable( 121s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "develop": True, 121s "source": { 121s "type": "directory", 121s "url": "sample_project", 121s "reference": "", 121s }, 121s } 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s -e {fixture_root_uri}/sample_project ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert '-e file:///t...ion < "4.0"\n' == '-e file:///t...on == "2.7"\n' 121s E 121s E Skipping 93 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s 121s tests/test_exporter.py:1419: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_can_export_requirements_txt_with_nested_directory_packages[2.1] _ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi20') 121s poetry = 121s fixture_root_uri = 'file:///tmp/autopkgtest.qECAE7/autopkgtest_tmp/build/tests/fixtures' 121s lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_nested_directory_packages( 121s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "directory", 121s "url": "sample_project", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "directory", 121s "url": "sample_project/../project_with_nested_local/bar", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "baz", 121s "version": "7.8.9", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "directory", 121s "url": "sample_project/../project_with_nested_local/bar/..", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": [], "baz": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s bar @ {fixture_root_uri}/project_with_nested_local/bar ; {MARKER_PY} 121s baz @ {fixture_root_uri}/project_with_nested_local ; {MARKER_PY} 121s foo @ {fixture_root_uri}/sample_project ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'bar @ file:/...ion < "4.0"\n' == 'bar @ file:/...on == "2.7"\n' 121s E 121s E Skipping 111 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - baz @ file:///tmp/autopkgtest.qECAE7/autopkgtest_tmp/build/tests/fixtures/project_with_nested_local ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"... 121s E 121s E ...Full output truncated (7 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:1485: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_can_export_requirements_txt_with_nested_directory_packages[1.1] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_can_export_requi16') 121s poetry = 121s fixture_root_uri = 'file:///tmp/autopkgtest.qECAE7/autopkgtest_tmp/build/tests/fixtures' 121s lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_nested_directory_packages( 121s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "directory", 121s "url": "sample_project", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "directory", 121s "url": "sample_project/../project_with_nested_local/bar", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "baz", 121s "version": "7.8.9", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "directory", 121s "url": "sample_project/../project_with_nested_local/bar/..", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": [], "baz": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s bar @ {fixture_root_uri}/project_with_nested_local/bar ; {MARKER_PY} 121s baz @ {fixture_root_uri}/project_with_nested_local ; {MARKER_PY} 121s foo @ {fixture_root_uri}/sample_project ; {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'bar @ file:/...ion < "4.0"\n' == 'bar @ file:/...on == "2.7"\n' 121s E 121s E Skipping 111 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - baz @ file:///tmp/autopkgtest.qECAE7/autopkgtest_tmp/build/tests/fixtures/project_with_nested_local ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"... 121s E 121s E ...Full output truncated (7 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:1485: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s __________ test_exporter_exports_requirements_txt_with_url_false[1.1] __________ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem3') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_with_url_false( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s poetry.pool.add_repository( 121s LegacyRepository( 121s "custom", 121s "https://example.com/simple", 121s ) 121s ) 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][1]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.with_urls(False) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected 121s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 121s E 121s E ...Full output truncated (4 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:1747: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s __________ test_exporter_exports_requirements_txt_with_url_false[2.1] __________ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem4') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_with_url_false( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s poetry.pool.add_repository( 121s LegacyRepository( 121s "custom", 121s "https://example.com/simple", 121s ) 121s ) 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][1]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.with_urls(False) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected 121s E assert 'bar==4.5.6 ;...ha256:12345\n' == 'bar==4.5.6 ;...ha256:12345\n' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \... 121s E 121s E ...Full output truncated (4 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:1747: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s ______ test_exporter_can_export_requirements_txt_with_file_packages[1.1] _______ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi23') 121s poetry = 121s fixture_root_uri = 'file:///tmp/autopkgtest.qECAE7/autopkgtest_tmp/build/tests/fixtures' 121s lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_file_packages( 121s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "file", 121s "url": "distributions/demo-0.1.0.tar.gz", 121s "reference": "", 121s }, 121s } 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s foo @ {fixture_root_uri}/distributions/demo-0.1.0.tar.gz ;\ 121s {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'foo @ file:/...ion < "4.0"\n' == 'foo @ file:/...on == "2.7"\n' 121s E 121s E Skipping 113 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s 121s tests/test_exporter.py:1573: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host[1.1] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem5') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s poetry.pool.add_repository( 121s LegacyRepository( 121s "custom", 121s "http://example.com/simple", 121s ) 121s ) 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "http://example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s --trusted-host example.com 121s --extra-index-url http://example.com/simple 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s """ 121s 121s > assert content == expected 121s E assert '--trusted-ho...ha256:67890\n' == '--trusted-ho...ha256:67890\n' 121s E 121s E Skipping 90 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890 121s 121s tests/test_exporter.py:1803: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s ______ test_exporter_can_export_requirements_txt_with_file_packages[2.1] _______ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_can_export_requi24') 121s poetry = 121s fixture_root_uri = 'file:///tmp/autopkgtest.qECAE7/autopkgtest_tmp/build/tests/fixtures' 121s lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_can_export_requirements_txt_with_file_packages( 121s tmp_path: Path, poetry: Poetry, fixture_root_uri: str, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "file", 121s "url": "distributions/demo-0.1.0.tar.gz", 121s "reference": "", 121s }, 121s } 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s foo @ {fixture_root_uri}/distributions/demo-0.1.0.tar.gz ;\ 121s {MARKER_PY} 121s """ 121s 121s > assert content == expected 121s E assert 'foo @ file:/...ion < "4.0"\n' == 'foo @ file:/...on == "2.7"\n' 121s E 121s E Skipping 113 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s 121s tests/test_exporter.py:1573: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host[2.1] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem6') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s poetry.pool.add_repository( 121s LegacyRepository( 121s "custom", 121s "http://example.com/simple", 121s ) 121s ) 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "http://example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s --trusted-host example.com 121s --extra-index-url http://example.com/simple 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s """ 121s 121s > assert content == expected 121s E assert '--trusted-ho...ha256:67890\n' == '--trusted-ho...ha256:67890\n' 121s E 121s E Skipping 90 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890 121s 121s tests/test_exporter.py:1803: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s __ test_exporter_exports_requirements_txt_with_dev_extras[1.1-True-expected0] __ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem7') 121s poetry = , dev = True 121s 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"'] 121s lock_version = '1.1' 121s 121s @pytest.mark.parametrize( 121s ["dev", "expected"], 121s [ 121s ( 121s True, 121s [ 121s f"bar==1.2.2 ; {MARKER_PY}", 121s f"baz==1.2.3 ; {MARKER_PY}", 121s f"foo==1.2.1 ; {MARKER_PY}", 121s ], 121s ), 121s ( 121s False, 121s [ 121s f"bar==1.2.2 ; {MARKER_PY}", 121s f"foo==1.2.1 ; {MARKER_PY}", 121s ], 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_with_dev_extras( 121s tmp_path: Path, poetry: Poetry, dev: bool, expected: list[str], lock_version: str 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.1", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "1.2.2", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": { 121s "baz": { 121s "version": ">=0.1.0", 121s "optional": True, 121s "markers": "extra == 'baz'", 121s } 121s }, 121s "extras": {"baz": ["baz (>=0.1.0)"]}, 121s }, 121s { 121s "name": "baz", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": [], "baz": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][2]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"baz"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s if dev: 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s > assert content == "\n".join(expected) + "\n" 121s E assert 'bar==1.2.2 ;...ion < "4.0"\n' == 'bar==1.2.2 ;...on == "2.7"\n' 121s E 121s E - bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==1.2.2 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - baz==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (6 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:1880: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _______ test_exporter_exports_requirements_txt_with_legacy_packages[1.1] _______ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem7') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_with_legacy_packages( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s poetry.pool.add_repository( 121s LegacyRepository( 121s "custom", 121s "https://example.com/simple", 121s ) 121s ) 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][1]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s --extra-index-url https://example.com/simple 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected 121s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 121s E 121s E Skipping 64 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (5 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:1683: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_exports_requirements_txt_with_dev_extras[1.1-False-expected1] __ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem8') 121s poetry = , dev = False 121s 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"'] 121s lock_version = '1.1' 121s 121s @pytest.mark.parametrize( 121s ["dev", "expected"], 121s [ 121s ( 121s True, 121s [ 121s f"bar==1.2.2 ; {MARKER_PY}", 121s f"baz==1.2.3 ; {MARKER_PY}", 121s f"foo==1.2.1 ; {MARKER_PY}", 121s ], 121s ), 121s ( 121s False, 121s [ 121s f"bar==1.2.2 ; {MARKER_PY}", 121s f"foo==1.2.1 ; {MARKER_PY}", 121s ], 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_with_dev_extras( 121s tmp_path: Path, poetry: Poetry, dev: bool, expected: list[str], lock_version: str 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.1", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "1.2.2", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": { 121s "baz": { 121s "version": ">=0.1.0", 121s "optional": True, 121s "markers": "extra == 'baz'", 121s } 121s }, 121s "extras": {"baz": ["baz (>=0.1.0)"]}, 121s }, 121s { 121s "name": "baz", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": [], "baz": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][2]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"baz"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s if dev: 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s > assert content == "\n".join(expected) + "\n" 121s E assert 'bar==1.2.2 ;...ion < "4.0"\n' == 'bar==1.2.2 ;...on == "2.7"\n' 121s E 121s E - bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==1.2.2 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - foo==1.2.1 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (2 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:1880: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _______ test_exporter_exports_requirements_txt_with_legacy_packages[2.1] _______ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem8') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_with_legacy_packages( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s poetry.pool.add_repository( 121s LegacyRepository( 121s "custom", 121s "https://example.com/simple", 121s ) 121s ) 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][1]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s --extra-index-url https://example.com/simple 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected 121s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 121s E 121s E Skipping 64 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (5 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:1683: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s __ test_exporter_exports_requirements_txt_with_dev_extras[2.1-True-expected0] __ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem9') 121s poetry = , dev = True 121s 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"'] 121s lock_version = '2.1' 121s 121s @pytest.mark.parametrize( 121s ["dev", "expected"], 121s [ 121s ( 121s True, 121s [ 121s f"bar==1.2.2 ; {MARKER_PY}", 121s f"baz==1.2.3 ; {MARKER_PY}", 121s f"foo==1.2.1 ; {MARKER_PY}", 121s ], 121s ), 121s ( 121s False, 121s [ 121s f"bar==1.2.2 ; {MARKER_PY}", 121s f"foo==1.2.1 ; {MARKER_PY}", 121s ], 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_with_dev_extras( 121s tmp_path: Path, poetry: Poetry, dev: bool, expected: list[str], lock_version: str 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.1", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "1.2.2", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": { 121s "baz": { 121s "version": ">=0.1.0", 121s "optional": True, 121s "markers": "extra == 'baz'", 121s } 121s }, 121s "extras": {"baz": ["baz (>=0.1.0)"]}, 121s }, 121s { 121s "name": "baz", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": [], "baz": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][2]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"baz"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s if dev: 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s > assert content == "\n".join(expected) + "\n" 121s E assert 'bar==1.2.2 ;...ion < "4.0"\n' == 'bar==1.2.2 ;...on == "2.7"\n' 121s E 121s E - bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==1.2.2 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - baz==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (6 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:1880: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources[1.1] _ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem9') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s poetry.pool.add_repository( 121s LegacyRepository( 121s "custom-example", 121s "https://example.com/simple", 121s ) 121s ) 121s poetry.pool.add_repository( 121s LegacyRepository( 121s "custom-foobaz", 121s "https://foobaz.com/simple", 121s ) 121s ) 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "baz", 121s "version": "7.8.9", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://foobaz.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s "baz": [{"name": "baz.whl", "hash": "24680"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][1]["groups"] = ["dev"] 121s lock_data["package"][2]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar", "baz"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s --extra-index-url https://example.com/simple 121s --extra-index-url https://foobaz.com/simple 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s baz==7.8.9 ; {MARKER_PY} \\ 121s --hash=sha256:24680 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected 121s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 121s E 121s E Skipping 108 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (10 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:1972: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_exports_requirements_txt_with_dev_extras[2.1-False-expected1] __ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem10') 121s poetry = , dev = False 121s 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"'] 121s lock_version = '2.1' 121s 121s @pytest.mark.parametrize( 121s ["dev", "expected"], 121s [ 121s ( 121s True, 121s [ 121s f"bar==1.2.2 ; {MARKER_PY}", 121s f"baz==1.2.3 ; {MARKER_PY}", 121s f"foo==1.2.1 ; {MARKER_PY}", 121s ], 121s ), 121s ( 121s False, 121s [ 121s f"bar==1.2.2 ; {MARKER_PY}", 121s f"foo==1.2.1 ; {MARKER_PY}", 121s ], 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_with_dev_extras( 121s tmp_path: Path, poetry: Poetry, dev: bool, expected: list[str], lock_version: str 121s ) -> None: 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.1", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "1.2.2", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": { 121s "baz": { 121s "version": ">=0.1.0", 121s "optional": True, 121s "markers": "extra == 'baz'", 121s } 121s }, 121s "extras": {"baz": ["baz (>=0.1.0)"]}, 121s }, 121s { 121s "name": "baz", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": [], "baz": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][2]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"baz"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s if dev: 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s > assert content == "\n".join(expected) + "\n" 121s E assert 'bar==1.2.2 ;...ion < "4.0"\n' == 'bar==1.2.2 ;...on == "2.7"\n' 121s E 121s E - bar==1.2.2 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==1.2.2 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - foo==1.2.1 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (2 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:1880: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources[2.1] _ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem10') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s poetry.pool.add_repository( 121s LegacyRepository( 121s "custom-example", 121s "https://example.com/simple", 121s ) 121s ) 121s poetry.pool.add_repository( 121s LegacyRepository( 121s "custom-foobaz", 121s "https://foobaz.com/simple", 121s ) 121s ) 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "baz", 121s "version": "7.8.9", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://foobaz.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s "baz": [{"name": "baz.whl", "hash": "24680"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][1]["groups"] = ["dev"] 121s lock_data["package"][2]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar", "baz"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s --extra-index-url https://example.com/simple 121s --extra-index-url https://foobaz.com/simple 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s baz==7.8.9 ; {MARKER_PY} \\ 121s --hash=sha256:24680 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected 121s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 121s E 121s E Skipping 108 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (10 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:1972: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s ________ test_exporter_exports_requirements_txt_to_standard_output[2.1] ________ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_exports_requirem11') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_to_standard_output( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s io = BufferedIO() 121s exporter.export("requirements.txt", tmp_path, io) 121s 121s expected = f"""\ 121s bar==4.5.6 ; {MARKER_PY} 121s foo==1.2.3 ; {MARKER_PY} 121s """ 121s 121s > assert io.fetch_output() == expected 121s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (2 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:2195: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _____ test_exporter_exports_requirements_txt_with_two_primary_sources[1.1] _____ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem11') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_with_two_primary_sources( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s poetry.pool.remove_repository("PyPI") 121s poetry.config.merge( 121s { 121s "repositories": { 121s "custom-a": {"url": "https://a.example.com/simple"}, 121s "custom-b": {"url": "https://b.example.com/simple"}, 121s }, 121s "http-basic": { 121s "custom-a": {"username": "foo", "password": "bar"}, 121s "custom-b": {"username": "baz", "password": "qux"}, 121s }, 121s } 121s ) 121s poetry.pool.add_repository( 121s LegacyRepository( 121s "custom-b", 121s "https://b.example.com/simple", 121s config=poetry.config, 121s ), 121s ) 121s poetry.pool.add_repository( 121s LegacyRepository( 121s "custom-a", 121s "https://a.example.com/simple", 121s config=poetry.config, 121s ), 121s ) 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://a.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://b.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "baz", 121s "version": "7.8.9", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://b.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s "baz": [{"name": "baz.whl", "hash": "24680"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][1]["groups"] = ["dev"] 121s lock_data["package"][2]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar", "baz"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.with_credentials() 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s --index-url https://baz:qux@b.example.com/simple 121s --extra-index-url https://foo:bar@a.example.com/simple 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s baz==7.8.9 ; {MARKER_PY} \\ 121s --hash=sha256:24680 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected 121s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 121s E 121s E Skipping 123 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (10 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:2080: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _____________ test_exporter_doesnt_confuse_repeated_packages[1.1] ______________ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_doesnt_confuse_r0') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_doesnt_confuse_repeated_packages( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s # Testcase derived from . 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "celery", 121s "version": "5.1.2", 121s "optional": False, 121s "python-versions": "<3.7", 121s "dependencies": { 121s "click": ">=7.0,<8.0", 121s "click-didyoumean": ">=0.0.3", 121s "click-plugins": ">=1.1.1", 121s }, 121s }, 121s { 121s "name": "celery", 121s "version": "5.2.3", 121s "optional": False, 121s "python-versions": ">=3.7", 121s "dependencies": { 121s "click": ">=8.0.3,<9.0", 121s "click-didyoumean": ">=0.0.3", 121s "click-plugins": ">=1.1.1", 121s }, 121s }, 121s { 121s "name": "click", 121s "version": "7.1.2", 121s "optional": False, 121s "python-versions": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", 121s }, 121s { 121s "name": "click", 121s "version": "8.0.3", 121s "optional": False, 121s "python-versions": ">=3.6", 121s "dependencies": {}, 121s }, 121s { 121s "name": "click-didyoumean", 121s "version": "0.0.3", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"click": "*"}, 121s }, 121s { 121s "name": "click-didyoumean", 121s "version": "0.3.0", 121s "optional": False, 121s "python-versions": ">=3.6.2,<4.0.0", 121s "dependencies": {"click": ">=7"}, 121s }, 121s { 121s "name": "click-plugins", 121s "version": "1.1.1", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"click": ">=4.0"}, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "^3.6", 121s "content-hash": ( 121s "832b13a88e5020c27cbcd95faa577bf0dbf054a65c023b45dc9442b640d414e6" 121s ), 121s "files": { 121s "celery": [], 121s "click-didyoumean": [], 121s "click-plugins": [], 121s "click": [], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["markers"] = "python_version < '3.7'" 121s lock_data["package"][1]["markers"] = "python_version >= '3.7'" 121s lock_data["package"][2]["markers"] = "python_version < '3.7'" 121s lock_data["package"][3]["markers"] = "python_version >= '3.7'" 121s lock_data["package"][4]["markers"] = "python_full_version < '3.6.2'" 121s lock_data["package"][5]["markers"] = "python_full_version >= '3.6.2'" 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s root = poetry.package.with_dependency_groups([], only=True) 121s root.python_versions = "^3.6" 121s root.add_dependency( 121s Factory.create_dependency( 121s name="celery", constraint={"version": "5.1.2", "python": "<3.7"} 121s ) 121s ) 121s root.add_dependency( 121s Factory.create_dependency( 121s name="celery", constraint={"version": "5.2.3", "python": ">=3.7"} 121s ) 121s ) 121s poetry._package = root 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s io = BufferedIO() 121s exporter.export("requirements.txt", tmp_path, io) 121s 121s expected = f"""\ 121s celery==5.1.2 ; {MARKER_PY36_ONLY} 121s celery==5.2.3 ; {MARKER_PY37} 121s click-didyoumean==0.0.3 ; {MARKER_PY36_PY362} 121s click-didyoumean==0.3.0 ; {MARKER_PY362_PY40} 121s click-plugins==1.1.1 ; {MARKER_PY36} 121s click==7.1.2 ; {MARKER_PY36_ONLY} 121s click==8.0.3 ; {MARKER_PY37} 121s """ 121s 121s > assert io.fetch_output() == expected 121s E assert 'celery==5.1....ion < "4.0"\n' == 'celery==5.1....ion < "4.0"\n' 121s E 121s E Skipping 130 identical leading characters in diff, use -v to show 121s E Skipping 256 identical trailing characters in diff, use -v to show 121s E - ; python_version >= "3.6" and python_full_version < "3.6.2" 121s E + ; python_full_version < "3.6.2" and python_version == "3.6" 121s E click-d 121s 121s tests/test_exporter.py:2314: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _____ test_exporter_exports_requirements_txt_with_two_primary_sources[2.1] _____ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem12') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_with_two_primary_sources( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s poetry.pool.remove_repository("PyPI") 121s poetry.config.merge( 121s { 121s "repositories": { 121s "custom-a": {"url": "https://a.example.com/simple"}, 121s "custom-b": {"url": "https://b.example.com/simple"}, 121s }, 121s "http-basic": { 121s "custom-a": {"username": "foo", "password": "bar"}, 121s "custom-b": {"username": "baz", "password": "qux"}, 121s }, 121s } 121s ) 121s poetry.pool.add_repository( 121s LegacyRepository( 121s "custom-b", 121s "https://b.example.com/simple", 121s config=poetry.config, 121s ), 121s ) 121s poetry.pool.add_repository( 121s LegacyRepository( 121s "custom-a", 121s "https://a.example.com/simple", 121s config=poetry.config, 121s ), 121s ) 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://a.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://b.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "baz", 121s "version": "7.8.9", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://b.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s "baz": [{"name": "baz.whl", "hash": "24680"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][1]["groups"] = ["dev"] 121s lock_data["package"][2]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar", "baz"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.with_credentials() 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s --index-url https://baz:qux@b.example.com/simple 121s --extra-index-url https://foo:bar@a.example.com/simple 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s baz==7.8.9 ; {MARKER_PY} \\ 121s --hash=sha256:24680 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected 121s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 121s E 121s E Skipping 123 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (10 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:2080: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials[1.1] _ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem13') 121s poetry = 121s config = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials( 121s tmp_path: Path, poetry: Poetry, config: Config, lock_version: str 121s ) -> None: 121s poetry.config.merge( 121s { 121s "repositories": {"custom": {"url": "https://example.com/simple"}}, 121s "http-basic": {"custom": {"username": "foo", "password": "bar"}}, 121s } 121s ) 121s poetry.pool.add_repository( 121s LegacyRepository("custom", "https://example.com/simple", config=poetry.config) 121s ) 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][1]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.with_credentials() 121s exporter.export( 121s "requirements.txt", 121s tmp_path, 121s "requirements.txt", 121s ) 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s --extra-index-url https://foo:bar@example.com/simple 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected 121s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 121s E 121s E Skipping 72 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (5 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:2153: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials[2.1] _ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem14') 121s poetry = 121s config = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials( 121s tmp_path: Path, poetry: Poetry, config: Config, lock_version: str 121s ) -> None: 121s poetry.config.merge( 121s { 121s "repositories": {"custom": {"url": "https://example.com/simple"}}, 121s "http-basic": {"custom": {"username": "foo", "password": "bar"}}, 121s } 121s ) 121s poetry.pool.add_repository( 121s LegacyRepository("custom", "https://example.com/simple", config=poetry.config) 121s ) 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][1]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.with_credentials() 121s exporter.export( 121s "requirements.txt", 121s tmp_path, 121s "requirements.txt", 121s ) 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s --extra-index-url https://foo:bar@example.com/simple 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected 121s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 121s E 121s E Skipping 72 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (5 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:2153: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s ________ test_exporter_exports_requirements_txt_to_standard_output[1.1] ________ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_requirem15') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_requirements_txt_to_standard_output( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s io = BufferedIO() 121s exporter.export("requirements.txt", tmp_path, io) 121s 121s expected = f"""\ 121s bar==4.5.6 ; {MARKER_PY} 121s foo==1.2.3 ; {MARKER_PY} 121s """ 121s 121s > assert io.fetch_output() == expected 121s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (2 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:2195: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_omits_and_includes_extras_for_txt_formats[1.1-requirements.txt-expected1] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_omits_and_includ0') 121s poetry = 121s fmt = 'requirements.txt' 121s 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"'] 121s lock_version = '1.1' 121s 121s @pytest.mark.parametrize( 121s ["fmt", "expected"], 121s [ 121s ( 121s "constraints.txt", 121s [ 121s f"bar==4.5.6 ; {MARKER_PY}", 121s f"baz==7.8.9 ; {MARKER_PY}", 121s f"foo==1.2.3 ; {MARKER_PY}", 121s ], 121s ), 121s ( 121s "requirements.txt", 121s [ 121s f"bar==4.5.6 ; {MARKER_PY}", 121s f"bar[baz]==4.5.6 ; {MARKER_PY}", 121s f"baz==7.8.9 ; {MARKER_PY}", 121s f"foo==1.2.3 ; {MARKER_PY}", 121s ], 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_omits_and_includes_extras_for_txt_formats( 121s tmp_path: Path, poetry: Poetry, fmt: str, expected: list[str], lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": { 121s "bar": { 121s "extras": ["baz"], 121s "version": ">=0.1.0", 121s } 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": { 121s "baz": { 121s "version": ">=0.1.0", 121s "optional": True, 121s "markers": "extra == 'baz'", 121s } 121s }, 121s "extras": {"baz": ["baz (>=0.1.0)"]}, 121s }, 121s { 121s "name": "baz", 121s "version": "7.8.9", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": [], "baz": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export(fmt, tmp_path, "exported.txt") 121s 121s with (tmp_path / "exported.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s # It does not matter whether packages are exported with extras or not 121s # because all dependencies are listed explicitly. 121s if lock_version == "2.1": 121s expected = [req for req in expected if not req.startswith("bar[baz]")] 121s > assert content == "\n".join(expected) + "\n" 121s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - bar[baz]==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (10 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:2703: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_omits_and_includes_extras_for_txt_formats[2.1-constraints.txt-expected0] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_omits_and_includ1') 121s poetry = , fmt = 'constraints.txt' 121s 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"'] 121s lock_version = '2.1' 121s 121s @pytest.mark.parametrize( 121s ["fmt", "expected"], 121s [ 121s ( 121s "constraints.txt", 121s [ 121s f"bar==4.5.6 ; {MARKER_PY}", 121s f"baz==7.8.9 ; {MARKER_PY}", 121s f"foo==1.2.3 ; {MARKER_PY}", 121s ], 121s ), 121s ( 121s "requirements.txt", 121s [ 121s f"bar==4.5.6 ; {MARKER_PY}", 121s f"bar[baz]==4.5.6 ; {MARKER_PY}", 121s f"baz==7.8.9 ; {MARKER_PY}", 121s f"foo==1.2.3 ; {MARKER_PY}", 121s ], 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_omits_and_includes_extras_for_txt_formats( 121s tmp_path: Path, poetry: Poetry, fmt: str, expected: list[str], lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": { 121s "bar": { 121s "extras": ["baz"], 121s "version": ">=0.1.0", 121s } 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": { 121s "baz": { 121s "version": ">=0.1.0", 121s "optional": True, 121s "markers": "extra == 'baz'", 121s } 121s }, 121s "extras": {"baz": ["baz (>=0.1.0)"]}, 121s }, 121s { 121s "name": "baz", 121s "version": "7.8.9", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": [], "baz": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export(fmt, tmp_path, "exported.txt") 121s 121s with (tmp_path / "exported.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s # It does not matter whether packages are exported with extras or not 121s # because all dependencies are listed explicitly. 121s if lock_version == "2.1": 121s expected = [req forE: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /tmp/autopkgtest.qECAE7/autopkgtest_tmp/build; python3.13 -m pytest tests 121s pybuild-autopkgtest: error: pybuild --autopkgtest --test-pytest -i python{version} -p 3.13 returned exit code 13 121s make: *** [/tmp/r4mVf85Tfh/run:4: pybuild-autopkgtest] Error 25 121s pybuild-autopkgtest: error: /tmp/r4mVf85Tfh/run pybuild-autopkgtest returned exit code 2 121s req in expected if not req.startswith("bar[baz]")] 121s > assert content == "\n".join(expected) + "\n" 121s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - baz==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (6 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:2703: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_omits_and_includes_extras_for_txt_formats[2.1-requirements.txt-expected1] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_omits_and_includ2') 121s poetry = 121s fmt = 'requirements.txt' 121s 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"'] 121s lock_version = '2.1' 121s 121s @pytest.mark.parametrize( 121s ["fmt", "expected"], 121s [ 121s ( 121s "constraints.txt", 121s [ 121s f"bar==4.5.6 ; {MARKER_PY}", 121s f"baz==7.8.9 ; {MARKER_PY}", 121s f"foo==1.2.3 ; {MARKER_PY}", 121s ], 121s ), 121s ( 121s "requirements.txt", 121s [ 121s f"bar==4.5.6 ; {MARKER_PY}", 121s f"bar[baz]==4.5.6 ; {MARKER_PY}", 121s f"baz==7.8.9 ; {MARKER_PY}", 121s f"foo==1.2.3 ; {MARKER_PY}", 121s ], 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_omits_and_includes_extras_for_txt_formats( 121s tmp_path: Path, poetry: Poetry, fmt: str, expected: list[str], lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": { 121s "bar": { 121s "extras": ["baz"], 121s "version": ">=0.1.0", 121s } 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": { 121s "baz": { 121s "version": ">=0.1.0", 121s "optional": True, 121s "markers": "extra == 'baz'", 121s } 121s }, 121s "extras": {"baz": ["baz (>=0.1.0)"]}, 121s }, 121s { 121s "name": "baz", 121s "version": "7.8.9", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": [], "baz": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export(fmt, tmp_path, "exported.txt") 121s 121s with (tmp_path / "exported.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s # It does not matter whether packages are exported with extras or not 121s # because all dependencies are listed explicitly. 121s if lock_version == "2.1": 121s expected = [req for req in expected if not req.startswith("bar[baz]")] 121s > assert content == "\n".join(expected) + "\n" 121s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - baz==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (6 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:2703: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_prints_warning_for_constraints_txt_with_editable_packages[1.1] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_prints_warning_f0') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_prints_warning_for_constraints_txt_with_editable_packages( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "git", 121s "url": "https://github.com/foo/foo.git", 121s "reference": "123456", 121s }, 121s "develop": True, 121s }, 121s { 121s "name": "bar", 121s "version": "7.8.9", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "baz", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "directory", 121s "url": "sample_project", 121s "reference": "", 121s }, 121s "develop": True, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": [], "baz": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s io = BufferedIO() 121s exporter = Exporter(poetry, io) 121s exporter.export("constraints.txt", tmp_path, "constraints.txt") 121s 121s expected_error_out = ( 121s "Warning: foo is locked in develop (editable) mode, which is " 121s "incompatible with the constraints.txt format.\n" 121s "Warning: baz is locked in develop (editable) mode, which is " 121s "incompatible with the constraints.txt format.\n" 121s ) 121s 121s assert io.fetch_error() == expected_error_out 121s 121s with (tmp_path / "constraints.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s > assert content == f"bar==7.8.9 ; {MARKER_PY}\n" 121s E assert 'bar==7.8.9 ;...ion < "4.0"\n' == 'bar==7.8.9 ;...on == "2.7"\n' 121s E 121s E - bar==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==7.8.9 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s 121s tests/test_exporter.py:2770: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_prints_warning_for_constraints_txt_with_editable_packages[2.1] _ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_prints_warning_f1') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_prints_warning_for_constraints_txt_with_editable_packages( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "git", 121s "url": "https://github.com/foo/foo.git", 121s "reference": "123456", 121s }, 121s "develop": True, 121s }, 121s { 121s "name": "bar", 121s "version": "7.8.9", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "baz", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "directory", 121s "url": "sample_project", 121s "reference": "", 121s }, 121s "develop": True, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": [], "baz": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s io = BufferedIO() 121s exporter = Exporter(poetry, io) 121s exporter.export("constraints.txt", tmp_path, "constraints.txt") 121s 121s expected_error_out = ( 121s "Warning: foo is locked in develop (editable) mode, which is " 121s "incompatible with the constraints.txt format.\n" 121s "Warning: baz is locked in develop (editable) mode, which is " 121s "incompatible with the constraints.txt format.\n" 121s ) 121s 121s assert io.fetch_error() == expected_error_out 121s 121s with (tmp_path / "constraints.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s > assert content == f"bar==7.8.9 ; {MARKER_PY}\n" 121s E assert 'bar==7.8.9 ;...ion < "4.0"\n' == 'bar==7.8.9 ;...on == "2.7"\n' 121s E 121s E - bar==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==7.8.9 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s 121s tests/test_exporter.py:2770: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _ test_exporter_omits_and_includes_extras_for_txt_formats[1.1-constraints.txt-expected0] _ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_omits_and_includ0') 121s poetry = , fmt = 'constraints.txt' 121s 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"'] 121s lock_version = '1.1' 121s 121s @pytest.mark.parametrize( 121s ["fmt", "expected"], 121s [ 121s ( 121s "constraints.txt", 121s [ 121s f"bar==4.5.6 ; {MARKER_PY}", 121s f"baz==7.8.9 ; {MARKER_PY}", 121s f"foo==1.2.3 ; {MARKER_PY}", 121s ], 121s ), 121s ( 121s "requirements.txt", 121s [ 121s f"bar==4.5.6 ; {MARKER_PY}", 121s f"bar[baz]==4.5.6 ; {MARKER_PY}", 121s f"baz==7.8.9 ; {MARKER_PY}", 121s f"foo==1.2.3 ; {MARKER_PY}", 121s ], 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_omits_and_includes_extras_for_txt_formats( 121s tmp_path: Path, poetry: Poetry, fmt: str, expected: list[str], lock_version: str 121s ) -> None: 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": { 121s "bar": { 121s "extras": ["baz"], 121s "version": ">=0.1.0", 121s } 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": { 121s "baz": { 121s "version": ">=0.1.0", 121s "optional": True, 121s "markers": "extra == 'baz'", 121s } 121s }, 121s "extras": {"baz": ["baz (>=0.1.0)"]}, 121s }, 121s { 121s "name": "baz", 121s "version": "7.8.9", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": [], "baz": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export(fmt, tmp_path, "exported.txt") 121s 121s with (tmp_path / "exported.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s # It does not matter whether packages are exported with extras or not 121s # because all dependencies are listed explicitly. 121s if lock_version == "2.1": 121s expected = [req for req in expected if not req.startswith("bar[baz]")] 121s > assert content == "\n".join(expected) + "\n" 121s E assert 'bar==4.5.6 ;...ion < "4.0"\n' == 'bar==4.5.6 ;...on == "2.7"\n' 121s E 121s E - bar==4.5.6 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + bar==4.5.6 ; python_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - baz==7.8.9 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^... 121s E 121s E ...Full output truncated (6 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:2703: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _________ test_exporter_exports_extra_index_url_and_trusted_host[1.1] __________ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_extra_in0') 121s poetry = , lock_version = '1.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_extra_index_url_and_trusted_host( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s poetry.pool.add_repository( 121s LegacyRepository( 121s "custom", 121s "http://example.com/simple", 121s ), 121s priority=Priority.EXPLICIT, 121s ) 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"bar": "*"}, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "http://example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s --trusted-host example.com 121s --extra-index-url http://example.com/simple 121s 121s bar==4.5.6 ; {MARKER_PY} 121s foo==1.2.3 ; {MARKER_PY} 121s """ 121s > assert content == expected 121s E assert '--trusted-ho...ion < "4.0"\n' == '--trusted-ho...on == "2.7"\n' 121s E 121s E Skipping 90 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"... 121s E 121s E ...Full output truncated (3 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:2965: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _________ test_exporter_exports_extra_index_url_and_trusted_host[2.1] __________ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_exports_extra_in1') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_exports_extra_index_url_and_trusted_host( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s poetry.pool.add_repository( 121s LegacyRepository( 121s "custom", 121s "http://example.com/simple", 121s ), 121s priority=Priority.EXPLICIT, 121s ) 121s lock_data = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"bar": "*"}, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "http://example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = f"""\ 121s --trusted-host example.com 121s --extra-index-url http://example.com/simple 121s 121s bar==4.5.6 ; {MARKER_PY} 121s foo==1.2.3 ; {MARKER_PY} 121s """ 121s > assert content == expected 121s E assert '--trusted-ho...ion < "4.0"\n' == '--trusted-ho...on == "2.7"\n' 121s E 121s E Skipping 90 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E - foo==1.2.3 ; python_version >= "3.6" and python_version < "4.0" or python_version == "2.7"... 121s E 121s E ...Full output truncated (3 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:2965: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _____________ test_exporter_index_urls[1.1-priorities0-expected0] ______________ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_1_1_p0') 121s poetry = 121s priorities = [('custom-a', ), ('custom-b', )] 121s expected = ('a', 'b'), lock_version = '1.1' 121s 121s @pytest.mark.parametrize( 121s ("priorities", "expected"), 121s [ 121s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 121s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 121s ( 121s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 121s ("a", "b"), 121s ), 121s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 121s ( 121s [ 121s ("PyPI", Priority.PRIMARY), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("PyPI", Priority.EXPLICIT), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ("PyPI", Priority.SUPPLEMENTAL), 121s ], 121s ("", "a", "b"), 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_index_urls( 121s tmp_path: Path, 121s poetry: Poetry, 121s priorities: list[tuple[str, Priority]], 121s expected: tuple[str, ...], 121s lock_version: str, 121s ) -> None: 121s pypi = poetry.pool.repository("PyPI") 121s poetry.pool.remove_repository("PyPI") 121s for name, prio in priorities: 121s if name.lower() == "pypi": 121s repo = pypi 121s else: 121s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 121s poetry.pool.add_repository(repo, priority=prio) 121s 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://a.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://b.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected_urls = [ 121s f"--extra-index-url https://{name[-1]}.example.com/simple" 121s for name in expected[1:] 121s ] 121s if expected[0]: 121s expected_urls = [ 121s f"--index-url https://{expected[0]}.example.com/simple", 121s *expected_urls, 121s ] 121s url_string = "\n".join(expected_urls) 121s 121s expected_content = f"""\ 121s {url_string} 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected_content 121s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 121s E 121s E Skipping 107 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (5 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:3175: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _____________ test_exporter_index_urls[1.1-priorities3-expected3] ______________ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_index_urls_1_1_p0') 121s poetry = 121s priorities = [('custom-b', ), ('custom-a', )] 121s expected = ('a', 'b'), lock_version = '1.1' 121s 121s @pytest.mark.parametrize( 121s ("priorities", "expected"), 121s [ 121s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 121s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 121s ( 121s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 121s ("a", "b"), 121s ), 121s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 121s ( 121s [ 121s ("PyPI", Priority.PRIMARY), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("PyPI", Priority.EXPLICIT), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ("PyPI", Priority.SUPPLEMENTAL), 121s ], 121s ("", "a", "b"), 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_index_urls( 121s tmp_path: Path, 121s poetry: Poetry, 121s priorities: list[tuple[str, Priority]], 121s expected: tuple[str, ...], 121s lock_version: str, 121s ) -> None: 121s pypi = poetry.pool.repository("PyPI") 121s poetry.pool.remove_repository("PyPI") 121s for name, prio in priorities: 121s if name.lower() == "pypi": 121s repo = pypi 121s else: 121s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 121s poetry.pool.add_repository(repo, priority=prio) 121s 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://a.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://b.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected_urls = [ 121s f"--extra-index-url https://{name[-1]}.example.com/simple" 121s for name in expected[1:] 121s ] 121s if expected[0]: 121s expected_urls = [ 121s f"--index-url https://{expected[0]}.example.com/simple", 121s *expected_urls, 121s ] 121s url_string = "\n".join(expected_urls) 121s 121s expected_content = f"""\ 121s {url_string} 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected_content 121s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 121s E 121s E Skipping 107 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (5 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:3175: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _____________ test_exporter_index_urls[1.1-priorities1-expected1] ______________ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_1_1_p1') 121s poetry = 121s priorities = [('custom-b', ), ('custom-a', )] 121s expected = ('b', 'a'), lock_version = '1.1' 121s 121s @pytest.mark.parametrize( 121s ("priorities", "expected"), 121s [ 121s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 121s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 121s ( 121s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 121s ("a", "b"), 121s ), 121s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 121s ( 121s [ 121s ("PyPI", Priority.PRIMARY), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("PyPI", Priority.EXPLICIT), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ("PyPI", Priority.SUPPLEMENTAL), 121s ], 121s ("", "a", "b"), 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_index_urls( 121s tmp_path: Path, 121s poetry: Poetry, 121s priorities: list[tuple[str, Priority]], 121s expected: tuple[str, ...], 121s lock_version: str, 121s ) -> None: 121s pypi = poetry.pool.repository("PyPI") 121s poetry.pool.remove_repository("PyPI") 121s for name, prio in priorities: 121s if name.lower() == "pypi": 121s repo = pypi 121s else: 121s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 121s poetry.pool.add_repository(repo, priority=prio) 121s 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://a.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://b.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected_urls = [ 121s f"--extra-index-url https://{name[-1]}.example.com/simple" 121s for name in expected[1:] 121s ] 121s if expected[0]: 121s expected_urls = [ 121s f"--index-url https://{expected[0]}.example.com/simple", 121s *expected_urls, 121s ] 121s url_string = "\n".join(expected_urls) 121s 121s expected_content = f"""\ 121s {url_string} 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected_content 121s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 121s E 121s E Skipping 107 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (5 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:3175: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _____________ test_exporter_index_urls[1.1-priorities4-expected4] ______________ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_index_urls_1_1_p1') 121s poetry = 121s priorities = [('PyPI', ), ('custom-a', ), ('custom-b', )] 121s expected = ('', 'a', 'b'), lock_version = '1.1' 121s 121s @pytest.mark.parametrize( 121s ("priorities", "expected"), 121s [ 121s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 121s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 121s ( 121s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 121s ("a", "b"), 121s ), 121s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 121s ( 121s [ 121s ("PyPI", Priority.PRIMARY), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("PyPI", Priority.EXPLICIT), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ("PyPI", Priority.SUPPLEMENTAL), 121s ], 121s ("", "a", "b"), 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_index_urls( 121s tmp_path: Path, 121s poetry: Poetry, 121s priorities: list[tuple[str, Priority]], 121s expected: tuple[str, ...], 121s lock_version: str, 121s ) -> None: 121s pypi = poetry.pool.repository("PyPI") 121s poetry.pool.remove_repository("PyPI") 121s for name, prio in priorities: 121s if name.lower() == "pypi": 121s repo = pypi 121s else: 121s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 121s poetry.pool.add_repository(repo, priority=prio) 121s 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://a.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://b.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected_urls = [ 121s f"--extra-index-url https://{name[-1]}.example.com/simple" 121s for name in expected[1:] 121s ] 121s if expected[0]: 121s expected_urls = [ 121s f"--index-url https://{expected[0]}.example.com/simple", 121s *expected_urls, 121s ] 121s url_string = "\n".join(expected_urls) 121s 121s expected_content = f"""\ 121s {url_string} 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected_content 121s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 121s E 121s E Skipping 113 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (5 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:3175: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _____________ test_exporter_index_urls[1.1-priorities2-expected2] ______________ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_1_1_p2') 121s poetry = 121s priorities = [('custom-b', ), ('custom-a', )] 121s expected = ('a', 'b'), lock_version = '1.1' 121s 121s @pytest.mark.parametrize( 121s ("priorities", "expected"), 121s [ 121s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 121s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 121s ( 121s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 121s ("a", "b"), 121s ), 121s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 121s ( 121s [ 121s ("PyPI", Priority.PRIMARY), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("PyPI", Priority.EXPLICIT), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ("PyPI", Priority.SUPPLEMENTAL), 121s ], 121s ("", "a", "b"), 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_index_urls( 121s tmp_path: Path, 121s poetry: Poetry, 121s priorities: list[tuple[str, Priority]], 121s expected: tuple[str, ...], 121s lock_version: str, 121s ) -> None: 121s pypi = poetry.pool.repository("PyPI") 121s poetry.pool.remove_repository("PyPI") 121s for name, prio in priorities: 121s if name.lower() == "pypi": 121s repo = pypi 121s else: 121s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 121s poetry.pool.add_repository(repo, priority=prio) 121s 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://a.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://b.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected_urls = [ 121s f"--extra-index-url https://{name[-1]}.example.com/simple" 121s for name in expected[1:] 121s ] 121s if expected[0]: 121s expected_urls = [ 121s f"--index-url https://{expected[0]}.example.com/simple", 121s *expected_urls, 121s ] 121s url_string = "\n".join(expected_urls) 121s 121s expected_content = f"""\ 121s {url_string} 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected_content 121s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 121s E 121s E Skipping 107 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (5 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:3175: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _____________ test_exporter_index_urls[1.1-priorities5-expected5] ______________ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_index_urls_1_1_p2') 121s poetry = 121s priorities = [('PyPI', ), ('custom-a', ), ('custom-b', )] 121s expected = ('', 'a', 'b'), lock_version = '1.1' 121s 121s @pytest.mark.parametrize( 121s ("priorities", "expected"), 121s [ 121s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 121s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 121s ( 121s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 121s ("a", "b"), 121s ), 121s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 121s ( 121s [ 121s ("PyPI", Priority.PRIMARY), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("PyPI", Priority.EXPLICIT), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ("PyPI", Priority.SUPPLEMENTAL), 121s ], 121s ("", "a", "b"), 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_index_urls( 121s tmp_path: Path, 121s poetry: Poetry, 121s priorities: list[tuple[str, Priority]], 121s expected: tuple[str, ...], 121s lock_version: str, 121s ) -> None: 121s pypi = poetry.pool.repository("PyPI") 121s poetry.pool.remove_repository("PyPI") 121s for name, prio in priorities: 121s if name.lower() == "pypi": 121s repo = pypi 121s else: 121s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 121s poetry.pool.add_repository(repo, priority=prio) 121s 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://a.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://b.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected_urls = [ 121s f"--extra-index-url https://{name[-1]}.example.com/simple" 121s for name in expected[1:] 121s ] 121s if expected[0]: 121s expected_urls = [ 121s f"--index-url https://{expected[0]}.example.com/simple", 121s *expected_urls, 121s ] 121s url_string = "\n".join(expected_urls) 121s 121s expected_content = f"""\ 121s {url_string} 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected_content 121s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 121s E 121s E Skipping 113 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (5 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:3175: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _____________ test_exporter_index_urls[2.1-priorities0-expected0] ______________ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_2_1_p0') 121s poetry = 121s priorities = [('custom-a', ), ('custom-b', )] 121s expected = ('a', 'b'), lock_version = '2.1' 121s 121s @pytest.mark.parametrize( 121s ("priorities", "expected"), 121s [ 121s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 121s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 121s ( 121s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 121s ("a", "b"), 121s ), 121s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 121s ( 121s [ 121s ("PyPI", Priority.PRIMARY), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("PyPI", Priority.EXPLICIT), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ("PyPI", Priority.SUPPLEMENTAL), 121s ], 121s ("", "a", "b"), 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_index_urls( 121s tmp_path: Path, 121s poetry: Poetry, 121s priorities: list[tuple[str, Priority]], 121s expected: tuple[str, ...], 121s lock_version: str, 121s ) -> None: 121s pypi = poetry.pool.repository("PyPI") 121s poetry.pool.remove_repository("PyPI") 121s for name, prio in priorities: 121s if name.lower() == "pypi": 121s repo = pypi 121s else: 121s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 121s poetry.pool.add_repository(repo, priority=prio) 121s 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://a.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://b.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected_urls = [ 121s f"--extra-index-url https://{name[-1]}.example.com/simple" 121s for name in expected[1:] 121s ] 121s if expected[0]: 121s expected_urls = [ 121s f"--index-url https://{expected[0]}.example.com/simple", 121s *expected_urls, 121s ] 121s url_string = "\n".join(expected_urls) 121s 121s expected_content = f"""\ 121s {url_string} 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected_content 121s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 121s E 121s E Skipping 107 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (5 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:3175: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _____________ test_exporter_index_urls[1.1-priorities6-expected6] ______________ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_index_urls_1_1_p3') 121s poetry = 121s priorities = [('custom-a', ), ('custom-b', ), ('PyPI', )] 121s expected = ('', 'a', 'b'), lock_version = '1.1' 121s 121s @pytest.mark.parametrize( 121s ("priorities", "expected"), 121s [ 121s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 121s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 121s ( 121s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 121s ("a", "b"), 121s ), 121s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 121s ( 121s [ 121s ("PyPI", Priority.PRIMARY), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("PyPI", Priority.EXPLICIT), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ("PyPI", Priority.SUPPLEMENTAL), 121s ], 121s ("", "a", "b"), 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_index_urls( 121s tmp_path: Path, 121s poetry: Poetry, 121s priorities: list[tuple[str, Priority]], 121s expected: tuple[str, ...], 121s lock_version: str, 121s ) -> None: 121s pypi = poetry.pool.repository("PyPI") 121s poetry.pool.remove_repository("PyPI") 121s for name, prio in priorities: 121s if name.lower() == "pypi": 121s repo = pypi 121s else: 121s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 121s poetry.pool.add_repository(repo, priority=prio) 121s 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://a.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://b.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected_urls = [ 121s f"--extra-index-url https://{name[-1]}.example.com/simple" 121s for name in expected[1:] 121s ] 121s if expected[0]: 121s expected_urls = [ 121s f"--index-url https://{expected[0]}.example.com/simple", 121s *expected_urls, 121s ] 121s url_string = "\n".join(expected_urls) 121s 121s expected_content = f"""\ 121s {url_string} 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected_content 121s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 121s E 121s E Skipping 113 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (5 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:3175: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _____________ test_exporter_index_urls[2.1-priorities1-expected1] ______________ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_2_1_p1') 121s poetry = 121s priorities = [('custom-b', ), ('custom-a', )] 121s expected = ('b', 'a'), lock_version = '2.1' 121s 121s @pytest.mark.parametrize( 121s ("priorities", "expected"), 121s [ 121s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 121s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 121s ( 121s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 121s ("a", "b"), 121s ), 121s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 121s ( 121s [ 121s ("PyPI", Priority.PRIMARY), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("PyPI", Priority.EXPLICIT), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ("PyPI", Priority.SUPPLEMENTAL), 121s ], 121s ("", "a", "b"), 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_index_urls( 121s tmp_path: Path, 121s poetry: Poetry, 121s priorities: list[tuple[str, Priority]], 121s expected: tuple[str, ...], 121s lock_version: str, 121s ) -> None: 121s pypi = poetry.pool.repository("PyPI") 121s poetry.pool.remove_repository("PyPI") 121s for name, prio in priorities: 121s if name.lower() == "pypi": 121s repo = pypi 121s else: 121s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 121s poetry.pool.add_repository(repo, priority=prio) 121s 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://a.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://b.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected_urls = [ 121s f"--extra-index-url https://{name[-1]}.example.com/simple" 121s for name in expected[1:] 121s ] 121s if expected[0]: 121s expected_urls = [ 121s f"--index-url https://{expected[0]}.example.com/simple", 121s *expected_urls, 121s ] 121s url_string = "\n".join(expected_urls) 121s 121s expected_content = f"""\ 121s {url_string} 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected_content 121s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 121s E 121s E Skipping 107 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (5 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:3175: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _____________ test_exporter_index_urls[2.1-priorities2-expected2] ______________ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_index_urls_2_1_p0') 121s poetry = 121s priorities = [('custom-b', ), ('custom-a', )] 121s expected = ('a', 'b'), lock_version = '2.1' 121s 121s @pytest.mark.parametrize( 121s ("priorities", "expected"), 121s [ 121s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 121s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 121s ( 121s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 121s ("a", "b"), 121s ), 121s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 121s ( 121s [ 121s ("PyPI", Priority.PRIMARY), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("PyPI", Priority.EXPLICIT), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ("PyPI", Priority.SUPPLEMENTAL), 121s ], 121s ("", "a", "b"), 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_index_urls( 121s tmp_path: Path, 121s poetry: Poetry, 121s priorities: list[tuple[str, Priority]], 121s expected: tuple[str, ...], 121s lock_version: str, 121s ) -> None: 121s pypi = poetry.pool.repository("PyPI") 121s poetry.pool.remove_repository("PyPI") 121s for name, prio in priorities: 121s if name.lower() == "pypi": 121s repo = pypi 121s else: 121s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 121s poetry.pool.add_repository(repo, priority=prio) 121s 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://a.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://b.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected_urls = [ 121s f"--extra-index-url https://{name[-1]}.example.com/simple" 121s for name in expected[1:] 121s ] 121s if expected[0]: 121s expected_urls = [ 121s f"--index-url https://{expected[0]}.example.com/simple", 121s *expected_urls, 121s ] 121s url_string = "\n".join(expected_urls) 121s 121s expected_content = f"""\ 121s {url_string} 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected_content 121s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 121s E 121s E Skipping 107 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (5 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:3175: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _____________ test_exporter_index_urls[2.1-priorities3-expected3] ______________ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_2_1_p2') 121s poetry = 121s priorities = [('custom-b', ), ('custom-a', )] 121s expected = ('a', 'b'), lock_version = '2.1' 121s 121s @pytest.mark.parametrize( 121s ("priorities", "expected"), 121s [ 121s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 121s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 121s ( 121s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 121s ("a", "b"), 121s ), 121s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 121s ( 121s [ 121s ("PyPI", Priority.PRIMARY), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("PyPI", Priority.EXPLICIT), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ("PyPI", Priority.SUPPLEMENTAL), 121s ], 121s ("", "a", "b"), 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_index_urls( 121s tmp_path: Path, 121s poetry: Poetry, 121s priorities: list[tuple[str, Priority]], 121s expected: tuple[str, ...], 121s lock_version: str, 121s ) -> None: 121s pypi = poetry.pool.repository("PyPI") 121s poetry.pool.remove_repository("PyPI") 121s for name, prio in priorities: 121s if name.lower() == "pypi": 121s repo = pypi 121s else: 121s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 121s poetry.pool.add_repository(repo, priority=prio) 121s 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://a.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://b.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected_urls = [ 121s f"--extra-index-url https://{name[-1]}.example.com/simple" 121s for name in expected[1:] 121s ] 121s if expected[0]: 121s expected_urls = [ 121s f"--index-url https://{expected[0]}.example.com/simple", 121s *expected_urls, 121s ] 121s url_string = "\n".join(expected_urls) 121s 121s expected_content = f"""\ 121s {url_string} 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected_content 121s E assert '--index-url ...ha256:12345\n' == '--index-url ...ha256:12345\n' 121s E 121s E Skipping 107 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (5 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:3175: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _____________ test_exporter_index_urls[2.1-priorities4-expected4] ______________ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_index_urls_2_1_p1') 121s poetry = 121s priorities = [('PyPI', ), ('custom-a', ), ('custom-b', )] 121s expected = ('', 'a', 'b'), lock_version = '2.1' 121s 121s @pytest.mark.parametrize( 121s ("priorities", "expected"), 121s [ 121s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 121s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 121s ( 121s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 121s ("a", "b"), 121s ), 121s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 121s ( 121s [ 121s ("PyPI", Priority.PRIMARY), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("PyPI", Priority.EXPLICIT), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ("PyPI", Priority.SUPPLEMENTAL), 121s ], 121s ("", "a", "b"), 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_index_urls( 121s tmp_path: Path, 121s poetry: Poetry, 121s priorities: list[tuple[str, Priority]], 121s expected: tuple[str, ...], 121s lock_version: str, 121s ) -> None: 121s pypi = poetry.pool.repository("PyPI") 121s poetry.pool.remove_repository("PyPI") 121s for name, prio in priorities: 121s if name.lower() == "pypi": 121s repo = pypi 121s else: 121s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 121s poetry.pool.add_repository(repo, priority=prio) 121s 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://a.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://b.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected_urls = [ 121s f"--extra-index-url https://{name[-1]}.example.com/simple" 121s for name in expected[1:] 121s ] 121s if expected[0]: 121s expected_urls = [ 121s f"--index-url https://{expected[0]}.example.com/simple", 121s *expected_urls, 121s ] 121s url_string = "\n".join(expected_urls) 121s 121s expected_content = f"""\ 121s {url_string} 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected_content 121s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 121s E 121s E Skipping 113 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (5 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:3175: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _____________ test_exporter_index_urls[2.1-priorities5-expected5] ______________ 121s [gw0] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw0/test_exporter_index_urls_2_1_p3') 121s poetry = 121s priorities = [('PyPI', ), ('custom-a', ), ('custom-b', )] 121s expected = ('', 'a', 'b'), lock_version = '2.1' 121s 121s @pytest.mark.parametrize( 121s ("priorities", "expected"), 121s [ 121s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 121s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 121s ( 121s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 121s ("a", "b"), 121s ), 121s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 121s ( 121s [ 121s ("PyPI", Priority.PRIMARY), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("PyPI", Priority.EXPLICIT), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ("PyPI", Priority.SUPPLEMENTAL), 121s ], 121s ("", "a", "b"), 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_index_urls( 121s tmp_path: Path, 121s poetry: Poetry, 121s priorities: list[tuple[str, Priority]], 121s expected: tuple[str, ...], 121s lock_version: str, 121s ) -> None: 121s pypi = poetry.pool.repository("PyPI") 121s poetry.pool.remove_repository("PyPI") 121s for name, prio in priorities: 121s if name.lower() == "pypi": 121s repo = pypi 121s else: 121s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 121s poetry.pool.add_repository(repo, priority=prio) 121s 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://a.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://b.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected_urls = [ 121s f"--extra-index-url https://{name[-1]}.example.com/simple" 121s for name in expected[1:] 121s ] 121s if expected[0]: 121s expected_urls = [ 121s f"--index-url https://{expected[0]}.example.com/simple", 121s *expected_urls, 121s ] 121s url_string = "\n".join(expected_urls) 121s 121s expected_content = f"""\ 121s {url_string} 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected_content 121s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 121s E 121s E Skipping 113 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (5 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:3175: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _____________ test_exporter_index_urls[2.1-priorities6-expected6] ______________ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_exporter_index_urls_2_1_p2') 121s poetry = 121s priorities = [('custom-a', ), ('custom-b', ), ('PyPI', )] 121s expected = ('', 'a', 'b'), lock_version = '2.1' 121s 121s @pytest.mark.parametrize( 121s ("priorities", "expected"), 121s [ 121s ([("custom-a", Priority.PRIMARY), ("custom-b", Priority.PRIMARY)], ("a", "b")), 121s ([("custom-b", Priority.PRIMARY), ("custom-a", Priority.PRIMARY)], ("b", "a")), 121s ( 121s [("custom-b", Priority.SUPPLEMENTAL), ("custom-a", Priority.PRIMARY)], 121s ("a", "b"), 121s ), 121s ([("custom-b", Priority.EXPLICIT), ("custom-a", Priority.PRIMARY)], ("a", "b")), 121s ( 121s [ 121s ("PyPI", Priority.PRIMARY), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("PyPI", Priority.EXPLICIT), 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ], 121s ("", "a", "b"), 121s ), 121s ( 121s [ 121s ("custom-a", Priority.PRIMARY), 121s ("custom-b", Priority.PRIMARY), 121s ("PyPI", Priority.SUPPLEMENTAL), 121s ], 121s ("", "a", "b"), 121s ), 121s ], 121s ) 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_exporter_index_urls( 121s tmp_path: Path, 121s poetry: Poetry, 121s priorities: list[tuple[str, Priority]], 121s expected: tuple[str, ...], 121s lock_version: str, 121s ) -> None: 121s pypi = poetry.pool.repository("PyPI") 121s poetry.pool.remove_repository("PyPI") 121s for name, prio in priorities: 121s if name.lower() == "pypi": 121s repo = pypi 121s else: 121s repo = LegacyRepository(name, f"https://{name[-1]}.example.com/simple") 121s poetry.pool.add_repository(repo, priority=prio) 121s 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1.2.3", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://a.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s { 121s "name": "bar", 121s "version": "4.5.6", 121s "optional": False, 121s "python-versions": "*", 121s "source": { 121s "type": "legacy", 121s "url": "https://b.example.com/simple", 121s "reference": "", 121s }, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": { 121s "foo": [{"name": "foo.whl", "hash": "12345"}], 121s "bar": [{"name": "bar.whl", "hash": "67890"}], 121s }, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["groups"] = ["dev"] 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s set_package_requires(poetry, dev={"bar"}) 121s 121s exporter = Exporter(poetry, NullIO()) 121s exporter.only_groups([MAIN_GROUP, "dev"]) 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected_urls = [ 121s f"--extra-index-url https://{name[-1]}.example.com/simple" 121s for name in expected[1:] 121s ] 121s if expected[0]: 121s expected_urls = [ 121s f"--index-url https://{expected[0]}.example.com/simple", 121s *expected_urls, 121s ] 121s url_string = "\n".join(expected_urls) 121s 121s expected_content = f"""\ 121s {url_string} 121s 121s bar==4.5.6 ; {MARKER_PY} \\ 121s --hash=sha256:67890 121s foo==1.2.3 ; {MARKER_PY} \\ 121s --hash=sha256:12345 121s """ 121s 121s > assert content == expected_content 121s E assert '--extra-inde...ha256:12345\n' == '--extra-inde...ha256:12345\n' 121s E 121s E Skipping 113 identical leading characters in diff, use -v to show 121s E - n_version >= "3.6" and python_version < "4.0" or python_version == "2.7" \ 121s E ? - ^ ^ ^^^ ^ ^ ^ ^^ ^^ ^ ^ 121s E + n_version == "2.7" or python_version >= "3.6" and python_version < "4.0" \ 121s E ? + ^ ^ ^^ ^^ ^ ^ ^^^ ^ ^ ^ 121s E --hash=sha256:67890... 121s E 121s E ...Full output truncated (5 lines hidden), use '-vv' to show 121s 121s tests/test_exporter.py:3175: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s _______________________ test_dependency_walk_error[2.1] ________________________ 121s [gw1] linux -- Python 3.13.2 /usr/bin/python3.13 121s 121s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-0/popen-gw1/test_dependency_walk_error_2_10') 121s poetry = , lock_version = '2.1' 121s 121s @pytest.mark.parametrize("lock_version", ("1.1", "2.1")) 121s def test_dependency_walk_error( 121s tmp_path: Path, poetry: Poetry, lock_version: str 121s ) -> None: 121s """ 121s With lock file version 2.1 we can export lock files 121s that resulted in a DependencyWalkerError with lower lock file versions. 121s 121s root 121s ├── foo >=0 ; python_version < "3.9" 121s ├── foo >=1 ; python_version >= "3.9" 121s ├── bar ==1 ; python_version < "3.9" 121s │ └── foo ==1 ; python_version < "3.9" 121s └── bar ==2 ; python_version >= "3.9" 121s └── foo ==2 ; python_version >= "3.9" 121s 121s Only considering the root dependency, foo 2 is a valid solution 121s for all environments. However, due to bar depending on foo, 121s foo 1 must be chosen for Python 3.8 and lower. 121s """ 121s lock_data: dict[str, Any] = { 121s "package": [ 121s { 121s "name": "foo", 121s "version": "1", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "foo", 121s "version": "2", 121s "optional": False, 121s "python-versions": "*", 121s }, 121s { 121s "name": "bar", 121s "version": "1", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"foo": "1"}, 121s }, 121s { 121s "name": "bar", 121s "version": "2", 121s "optional": False, 121s "python-versions": "*", 121s "dependencies": {"foo": "2"}, 121s }, 121s ], 121s "metadata": { 121s "lock-version": lock_version, 121s "python-versions": "*", 121s "content-hash": "123456789", 121s "files": {"foo": [], "bar": []}, 121s }, 121s } 121s fix_lock_data(lock_data) 121s if lock_version == "2.1": 121s lock_data["package"][0]["markers"] = "python_version < '3.9'" 121s lock_data["package"][1]["markers"] = "python_version >= '3.9'" 121s lock_data["package"][2]["markers"] = "python_version < '3.9'" 121s lock_data["package"][3]["markers"] = "python_version >= '3.9'" 121s poetry.locker.mock_lock_data(lock_data) # type: ignore[attr-defined] 121s poetry.package.python_versions = "^3.8" 121s poetry.package.add_dependency( 121s Factory.create_dependency( 121s name="foo", constraint={"version": ">=0", "python": "<3.9"} 121s ) 121s ) 121s poetry.package.add_dependency( 121s Factory.create_dependency( 121s name="foo", constraint={"version": ">=1", "python": ">=3.9"} 121s ) 121s ) 121s poetry.package.add_dependency( 121s Factory.create_dependency( 121s name="bar", constraint={"version": "1", "python": "<3.9"} 121s ) 121s ) 121s poetry.package.add_dependency( 121s Factory.create_dependency( 121s name="bar", constraint={"version": "2", "python": ">=3.9"} 121s ) 121s ) 121s 121s exporter = Exporter(poetry, NullIO()) 121s if lock_version == "1.1": 121s with pytest.raises(DependencyWalkerError): 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s return 121s 121s exporter.export("requirements.txt", tmp_path, "requirements.txt") 121s 121s with (tmp_path / "requirements.txt").open(encoding="utf-8") as f: 121s content = f.read() 121s 121s expected = """\ 121s bar==1 ; python_version >= "3.8" and python_version < "3.9" 121s bar==2 ; python_version >= "3.9" and python_version < "4.0" 121s foo==1 ; python_version >= "3.8" and python_version < "3.9" 121s foo==2 ; python_version >= "3.9" and python_version < "4.0" 121s """ 121s 121s > assert content == expected 121s E assert 'bar==1 ; pyt...ion < "4.0"\n' == 'bar==1 ; pyt...ion < "4.0"\n' 121s E 121s E - bar==1 ; python_version >= "3.8" and python_version < "3.9" 121s E + bar==1 ; python_version == "3.8" 121s E bar==2 ; python_version >= "3.9" and python_version < "4.0" 121s E - foo==1 ; python_version >= "3.8" and python_version < "3.9" 121s E + foo==1 ; python_version == "3.8" 121s E foo==2 ; python_version >= "3.9" and python_version < "4.0" 121s 121s tests/test_exporter.py:3281: AssertionError 121s ------------------------------ Captured log setup ------------------------------ 121s 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. 121s =========================== short test summary info ============================ 121s 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] 121s 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] 121s FAILED tests/command/test_command_export.py::test_export_exports_requirements_txt_file_locks_if_no_lock_file 121s FAILED tests/command/test_command_export.py::test_export_exports_requirements_txt_uses_lock_file 121s FAILED tests/command/test_command_export.py::test_export_with_all_extras - as... 121s FAILED tests/command/test_command_export.py::test_export_with_all_groups - as... 121s FAILED tests/command/test_command_export.py::test_export_prints_to_stdout_by_default 121s FAILED tests/command/test_command_export.py::test_export_uses_requirements_txt_format_by_default 121s 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] 121s 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] 121s 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] 121s 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] 121s 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] 121s 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] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages[1.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages[2.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_markers[1.1] 121s 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] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_markers[2.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_poetry[1.1] 121s 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] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_poetry[2.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_pyinstaller[1.1] 121s 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] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_pyinstaller[2.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_without_optional_packages[2.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_optional_packages[1.1-extras0-lines0] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[1.1-False-lines0] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_optional_packages[2.1-extras0-lines0] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[1.1-True-lines1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_git_packages[1.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[2.1-False-lines0] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_git_packages[2.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_markers_any[2.1-True-lines1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages[1.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes[1.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages[2.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes[2.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_cyclic[1.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes[1.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_cyclic[2.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_sorted_hashes[2.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_circular_root_dependency[1.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled[1.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_circular_root_dependency[2.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_standard_packages_and_hashes_disabled[2.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers[1.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_without_dev_packages_by_default[1.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_markers[2.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_without_dev_packages_by_default[2.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in[1.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_directory_packages[1.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_packages_if_opted_in[2.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_directory_packages[2.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_directory_packages_editable[1.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_without_optional_packages[1.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_directory_packages_editable[2.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_directory_packages[2.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_nested_directory_packages[1.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_url_false[1.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_url_false[2.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_file_packages[1.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host[1.1] 121s FAILED tests/test_exporter.py::test_exporter_can_export_requirements_txt_with_file_packages[2.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host[2.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_extras[1.1-True-expected0] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages[1.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_extras[1.1-False-expected1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages[2.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_extras[2.1-True-expected0] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources[1.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_dev_extras[2.1-False-expected1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_and_duplicate_sources[2.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_to_standard_output[2.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_two_primary_sources[1.1] 121s FAILED tests/test_exporter.py::test_exporter_doesnt_confuse_repeated_packages[1.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_two_primary_sources[2.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials[1.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_with_legacy_packages_and_credentials[2.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_requirements_txt_to_standard_output[1.1] 121s FAILED tests/test_exporter.py::test_exporter_omits_and_includes_extras_for_txt_formats[1.1-requirements.txt-expected1] 121s FAILED tests/test_exporter.py::test_exporter_omits_and_includes_extras_for_txt_formats[2.1-constraints.txt-expected0] 121s FAILED tests/test_exporter.py::test_exporter_omits_and_includes_extras_for_txt_formats[2.1-requirements.txt-expected1] 121s FAILED tests/test_exporter.py::test_exporter_prints_warning_for_constraints_txt_with_editable_packages[1.1] 121s FAILED tests/test_exporter.py::test_exporter_prints_warning_for_constraints_txt_with_editable_packages[2.1] 121s FAILED tests/test_exporter.py::test_exporter_omits_and_includes_extras_for_txt_formats[1.1-constraints.txt-expected0] 121s FAILED tests/test_exporter.py::test_exporter_exports_extra_index_url_and_trusted_host[1.1] 121s FAILED tests/test_exporter.py::test_exporter_exports_extra_index_url_and_trusted_host[2.1] 121s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities0-expected0] 121s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities3-expected3] 121s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities1-expected1] 121s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities4-expected4] 121s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities2-expected2] 121s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities5-expected5] 121s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities0-expected0] 121s FAILED tests/test_exporter.py::test_exporter_index_urls[1.1-priorities6-expected6] 121s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities1-expected1] 121s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities2-expected2] 121s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities3-expected3] 121s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities4-expected4] 121s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities5-expected5] 121s FAILED tests/test_exporter.py::test_exporter_index_urls[2.1-priorities6-expected6] 121s FAILED tests/test_exporter.py::test_dependency_walk_error[2.1] - assert 'bar=... 121s ======================== 103 failed, 38 passed in 7.53s ======================== 121s autopkgtest [09:20:48]: test pybuild-autopkgtest: -----------------------] 122s autopkgtest [09:20:49]: test pybuild-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 122s pybuild-autopkgtest FAIL non-zero exit status 25 122s autopkgtest [09:20:49]: @@@@@@@@@@@@@@@@@@@@ summary 122s pybuild-autopkgtest FAIL non-zero exit status 25 140s nova [W] Using flock in prodstack6-s390x 140s Creating nova instance adt-plucky-s390x-poetry-plugin-export-20250313-091845-juju-7f2275-prod-proposed-migration-environment-2-9eec0949-e120-4a90-985e-c3d928d2c0a1 from image adt/ubuntu-plucky-s390x-server-20250313.img (UUID 54e7e81b-c545-49a7-82a9-0db67474751a)... 140s nova [W] Timed out waiting for 65cbce4c-599d-4fff-a6f7-3e3426594cfa to get deleted.