Commit Graph

869 Commits (74f6e6a134fa4fe57a80c6c0748772ac13182f1b)

Author SHA1 Message Date
Matt Clay f5c742cdfd
ansible-test - Clean up old Python 2 compat code (#81962)
* Update generated code __future__ import

* Remove Python 2.x compat from compile sanity test

* Remove __metaclass__ from pylint good names list

* Remove Python 2.x compat from ansible-test injector

* Remove Python 2.x compat from ansible-test importer

* Remove Python 2.x compat from ansible-test units

* Remove Python 2.x compat from validate-modules

* Remove Python 2.x compat from pylint plugins

* Remove more Python 2.x compat from ansible-test

* Remove Python 2.x openssl detection in ansible-test

* Remove obsolete Python 2.x comment

* Remove obsolete ansible-test Python 2.x support

* Remove unused bootstrap script functions

* Keep mypy happy

* Remove unused imports

* Keep pylint happy
2 years ago
Matt Clay fd0f48e99d
ansible-test - Update base/default containers (#81957) 2 years ago
Matt Davis d8484f0af7
Update default test container Python to 3.12 and support for PyLint 3.0.1 (#81953)
* temporary PyLint plugin to mask 3.12 finalizer noise

* ansible-test - Default to Python 3.12 for base/default

* ansible-test - Update pylint requirements

* ansible-test - Remove obsoleted changelog entry

* Add changelog fragment for pylint work-around
2 years ago
Sviatoslav Sydorenko d2ba76c117
Remove Python `< 3.5` `selectors` fallbacks (#81872) 2 years ago
Matt Clay 921efce43a
ansible-test - Remove more Python 2.7 / 3.6 support (#81898) 2 years ago
Matt Clay b94ee1cefd
Drop Python 2.7 and Python 3.6 support (#81866)
* Drop Python 2.7 and Python 3.6 support

* Remove obsolete _json_compat
2 years ago
Sloane Hertel 000cf1dd46
Update the test containers to include Python3.12.0 final (#81858) 2 years ago
Matt Clay b7903669b4
ansible-test - Update distro containers (#81851)
* ansible-test - Update distro containers

* Update the alpine3 container to Python 3.11

* Update changelog
2 years ago
Matt Clay 20f17687da
ansible-test - Invoke container sleep through env (#81853) 2 years ago
Abhijeet Kasurde d8f791d88c
Bump sanity test requirements for 3.12 (#81846) 2 years ago
Abhijeet Kasurde ce3954ba74
Bump sanity test requirements for 3.12 (#81843) 2 years ago
Sviatoslav Sydorenko ec265ec08a
Bump `coverage.py` to v7.3.2 in `ansible-test` (#81844) 2 years ago
Matt Clay f31c287348
ansible-test - Improve compatibility with pylint 3 (#81841) 2 years ago
Matt Clay d6a356d7cd
ansible-test - Update sanity test requirements (#81810) 2 years ago
Sloane Hertel cb8cb8936a
Update ansible-test containers
* Include Python 3.12rc3 and PowerShell 7.3.7
2 years ago
Matt Clay 3794612832
ansible-test - Skip pylint test on Python 3.12 (#81706) 2 years ago
René Moser e4b9f9c6ae
tests: update CloudStack test container to version 1.7.0. (#81732) 2 years ago
Matt Martz 3ec7a6e0db
Fix ansible-test issues with detecting docker host and forwarding ports (#81726)
* Properly detect docker host using ssh

* Disable ControlPath when creating SSH port forwards

* typo fix

Co-authored-by: Matt Clay <matt@mystile.com>

* Add clog frag

---------

Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
Abhijeet Kasurde 3b608f97b1
sanity: update requirements (#81680)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2 years ago
Sloane Hertel 67cdaa49f8
ansible-galaxy-collection - fix config permissions for galaxy-importer (#81679)
* Fix permissions for the galaxy-importer config, previously only root had
read/write

* fix ownership instead
2 years ago
Abhijeet Kasurde 1cc5efa77b
tarfile: Handle deprecation warning for extract and extractall (#81545)
* Python 3.11.4 introduces a new parameter 'filter' in extract and
extractall in tarfile. Handle deprecation warning message emitted
in Python 3.12.
* added probing mechanism in ansible-galaxy code to detect broken
data filter implementation in tarfile.

Fixes: #80832

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
Matt Clay 5a059b81c8
ansible-test - Fix Python coverage stub generation (#81611)
As of coverage 7.1.0, files without arcs are not generated.

To work around this, an empty (0, 0) arc is used for each file instead.

This is a follow-up to https://github.com/ansible/ansible/pull/81077

ci_coverage
ci_complete
2 years ago
Matt Clay e1e0e2709c
ansible-test - Enable thread code coverage (#81604)
ci_complete
ci_coverage
2 years ago
Matt Clay 261e5ce381
ansible-test - Update mypy to 1.5.1 (#81602) 2 years ago
Sviatoslav Sydorenko c59bcbe627
Bump `coverage.py` to v7.3.0 in `ansible-test` (#81077) 2 years ago
Matt Clay f28e32c063
ansible-test - Limit deprecated check to core (#81552)
Using `# deprecated:` comment checks in collections would effectively limit those collections to a single version of ansible-core.
2 years ago
Matt Clay 390e508d27
ansible-test - Always use managed entry points (#81537) 2 years ago
Matt Clay 47ab59753c
Clean up release script (#81488)
* Enable mypy for the entire packaging directory

* Return CompletedProcess only when capturing output

This allows stdout/stderr on CompletedProcess to be `str` instead of `str | None`.
The unused args on CompletedProcess have been removed.
Overload type hints have been added to reflect these changes.

* Relax return type on ensure_venv

This improves consistency with its usage, since `run` accepts `env` of `dict[str, t.Any]`.
Also removed unnecssary `str()` usage when updating `env`.

* Fix type hint on suppress_when

* Fix callable annotation

* Add type hint for command_parser

PyCharm complains about using a protected member, and also that it can't find the type in the type stubs.
However, mypy properly recognizes the type.

* Avoid unnecessary TypeVar usage
2 years ago
Abhijeet Kasurde fa5fe8a7db
Bump test container versions to latest (#81471)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2 years ago
Abhijeet Kasurde 493c678795
Sanity: Bump version to match Python 3.12 (#81399)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2 years ago
Matt Clay f894ce89b4
Overhaul package-data sanity test (#81427)
The sanity test now only inspects the sdist and wheel instead of trying to install the sdist using setup.py.
2 years ago
Matt Clay c525514994
ansible-test - Update source layout detection (#81418) 2 years ago
Abhijeet Kasurde 11e261b54f
CI: remove FreeBSD 12.4 from test matrix (#81315)
Fixes: #80417

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2 years ago
Matt Clay 691c8e8603
Omit pre-built man pages from sdist (#81395)
Since man pages aren't accessible to users after a `pip install`, there's no need to include them in the sdist.
This change makes it trivial to build man pages from source, which makes them much easier to iterate on.
It also simplifies creation and testing of the sdist, since it no longer requires building man pages.

The new `packaging/cli-doc/build.py` script can generate both man pages and RST documentation.
This supports inclusion on the docs site without a dependency on `ansible-core` internals.
Having a single implementation for both simplifies keeping the two formats in sync.
2 years ago
Brian Coca 6d1f85bbe9
ansible-test: remove alpine 3.17 (#81124) 2 years ago
Sloane Hertel 5167618e46
Update ansible-test containers to test Python 3.12 with the test venvs (#81330) 2 years ago
Sloane Hertel 48dfe8e215
add Python 3.12 support to ansible-test (#80834)
* update docker containers versions to use newer ansible-test ref in the pre-built venvs

* Allow invoking ansible-test with Python 3.12

* Add python3.12 to the INTERPRETER_PYTHON_FALLBACK

* changelog

* add Python 3.12 as a non-default Python version for the test containers

* Update mypy ignores for Python 3.12

* Add Python 3.12 to CI matrix for unit tests, generic tests, and galaxy

* Update unit test for using the Python 2 collection loader path with Python 3.

Skip the existing test on Python 3.12, since find_module is removed.

Suppress the pre-existing deprecation warnings using the Python 2
codepath with Python 3.

Add a test for Python >= 3.12, which doesn't call find_module.

* Ignore sanity test errors on systems without libselinux present.
2 years ago
Matt Clay c5d18c39d8
Update sanity requirements comments (#81321)
Also remove a redundant indirect dependency.

The requirements file updates are being deferred until other changes are required.
2 years ago
René Moser 99eeaf7da8
ansible-test: cloudstack: bump test container version (#81319) 2 years ago
Matt Clay e964078a83
ansible-test - Pre-build PyYAML wheels (#81300)
This works around Cython failures when attempting to install PyYAML >= 5.4 <= 6.0.
2 years ago
Matt Clay 765b2bd783
ansible-test - Narrow the scope of some sanity tests (#81273)
* ansible-test - Limit scope of replace-urlopen test

Only ansible-core code and plugins in collections can be expected to rely on module_utils.

* ansible-test - Limit scope of use-compat-six test

Only ansible-core code and plugins in collections can be expected to rely on module_utils.

* ansible-test - Limit scope of no-get-exception test

Only ansible-core code and plugins in collections should be checked for usage of outdated module_utils functions.

* Add integration tests
2 years ago
Matt Clay 3f7bf0bcd4
ansible-test - Fix sanity traceback with `-e` opt (#81271)
Also remove redundant warning about missing programs.

Includes integration tests to verify `-e` does not traceback.
2 years ago
Sloane Hertel 59a791ee3b
ansible-test - remove Fedora 37 container and remote support (#81093) 2 years ago
Matt Clay 08307de366
ansible-test - Remove obsolete WinRM setup script (#81249)
The WinRM setup is handled internally by ansible-core-ci now.
2 years ago
Matt Clay 876be11f8c
Add pymarkdown sanity test for core (#81220)
* Clean up markdown

* Add pymarkdown sanity test for core

* Update unit test SHA
2 years ago
Matt Clay 72e038e823
Remove `docs` and `examples` directories (#81011)
* Remove docs dir

* Updates to reflect docs removal

* Fix integration test

* Remove examples dir

* Updates to reflect examples removal

* Remove build_library and build-ansible.py

* Remove refs to build_library and build-ansible.py

* Remove obsolete template

* Remove obsolete template reference

* Remove the now obsolete rstcheck sanity test
2 years ago
Sloane Hertel 67b78a17c4
Remove Python 3.9 support for the controller (#80973)
* Remove obsolete Python <=3.9 controller code
* Remove Python 3.9 test controller bootstrapping
* Update test requirements

Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
Matt Clay f4ff6768f3
ansible-test - Remove old pytest-forked constraint (#81185) 2 years ago
Matt Clay 3d2ff64264
ansible-test - Fix import sanity test for targets (#81184) 2 years ago
Martin Krizek ca3ffbf4c2
ansible-test - remove test remotes: rhel 8.7/9.1 (#81065)
Fixes #80419
Fixes #80420
2 years ago