Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove __future__ and metaclass boilerplate from controller code #80843

Open
1 task done
nitzmahone opened this issue May 18, 2023 · 4 comments
Open
1 task done

Remove __future__ and metaclass boilerplate from controller code #80843

nitzmahone opened this issue May 18, 2023 · 4 comments
Labels
affects_2.16 affects_2.17 code_health Issue/PR improves codebase health feature This issue/PR relates to a feature request.

Comments

@nitzmahone
Copy link
Member

nitzmahone commented May 18, 2023

Summary

Since we've dropped 2.x support for the controller, we can remove the old 2.x future and metaclass boilerplate from non-target-side code.

Issue Type

Feature Idea

Component Name

controller code, sanity tests

Additional Information

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@nitzmahone nitzmahone added the code_health Issue/PR improves codebase health label May 18, 2023
@ansibot
Copy link
Contributor

ansibot commented May 18, 2023

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot ansibot added affects_2.16 feature This issue/PR relates to a feature request. needs_triage Needs a first human triage before being processed. labels May 18, 2023
@mattclay
Copy link
Member

mattclay commented May 19, 2023

The future-import-boilerplate and metaclass-boilerplate sanity tests were already updated in 2.12 to only apply to code that runs on Python 2.7.

@mattclay mattclay changed the title Update future-import-boilerplate sanity test for controller code Remove __future__ and metaclass boilerplate from controller code May 19, 2023
@mattclay
Copy link
Member

I've updated the title and description to reflect that the sanity tests don't require updates, only the code. I also included the metaclass boilerplate in this issue, since there's no point in removing them separately.

@mattclay
Copy link
Member

mattclay commented May 19, 2023

There are other changes to consider, although they should be separate issue(s) if we're going to implement them:

  1. Do we want to make the from __future__ import annotations our new standard controller boilerplate for ansible-core? It can be (and is) used currently, but it's not enforced by sanity tests (except for ansible-test code that runs on the controller).
  2. Do we want to prohibit the use of the now outdated Python 2.7 compatibility boilerplate for ansible-core controller code? That would keep it from finding its way back into the code after we remove it.

@mattclay mattclay removed the needs_triage Needs a first human triage before being processed. label May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.16 affects_2.17 code_health Issue/PR improves codebase health feature This issue/PR relates to a feature request.
Projects
None yet
Development

No branches or pull requests

4 participants