Skip to content

Conversation

@Perdu
Copy link
Contributor

@Perdu Perdu commented Dec 2, 2025

SUMMARY

As discussed in #898, the CI has errors reported by ansible-lint:
https://dev.azure.com/ansible/community.postgresql/_build/results?buildId=165038&view=logs&j=df593170-0476-56b6-4a33-d8e2815d43d8&t=ed5b4094-b5e7-57c7-f236-602faf856c9f

01:27 ERROR: Found 9 pylint issue(s) which need to be resolved:
01:27 ERROR: plugins/module_utils/postgres.py:22:0: ansible-bad-import-from: Import iteritems from the Python standard library equivalent instead of ansible.module_utils.six (50%)
01:27 ERROR: plugins/modules/postgresql_copy.py:184:0: ansible-bad-import-from: Import iteritems from the Python standard library equivalent instead of ansible.module_utils.six (0%)
01:27 ERROR: plugins/modules/postgresql_info.py:159:0: ansible-bad-import-from: Import iteritems from the Python standard library equivalent instead of ansible.module_utils.six (50%)
01:27 ERROR: plugins/modules/postgresql_publication.py:257:0: ansible-bad-import-from: Import iteritems from the Python standard library equivalent instead of ansible.module_utils.six (0%)
01:27 ERROR: plugins/modules/postgresql_query.py:269:0: ansible-bad-import-from: Import iteritems from the Python standard library equivalent instead of ansible.module_utils.six (50%)
01:27 ERROR: plugins/modules/postgresql_script.py:219:0: ansible-bad-import-from: Import iteritems from the Python standard library equivalent instead of ansible.module_utils.six (50%)
01:27 ERROR: plugins/modules/postgresql_subscription.py:217:0: ansible-bad-import-from: Import iteritems from the Python standard library equivalent instead of ansible.module_utils.six (0%)
01:27 ERROR: plugins/modules/postgresql_tablespace.py:195:0: ansible-bad-import-from: Import iteritems from the Python standard library equivalent instead of ansible.module_utils.six (0%)
01:27 ERROR: plugins/modules/postgresql_user_obj_stat_info.py:110:0: ansible-bad-import-from: Import iteritems from the Python standard library equivalent instead of ansible.module_utils.six (0%)

This patch fixes these errors by removing the wrong imports and using .items() instead of iteritems()

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

It's in a lot of modules

ADDITIONAL INFORMATION

(I'm don't have a local full test environment for this project and could not reproduce the issue locally. I'm trusting the CI to test this properly)

@Perdu
Copy link
Contributor Author

Perdu commented Dec 2, 2025

This did pass the failing test. The 2 remaining ones are unrelated.

@hunleyd hunleyd merged commit fbed381 into ansible-collections:main Dec 2, 2025
34 checks passed
@Andersson007
Copy link
Collaborator

Andersson007 commented Dec 3, 2025

@Perdu thanks for the contribution! CI is green again. This is that kind of contributions this project needs!
@hunleyd thanks for reviewing and merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants