Skip to content

Conversation

@moreati
Copy link
Member

@moreati moreati commented Sep 23, 2024

  • Consolidates Python 2.4 imports/polyfills in mitogen.core
  • Removes Python < 2.6 backward compatibility imports/polyfills from ansible_mitogen
  • Removes Ansible < 2.10 backward compatibility imports/polyfills from ansible_mitogen

@moreati moreati force-pushed the import-cleanups branch 5 times, most recently from 7196141 to 23f89f4 Compare September 24, 2024 13:24
…togen.core

This saves some bytes on the wire ad simplifies reasoning about the code.
…lbacks

Because ansible_mitogen >= 0.3 supports Ansible >= 2.10 and Ansible 2.10
requires supports Python >= 2.7 on controllers and Python >= 2.6 on targets
these are dead weight.

See
- https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix
- tox.ini
Rough guidelines, in decending preference:
- Use mitogen.core if possible
- Use ansible.module_utils.six if possible
- Embed a getattr() or try/except

viewkeys() et al can't be brought into mitogen.core because that package still
targets Python 2.4. dict.viewkeys() were introduced in Python 2.7.
@moreati moreati marked this pull request as ready for review September 24, 2024 17:46
@moreati moreati merged commit 2e2dfb1 into mitogen-hq:master Sep 26, 2024
@moreati moreati deleted the import-cleanups branch September 26, 2024 01:58
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.

1 participant