Skip to content
This repository was archived by the owner on Apr 30, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@ services:
- docker

env:
- FEDORA=28 TOXENV=integration
- FEDORA=28 TOXENV=py3
- FEDORA=29 TOXENV=integration
- FEDORA=29 TOXENV=py3
- FEDORA=29 TOXENV=style
- FEDORA=30 TOXENV=integration
- FEDORA=30 TOXENV=py3
- FEDORA=30 TOXENV=style
- FEDORA=rawhide TOXENV=integration
- FEDORA=rawhide TOXENV=py3

install:
- sed -i "s/fedora-28-x86_64/fedora-${FEDORA}-x86_64/" mock.cfg
- sed -i "s/fedora-30-x86_64/fedora-${FEDORA}-x86_64/" mock.cfg
- sed -i "s/\$releasever/${FEDORA}/" mock.cfg # needed on rawhide
- sed -i "s|FROM fedora|FROM registry.fedoraproject.org/fedora:${FEDORA}|" Dockerfile
- docker build -t taskotron .
Expand Down
2 changes: 0 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ Currently the following checks are available:

- Whether only Python 2 version of the package contains the executables;

- Whether the package uses versioned shebangs in its executables;

- Whether the package supports Python 3 upstream but not in the package;

- Whether the package requires ``/usr/bin/python`` (or ``python-unversioned-command``).
Expand Down
2 changes: 1 addition & 1 deletion mock.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include('/etc/mock/fedora-28-x86_64.cfg')
include('/etc/mock/fedora-30-x86_64.cfg')

config_opts['chroot_setup_cmd'] = 'install ansible dnf'
config_opts['use_host_resolv'] = True
Expand Down
3 changes: 0 additions & 3 deletions python_versions_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
task_unversioned_shebangs,
task_py3_support,
task_python_usage,
task_python_usage_obsoleted,
)
from taskotron_python_versions.common import log, Package, PackageException

Expand Down Expand Up @@ -82,8 +81,6 @@ def run(koji_build, workdir='.', artifactsdir='artifacts',
srpm_packages + packages, koji_build, artifact))
details.append(task_python_usage(
srpm_packages + packages, koji_build, artifact))
details.append(task_python_usage_obsoleted(
logs, koji_build, artifact)) # TODO: remove with Fedora 28 EOL.

for detail in details:
# update testcase for all subtasks (use their existing testcase as a
Expand Down
2 changes: 0 additions & 2 deletions taskotron_python_versions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from .unversioned_shebangs import task_unversioned_shebangs
from .py3_support import task_py3_support
from .python_usage import task_python_usage
from .python_usage_obsoleted import task_python_usage_obsoleted


__all__ = (
Expand All @@ -16,5 +15,4 @@
'task_unversioned_shebangs',
'task_py3_support',
'task_python_usage',
'task_python_usage_obsoleted',
)
65 changes: 0 additions & 65 deletions taskotron_python_versions/python_usage_obsoleted.py

This file was deleted.

47 changes: 1 addition & 46 deletions test/integration/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,6 @@ def results(request):
_pycallgraph = fixtures_factory('python-pycallgraph-0.5.1-13.fc28')
pycallgraph = fixtures_factory('_pycallgraph')

# TODO: remove with Fedora 28 EOL.
_jsonrpc = fixtures_factory('jsonrpc-glib-3.27.4-2.fc28')
jsonrpc = fixtures_factory('_jsonrpc')

_teeworlds = fixtures_factory('teeworlds-0.6.4-8.fc29')
teeworlds = fixtures_factory('_teeworlds')

Expand All @@ -211,7 +207,7 @@ def test_number_of_results(results, request):
results = request.getfixturevalue(results)

# Each time a new check is added, this number needs to be increased
assert len(results) == 9
assert len(results) == 8


@parametrize('eric', 'six', 'admesh', 'copr', 'epub', 'twine', 'pycallgraph')
Expand Down Expand Up @@ -487,47 +483,6 @@ def test_artifact_contains_py3_support_and_looks_as_expected(
""").strip() in artifact.strip()


# TODO: remove with Fedora 28 EOL.
@parametrize('eric', 'six', 'admesh', 'tracer',
'copr', 'epub', 'twine', 'docutils')
def test_python_usage_obsoleted_passed(results, request):
results = request.getfixturevalue(results)
task_result = results['dist.python-versions.python_usage_obsoleted']
assert task_result.outcome == 'PASSED'


# TODO: remove with Fedora 28 EOL.
@parametrize('jsonrpc')
def test_python_usage_obsoleted_failed(results, request):
results = request.getfixturevalue(results)
task_result = results['dist.python-versions.python_usage_obsoleted']
assert task_result.outcome == 'FAILED'


# TODO: remove with Fedora 28 EOL.
@parametrize('jsonrpc')
def test_artifact_of_python_usage_obsoleted_looks_as_expected(results,
request):
results = request.getfixturevalue(results)
result = results['dist.python-versions.python_usage_obsoleted']
artifact = result.artifact.read_text()

print(artifact)

assert dedent("""
You've used /usr/bin/python during build on the following arches:

jsonrpc-glib-3.27.4-2.fc28: x86_64

Use /usr/bin/python3 or /usr/bin/python2 explicitly.
/usr/bin/python will be removed or switched to Python 3 in the future.

Grep the build.log for the following to find out where:

DEPRECATION WARNING: python2 invoked with /usr/bin/python
""").strip() in artifact.strip()


@parametrize('eric', 'six', 'admesh',
'copr', 'epub', 'twine', 'docutils')
def test_python_usage_passed(results, request):
Expand Down