I’ve removed the deprecation in devel (for now), and removed the deprecation in 2.20. I have not added the unwanted import sanity check back for collections, it will remain disabled for 2.20.
I’ll either add just the sanity check back in 2.21, or both including the deprecation.
As far as six goes, it will be frozen as of the 2.20 release and will not be updated again before it’s removal. As such, there may be incompatibilities with newer pythons, but instead of updating, if collections run into issues, they will need to migrate away from six in alignment with out deprecation plans.
I wonder whether it would be possible to extend the ansiballz module_utils finding mechanism so that collections could simply vendor six themselves. Right now they can, but they can’t use the six.moves part of it since six provides it without explicit files (and the module_utils finding mechanism wants explicit files for all imported Python modules).
(Edit: I know this comes too late for six, since all versions of ansible-core for which six is needed are already EOL and won’t get this feature. So this isn’t urgent at all. But maybe there are similar Python libraries that provide “virtual” modules without explicit files…)
I’d prefer 1., as long as the porting guide / changelog explicitly state that six is deprecated and will be removed from 2.26 (or whatever the deprecation in 2.22 will use as a removal version). My original issue on the sanity check in 2.20 / devel was about not having any information why the sanity test said to avoid using ansible.module_utils.six. (I would have been happy about “It is deprecated and will be removed from ansible-core 2.xx” in the changelog or porting guide.)
I’ve just added the sanity check for six (unwanted import) back into devel for 2.21. We’re trying something new here, as this is a developer deprecation.
The plan is still to keep the same deprecation clock, but not adding a user facing deprecation in the same version. In 2.22 we will add the user facing deprecation warning in.
A deprecation entry for the changelog has been included with the planned removal.
ansible.module_utils.six is scheduled for removal in 2.24:
Would it be a good idea to have an explicit News for Maintainers on those deprecations?
They might have been communicated already somewhere else and I’ve just overlooked them. To be honest, I first ran into this when the sanity tests failed in community.vmware. And when testing our playbook in our environment, I’ve discovered that there are other deprecations that don’t make the sanity tests fail. And the same deprecations in two other collections. But maybe other collections that we don’t use are affected, too.
So it looks like I’m not the only one who has been surprised by them. No problem there, I think I’ve fixed this and just have to do a new release. But maybe it would be worth to create a News on this for the maintainers and collection owners. What do you think?