Thursday, 2025-01-02

opendevreviewClark Boylan proposed openstack/pbr master: Use pyproject.toml  https://review.opendev.org/c/openstack/pbr/+/93833117:35
opendevreviewClark Boylan proposed openstack/pbr master: Set up PBR with setuptools and six as dependencies  https://review.opendev.org/c/openstack/pbr/+/93833217:35
clarkbfungi: ^ thats the hackyness I've come up with17:35
clarkbI have no idea if it works because I'm a bit afraid to let something like that run on my local machine first pass (or at all)17:35
opendevreviewClark Boylan proposed openstack/pbr master: Use pyproject.toml  https://review.opendev.org/c/openstack/pbr/+/93833117:41
opendevreviewClark Boylan proposed openstack/pbr master: Set up PBR with setuptools and six as dependencies  https://review.opendev.org/c/openstack/pbr/+/93833217:41
fungiyou could create a temporary user or run it in a container maybe, but yeah i'd just lean on zuul and not worry about it17:43
opendevreviewClark Boylan proposed openstack/pbr master: Use pyproject.toml  https://review.opendev.org/c/openstack/pbr/+/93833118:03
opendevreviewClark Boylan proposed openstack/pbr master: Set up PBR with setuptools and six as dependencies  https://review.opendev.org/c/openstack/pbr/+/93833218:03
clarkbhrm my monkey patching isn't working properly18:27
clarkbhttps://zuul.opendev.org/t/openstack/build/5dece5654e3b447082339fec831e2380/log/job-output.txt#69418:28
clarkbfungi: ^ any idea why the patching at https://review.opendev.org/c/openstack/pbr/+/938331/5/pbr/build.py line 162 and beyond doesn't seem to owkr?18:28
clarkbI do that whole dance there to try and make the existing methods work via the existing build_meta._BACKEND object18:29
clarkband it does seem to add the method to the object its just not calling it with the build_meta backend passed in as self?18:30
clarkboh I see I thought I was using the definitions setuptools was doing but it has to do with binding the method to the object first18:46
opendevreviewClark Boylan proposed openstack/pbr master: Use pyproject.toml  https://review.opendev.org/c/openstack/pbr/+/93833118:58
opendevreviewClark Boylan proposed openstack/pbr master: Set up PBR with setuptools and six as dependencies  https://review.opendev.org/c/openstack/pbr/+/93833218:58
opendevreviewClark Boylan proposed openstack/pbr master: Use pyproject.toml  https://review.opendev.org/c/openstack/pbr/+/93833119:49
opendevreviewClark Boylan proposed openstack/pbr master: Set up PBR with setuptools and six as dependencies  https://review.opendev.org/c/openstack/pbr/+/93833219:49
clarkbfungi: so editable_wheel isn't a valid command in setuptools 59.x20:01
clarkbwhich means after porting all of that and getting past the initial failures we are still failing20:01
clarkbI'm not sure what the best option is here sicne I suspect backporting editable_wheel may be too much effort. Another option may be to say that editable installs are not possible on python3.6 with latest pip for that platform?20:02
clarkbI'll have to think about this a bit but I suspect we'll end up in a position like that (which may break devstack for older platforms)20:02
fungimmm, can pbr still fall back on its old behavior in those cases, or is it that pip is forcing it whether we want it or not?20:04
fungii.e. say no editable installs on python<3.7 when using pyproject.toml20:04
fungior even just document that to use pyproject.toml files with pbr you must be on python>=3.720:06
fungiand update the documentation to require setuptools>=6020:07
fungimmm, actually https://docs.openstack.org/pbr/latest/user/using.html#pyproject-toml already says setuptools>=6420:07
fungii guess the problem is that pip will react automatically to the presence of a pyproject.toml file20:08
clarkbit is pip forcing20:09
fungibut regardless we already don't expect pbr's pyproject.toml support to work with a setuptools that old20:09
clarkbI actualyl went down that avenue first and they even have does saying pip won't respect the legacy behavior20:09
clarkbthough I guess I didn't check the specific version python3.6 is using and we can try and orce the legacy behavior there and see what happens20:09
clarkbfungi: right the problem is in switching PBR itself to pyproject.toml20:10
fungiyeah, because it uses itself20:10
clarkbthere isn't a way to say "This package shouldn'y use pyproject.toml" fi the file is present and the tool (pip etc) support it20:10
clarkbbut may be we can do something like set the env var that says use legacy editable installs and hand wave past it20:10
clarkbit will take me a bit to unwind back to a state where we can test that way20:10
clarkbor I guess I can test with just that flag then clean the change up if that works20:11
fungithat might be faster for figuring out if it's even a viable option20:12
clarkb--config-settings editable_mode=compat seems to be the pip flag20:12
clarkbI think there is an env var too maybe which would be better20:12
clarkbbecause then it can be exported into the entire test stack which also install pbr and friends20:13
fungiyeah, it would be used recursively then20:13
fungibecause otherwise you're dealing with subprocesses that don't necessarily get the option passed along20:13
clarkbPIP_CONFIG_SETTINGS='editable_mode=compat' maybe20:14
clarkbpip 21.3.1 is the version being used I think fwiw20:17
opendevreviewClark Boylan proposed openstack/pbr master: Use pyproject.toml  https://review.opendev.org/c/openstack/pbr/+/93833120:19
opendevreviewClark Boylan proposed openstack/pbr master: Set up PBR with setuptools and six as dependencies  https://review.opendev.org/c/openstack/pbr/+/93833220:19
clarkbthat is incomplete because there is a whole lot of cleanup that needs to happen as well as rewriting the commit message if that works20:19
clarkbbut I just want to see if this makes it happier20:19
clarkbif it does I can simplify the pyproject.toml and build meta hooks back down to looking more like they did before I started this expedition20:20
clarkbI think the pip version used by python 2.7 just works because it is using the compat already20:21
clarkbso in theory if we can get the signal through and have pip honor it this should work20:21
fungiand then only apply it when the python version is <3.7 i guess?20:24
clarkbya exactly20:27
clarkbbut that doesn't work in the naive shape20:29
fungisounds like a good escape hatch, and then setuptools 64.0.0 requires_python>=3.7 anyway, but it might make sense to call that out in its pyproject.toml usage documentation that, due to pip's automatic behaviors, pbr-using projects shouldn't add a pyproject.toml until they drop support for older python versions20:30
fungi(pbr itself is an unfortunate special case of that)20:30
opendevreviewClark Boylan proposed openstack/pbr master: Use pyproject.toml  https://review.opendev.org/c/openstack/pbr/+/93833120:31
opendevreviewClark Boylan proposed openstack/pbr master: Set up PBR with setuptools and six as dependencies  https://review.opendev.org/c/openstack/pbr/+/93833220:31
clarkbfungi: ++20:31
clarkbfwiw I think the issue I may have now is that this is in the pip that tox is instantiating and my setenv doesnt' affect that one20:31
clarkbso I'm trying with usedevelop off in the py36 env to see if we get further20:31
clarkbbut also I need to eat lunch I'll look at this more later20:32
opendevreviewClark Boylan proposed openstack/pbr master: Use pyproject.toml  https://review.opendev.org/c/openstack/pbr/+/93833121:18
opendevreviewClark Boylan proposed openstack/pbr master: Set up PBR with setuptools and six as dependencies  https://review.opendev.org/c/openstack/pbr/+/93833221:18
clarkbI suspect that first change will pass now. I think we should probably work through the second change though to make sure the integration testing all works as expected too before committing to this21:19
clarkbfungi: do you know if the py-modules=[] in the pbr pyproject.toml is correct for pbr? I'm worried that if we make a wheel of pbr with that we won't get any code included?22:15
clarkbit works for testing because we have teh source code checked otu and we want it to use the local code which is why I suspect that is there22:15
fungii think that's telling setuptools what trees to auto-index when building the manifest, which pbr is going to create anyway based off the git file list22:18
fungiby default, setuptools will try to find modules to include on its own22:18
fungiso it should still work, but i suppose you can try to run build in a pbr checkout and then unzip -l the resulting wheel22:19
fungiand tar tf the sdist22:19
clarkback thanks for confirming. I think you are right that pbr buidls the list of things via git info and this should still work22:20
fungibasically, py-modules=[] is telling setuptools not to look for files on its own22:20
opendevreviewClark Boylan proposed openstack/pbr master: Set up PBR with setuptools and six as dependencies  https://review.opendev.org/c/openstack/pbr/+/93833222:21
clarkbI'm working on the integration testing fixups now22:21
fungiit's also a relatively recent setuptools "convenience" behavior, so that setting is telling it to just stick to its old (explicit) behavior22:23
clarkbI suspect that with pbr its a bit of a chicken and egg so by telling setuptools to get out of the way we (pbr) can do our own thing. Then for everyone else they use pbr and it just works (I hope)22:25
clarkbI think this is getting close if we hand wave aroubnd the python3.6 limitations. Then its a matter of coordinating with big users like openstack for a rollout plan that is safe enough22:26
fungiyah, i mean in my prior testing it seemed to22:27
opendevreviewClark Boylan proposed openstack/pbr master: Set up PBR with setuptools and six as dependencies  https://review.opendev.org/c/openstack/pbr/+/93833222:28
opendevreviewClark Boylan proposed openstack/pbr master: Set up PBR with setuptools and six as dependencies  https://review.opendev.org/c/openstack/pbr/+/93833222:58

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