Friday, 2026-04-17

*** agalica_ is now known as agalica06:15
cardoeDo we have a minimum "tox" version that we use for Zuul?16:00
fungiit's usually expressed in the tox.minversion field of each project's tox.ini based on the features they rely on16:40
fungithough our zuul jobs try to use the latest available version of tox16:40
fungibased on the way the jobs are written, i think it will effectively use the latest version of tox that is installable with the default python interpreter on the platform where it's run16:41
fungiso for older platforms that could be older tox versions16:41
fungifor example the current latest tox release, 4.53.0, requires python 3.10 or later, so on platforms defaulting to python 3.9 we'd use an older tox version16:43
fungilike ubuntu focal, debian bullseye, or centos 9 stream16:45
fungithe ensure-tox role from zuul-jobs does allow the installed version of tox to be controlled with an `ensure_tox_version` variable, but defaults to installing the latest possible version for the platform where it's run16:47
fungicardoe: does that ^ answer your question, or were you looking for something else?16:47
fungimaybe the precise answer to your question is that openstack doesn't mandate a minimum tox version in ci jobs, but projects can express one individually and also custom jobs or variants can pin to a specific tox version they want installed16:49
cardoeI'm mostly asking about https://review.opendev.org/c/openstack/nova/+/98491816:50
fungiah, context definitely helps with these sorts of questions16:50
cardoeSo constraints like stephenfin did is the preferred way for tox to specify these things but that option appeared in 4.28 and newer16:50
cardoeWe were talking the other day about the performance of tox vs prek and other stuff.16:51
fungiyeah, its correct to increase the tox.minversion when relying on new syntax to a version that supports that syntax, in my opinion, though i don't think we have a policy about it16:53
fungiper https://pypi.org/project/tox/4.28.0/ that version requires python 3.9, so won't work in py38 jobs on old stable branches16:54
fungibut as long as it doesn't get backported, that's probably fine16:54
fungie.g. stable/2024.1 requires py38 testing because that's the default on ubuntu focal, according to https://governance.openstack.org/tc/reference/runtimes/2024.1.html16:56
cardoetox.minversion is deprecated16:56
cardoeThey're also doing stuff in newer versions around lock files for the environments.16:56
fungilooks like they recommend setting the minimum tox version in a tool.tox.requires list in your pyproject.toml16:57
cardoeAnyway we'll have these issues when running newer versions of tox with the older deprecated operations.16:58
cardoeInterestingly the fixes in newer tox versions are all written / contributed by openstack folks.16:58
fungineat. since opendev's projects moved off tox after v3, my familiarity with its conventions has waned significantly, so this is all news to me16:59
cardoehttps://github.com/tox-dev/tox/issues/3553 is the minversion / requires thing you mentioned16:59
cardoeWhat'd you replace tox with?16:59
funginox16:59
fungiit gets configured with a nox.py file, native python syntax17:00
cardoeoh I've been using pyproject.toml based methods.17:01
fungithe overloading of pyproject.toml files for purposes beyond packaging has become increasingly problematic, it seems like ever tool author decided to cram their options in there and then deprecate their own config files17:02
fungiit's about to get even more fun since the toml spec continues to evolve and the cpython stdlib's toml parser now supports different syntax depending on what python version you're running, so we're likely to start running into new pyproject.toml files that can't even be parsed on earlier python interpreters17:04
stephenfinfungi: I thought they'd decided against supporting TOML 1.1 yet? (for exactly that reason)17:20
stephenfincardoe: I knew `minversion` (or `min_version`) was deprecated, but it was less of lift to bump that than to rework to use `requires`17:20
stephenfin(I think I may have even written the docs update to note the deprecation)17:21
cardoepyproject.toml was always meant for more than packaging though so I don’t have an issue with using it.17:21
cardoestephenfin: you did17:21
fungistephenfin: they waffled back and forth, but last i saw the cpython maintainers had accepted toml 1.1 support for cpython 3.1517:21
fungias in merged the pr17:22
fungihttps://docs.python.org/3.15/library/tomllib.html17:22
fungi"This module provides an interface for parsing TOML 1.1.0 ..."17:22
stephenfininteresting. you'd hope they'll provide a backports lib (or straight up do a backport) for older versions but they don't seem to bother with backwards compat anymore17:23
fungithe upshot of the conversation on discuss.python.org was that projects will just have to be careful to avoid toml 1.1 syntax in pyproject.toml files if they want their sdists to be buildable on python prior to 3.1517:23
fungi(or with build-backends in other languages that lack toml 1.1 support)17:24
stephenfinGood point. The backport is less of a requirement actually.17:24
fungii think the winning argument was that pre-toml-1.0 the stdlib tomllib had already existed and nobody made a stink when it upgraded to add support for toml 1.0, so why should 1.1 be any different?17:26
cardoeI mean same argument can be made for setup.py or nox.py if you use newer python syntax17:26
fungiyes17:26
fungifor our own pyproject.toml files i don't expect we'll have any problem because we require openstack projects to test with a minimum python version17:28
fungiwhere it might get hairy is if one of our dependencies that ships only sdists (those are becoming rare at least) uses toml 1.1 syntax in their pyproject.toml file and doesn't simultaneously add `requires_python>=3.15`17:29
fungiso maybe not likely17:30
cardoefungi: our dependencies are the latest and newest code from 2009.18:36

Generated by irclog2html.py 4.1.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!