From 67d1cce037dfb18db8f8328e1c048eeaee6f5407 Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Dec 20 2018 14:49:18 +0000
Subject: [PATCH 1/9] Move pagure to use python3's absolute import


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/alembic/env.py b/alembic/env.py
index f4db868..b88ea43 100644
--- a/alembic/env.py
+++ b/alembic/env.py
@@ -1,4 +1,4 @@
-from __future__ import with_statement, print_function
+from __future__ import with_statement, print_function, absolute_import
 
 import os
 
diff --git a/alembic/versions/26af5c3602a0_add_the_default_hook_to_all_projects.py b/alembic/versions/26af5c3602a0_add_the_default_hook_to_all_projects.py
index 4d6cc25..4fff153 100644
--- a/alembic/versions/26af5c3602a0_add_the_default_hook_to_all_projects.py
+++ b/alembic/versions/26af5c3602a0_add_the_default_hook_to_all_projects.py
@@ -6,7 +6,7 @@ Create Date: 2016-10-08 12:14:31.155018
 
 """
 
-from __future__ import print_function
+from __future__ import print_function, absolute_import
 
 # revision identifiers, used by Alembic.
 revision = '26af5c3602a0'
diff --git a/createdb.py b/createdb.py
index 2f58162..ca66288 100644
--- a/createdb.py
+++ b/createdb.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-from __future__ import print_function, unicode_literals
+from __future__ import print_function, unicode_literals, absolute_import
 
 # These two lines are needed to run on EL6
 __requires__ = ['SQLAlchemy >= 0.8', 'jinja2 >= 2.4']
diff --git a/dev-data.py b/dev-data.py
index 55be46d..f2bff1d 100644
--- a/dev-data.py
+++ b/dev-data.py
@@ -3,7 +3,7 @@
 
 """ Populate the pagure db with some dev data. """
 
-from __future__ import print_function, unicode_literals
+from __future__ import print_function, unicode_literals, absolute_import
 
 import argparse
 import os
diff --git a/files/aclchecker.py b/files/aclchecker.py
index 982de1a..b99b5f8 100644
--- a/files/aclchecker.py
+++ b/files/aclchecker.py
@@ -9,7 +9,7 @@
 
 """
 
-from __future__ import unicode_literals, print_function
+from __future__ import unicode_literals, print_function, absolute_import
 
 import subprocess
 import sys
diff --git a/files/api_key_expire_mail.py b/files/api_key_expire_mail.py
index 890f75f..78600ff 100755
--- a/files/api_key_expire_mail.py
+++ b/files/api_key_expire_mail.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-from __future__ import print_function
+from __future__ import print_function, absolute_import
 import os
 import argparse
 from datetime import datetime, timedelta
diff --git a/files/emoji_clean_json.py b/files/emoji_clean_json.py
index a794791..406ed55 100644
--- a/files/emoji_clean_json.py
+++ b/files/emoji_clean_json.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-from __future__ import print_function
+from __future__ import print_function, absolute_import
 import json
 import os
 import sys
diff --git a/files/keyhelper.py b/files/keyhelper.py
index 2f5cf5a..c949c10 100644
--- a/files/keyhelper.py
+++ b/files/keyhelper.py
@@ -9,7 +9,7 @@
 
 """
 
-from __future__ import unicode_literals, print_function
+from __future__ import unicode_literals, print_function, absolute_import
 
 import sys
 import os
diff --git a/files/mirror_project_in.py b/files/mirror_project_in.py
index 5ee3b00..b6ff20d 100644
--- a/files/mirror_project_in.py
+++ b/files/mirror_project_in.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-from __future__ import print_function
+from __future__ import print_function, absolute_import
 import os
 import argparse
 from datetime import datetime, timedelta
diff --git a/pagure-ev/pagure_stream_server.py b/pagure-ev/pagure_stream_server.py
index f7e9da2..f3c314d 100644
--- a/pagure-ev/pagure_stream_server.py
+++ b/pagure-ev/pagure_stream_server.py
@@ -19,7 +19,7 @@ nc localhost 8080
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import logging
 import os
diff --git a/pagure-milters/comment_email_milter.py b/pagure-milters/comment_email_milter.py
index 3b9da3c..9c5d01f 100644
--- a/pagure-milters/comment_email_milter.py
+++ b/pagure-milters/comment_email_milter.py
@@ -5,7 +5,7 @@
 # Return REJECT,TEMPFAIL,ACCEPT to short circuit processing for a message.
 # You can also add/del recipients, replacebody, add/del headers, etc.
 
-from __future__ import print_function, unicode_literals
+from __future__ import print_function, unicode_literals, absolute_import
 
 import base64
 import email
diff --git a/pagure/__init__.py b/pagure/__init__.py
index 0ffe305..e8169f8 100644
--- a/pagure/__init__.py
+++ b/pagure/__init__.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 
 __version__ = "5.1.3"
diff --git a/pagure/api/__init__.py b/pagure/api/__init__.py
index bc75087..45eabcc 100644
--- a/pagure/api/__init__.py
+++ b/pagure/api/__init__.py
@@ -14,7 +14,7 @@ API namespace version 0.
 # pylint: disable=too-few-public-methods
 # pylint: disable=too-many-locals
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import codecs
 import functools
diff --git a/pagure/api/ci/jenkins.py b/pagure/api/ci/jenkins.py
index 0dec40e..8630b1a 100644
--- a/pagure/api/ci/jenkins.py
+++ b/pagure/api/ci/jenkins.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import logging
 
diff --git a/pagure/api/fork.py b/pagure/api/fork.py
index ef5ef4b..c2b7e71 100644
--- a/pagure/api/fork.py
+++ b/pagure/api/fork.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import logging
 
diff --git a/pagure/api/group.py b/pagure/api/group.py
index 596f4ac..209d417 100644
--- a/pagure/api/group.py
+++ b/pagure/api/group.py
@@ -9,7 +9,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import flask
 
diff --git a/pagure/api/issue.py b/pagure/api/issue.py
index 68c7e1c..e9d5200 100644
--- a/pagure/api/issue.py
+++ b/pagure/api/issue.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import print_function, unicode_literals
+from __future__ import print_function, unicode_literals, absolute_import
 
 import flask
 import datetime
diff --git a/pagure/api/project.py b/pagure/api/project.py
index 9babd65..3f9924a 100644
--- a/pagure/api/project.py
+++ b/pagure/api/project.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import flask
 import logging
diff --git a/pagure/api/user.py b/pagure/api/user.py
index 9feb03b..d06b5f4 100644
--- a/pagure/api/user.py
+++ b/pagure/api/user.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import collections
 import datetime
diff --git a/pagure/cli/admin.py b/pagure/cli/admin.py
index 215d8fc..99f368d 100644
--- a/pagure/cli/admin.py
+++ b/pagure/cli/admin.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import print_function, unicode_literals
+from __future__ import print_function, unicode_literals, absolute_import
 
 import argparse
 import datetime
diff --git a/pagure/config.py b/pagure/config.py
index fc7742a..b6563c4 100644
--- a/pagure/config.py
+++ b/pagure/config.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import os  # noqa: E402
 import flask  # noqa: E402
diff --git a/pagure/decorators.py b/pagure/decorators.py
index 8a17b84..bca63bf 100644
--- a/pagure/decorators.py
+++ b/pagure/decorators.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import flask
 from pagure.flask_app import admin_session_timedout
diff --git a/pagure/default_config.py b/pagure/default_config.py
index 5d9c209..481c05c 100644
--- a/pagure/default_config.py
+++ b/pagure/default_config.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import os
 from datetime import timedelta
diff --git a/pagure/doc_utils.py b/pagure/doc_utils.py
index a272175..021bc44 100644
--- a/pagure/doc_utils.py
+++ b/pagure/doc_utils.py
@@ -9,7 +9,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import docutils
 import docutils.core
diff --git a/pagure/docs_server.py b/pagure/docs_server.py
index e2b7636..3c923c5 100644
--- a/pagure/docs_server.py
+++ b/pagure/docs_server.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import logging
 import os
diff --git a/pagure/exceptions.py b/pagure/exceptions.py
index dcd569e..78677f4 100644
--- a/pagure/exceptions.py
+++ b/pagure/exceptions.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 
 class PagureException(Exception):
diff --git a/pagure/flask_app.py b/pagure/flask_app.py
index fb6c9a3..b52f366 100644
--- a/pagure/flask_app.py
+++ b/pagure/flask_app.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import datetime
 import gc
diff --git a/pagure/forms.py b/pagure/forms.py
index bd1efbe..f57eac2 100644
--- a/pagure/forms.py
+++ b/pagure/forms.py
@@ -12,7 +12,7 @@
 # pylint: disable=no-init
 # pylint: disable=super-on-old-class
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import datetime
 import re
diff --git a/pagure/hooks/__init__.py b/pagure/hooks/__init__.py
index 37fed8c..750391e 100644
--- a/pagure/hooks/__init__.py
+++ b/pagure/hooks/__init__.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import subprocess
 import sys
diff --git a/pagure/hooks/default.py b/pagure/hooks/default.py
index 5ea0fa9..b4fd7fe 100644
--- a/pagure/hooks/default.py
+++ b/pagure/hooks/default.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals, print_function
+from __future__ import unicode_literals, print_function, absolute_import
 
 import logging
 
diff --git a/pagure/hooks/fedmsg_hook.py b/pagure/hooks/fedmsg_hook.py
index c0ce4e6..5d5a7f8 100644
--- a/pagure/hooks/fedmsg_hook.py
+++ b/pagure/hooks/fedmsg_hook.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import sqlalchemy as sa
 import wtforms
diff --git a/pagure/hooks/files/hookrunner b/pagure/hooks/files/hookrunner
index 4edf6a2..0708665 100755
--- a/pagure/hooks/files/hookrunner
+++ b/pagure/hooks/files/hookrunner
@@ -8,6 +8,9 @@
    Patrick Uiterwijk <puiterwijk@redhat.com>
 
 """
+
+from __future__ import unicode_literals, absolute_import
+
 import os
 import sys
 # The following is only needed if you did not install pagure
diff --git a/pagure/hooks/files/repospannerhook b/pagure/hooks/files/repospannerhook
index 19e4e9b..f0aa8cd 100755
--- a/pagure/hooks/files/repospannerhook
+++ b/pagure/hooks/files/repospannerhook
@@ -8,7 +8,7 @@
    Patrick Uiterwijk <puiterwijk@redhat.com>
 
 """
-from __future__ import print_function
+from __future__ import print_function, absolute_import
 
 import os
 import sys
diff --git a/pagure/hooks/irc.py b/pagure/hooks/irc.py
index c51fa70..2725b31 100644
--- a/pagure/hooks/irc.py
+++ b/pagure/hooks/irc.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import sqlalchemy as sa
 import pygit2
diff --git a/pagure/hooks/mail.py b/pagure/hooks/mail.py
index b2a1a23..989990b 100644
--- a/pagure/hooks/mail.py
+++ b/pagure/hooks/mail.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import sqlalchemy as sa
 import os
diff --git a/pagure/hooks/mirror_hook.py b/pagure/hooks/mirror_hook.py
index 17bb79d..1a577b0 100644
--- a/pagure/hooks/mirror_hook.py
+++ b/pagure/hooks/mirror_hook.py
@@ -7,7 +7,7 @@
    Pierre-Yves Chibon <pingou@pingoured.fr>
 
 """
-
+from __future__ import unicode_literals, absolute_import
 
 import sqlalchemy as sa
 import wtforms
diff --git a/pagure/hooks/pagure_ci.py b/pagure/hooks/pagure_ci.py
index 0b37330..ee999a8 100644
--- a/pagure/hooks/pagure_ci.py
+++ b/pagure/hooks/pagure_ci.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import flask
 import sqlalchemy as sa
diff --git a/pagure/hooks/pagure_force_commit.py b/pagure/hooks/pagure_force_commit.py
index cf26cb6..ac69004 100644
--- a/pagure/hooks/pagure_force_commit.py
+++ b/pagure/hooks/pagure_force_commit.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import sqlalchemy as sa
 import wtforms
diff --git a/pagure/hooks/pagure_hook.py b/pagure/hooks/pagure_hook.py
index 7746709..eef463f 100644
--- a/pagure/hooks/pagure_hook.py
+++ b/pagure/hooks/pagure_hook.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import logging
 
diff --git a/pagure/hooks/pagure_no_new_branches.py b/pagure/hooks/pagure_no_new_branches.py
index 052044b..25ba02e 100644
--- a/pagure/hooks/pagure_no_new_branches.py
+++ b/pagure/hooks/pagure_no_new_branches.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import sqlalchemy as sa
 import wtforms
diff --git a/pagure/hooks/pagure_request_hook.py b/pagure/hooks/pagure_request_hook.py
index 7b9d233..776601a 100644
--- a/pagure/hooks/pagure_request_hook.py
+++ b/pagure/hooks/pagure_request_hook.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import sqlalchemy as sa
 import wtforms
diff --git a/pagure/hooks/pagure_ticket_hook.py b/pagure/hooks/pagure_ticket_hook.py
index eb48397..9bd6672 100644
--- a/pagure/hooks/pagure_ticket_hook.py
+++ b/pagure/hooks/pagure_ticket_hook.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import os
 
diff --git a/pagure/hooks/pagure_unsigned_commits.py b/pagure/hooks/pagure_unsigned_commits.py
index fcf9126..bc3668f 100644
--- a/pagure/hooks/pagure_unsigned_commits.py
+++ b/pagure/hooks/pagure_unsigned_commits.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import sqlalchemy as sa
 import wtforms
diff --git a/pagure/hooks/rtd.py b/pagure/hooks/rtd.py
index f575646..41b6d6f 100644
--- a/pagure/hooks/rtd.py
+++ b/pagure/hooks/rtd.py
@@ -9,7 +9,7 @@
 """
 
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import sqlalchemy as sa
 import requests
diff --git a/pagure/internal/__init__.py b/pagure/internal/__init__.py
index 976e2bb..5d9c6f4 100644
--- a/pagure/internal/__init__.py
+++ b/pagure/internal/__init__.py
@@ -10,7 +10,7 @@ Internal endpoints.
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import collections
 import logging
diff --git a/pagure/lib/git.py b/pagure/lib/git.py
index 82be06e..fd6846b 100644
--- a/pagure/lib/git.py
+++ b/pagure/lib/git.py
@@ -7,7 +7,7 @@
    Pierre-Yves Chibon <pingou@pingoured.fr>
 
 """
-from __future__ import print_function, unicode_literals
+from __future__ import print_function, unicode_literals, absolute_import
 
 # pylint: disable=too-many-branches
 # pylint: disable=too-many-arguments
diff --git a/pagure/lib/git_auth.py b/pagure/lib/git_auth.py
index dd7e182..abc6b70 100644
--- a/pagure/lib/git_auth.py
+++ b/pagure/lib/git_auth.py
@@ -7,7 +7,7 @@
    Pierre-Yves Chibon <pingou@pingoured.fr>
 
 """
-from __future__ import print_function, unicode_literals
+from __future__ import print_function, unicode_literals, absolute_import
 
 import abc
 import json
diff --git a/pagure/lib/lib_ci.py b/pagure/lib/lib_ci.py
index 76e8fed..bc3693d 100644
--- a/pagure/lib/lib_ci.py
+++ b/pagure/lib/lib_ci.py
@@ -10,7 +10,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 # pylint: disable=too-many-locals
 import logging
diff --git a/pagure/lib/link.py b/pagure/lib/link.py
index dc89116..c64fe82 100644
--- a/pagure/lib/link.py
+++ b/pagure/lib/link.py
@@ -10,7 +10,7 @@
 
 # pylint: disable=too-many-arguments
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import re
 import pagure.lib.query
diff --git a/pagure/lib/login.py b/pagure/lib/login.py
index 5f0f4a3..df45139 100644
--- a/pagure/lib/login.py
+++ b/pagure/lib/login.py
@@ -9,7 +9,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 try:
     # Provided in Python 3.6+
diff --git a/pagure/lib/mimetype.py b/pagure/lib/mimetype.py
index 5f83a36..44187c6 100644
--- a/pagure/lib/mimetype.py
+++ b/pagure/lib/mimetype.py
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import logging
 import mimetypes
diff --git a/pagure/lib/model.py b/pagure/lib/model.py
index 85e5695..c8bf00b 100644
--- a/pagure/lib/model.py
+++ b/pagure/lib/model.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ["SQLAlchemy >= 0.8", "jinja2 >= 2.4"]  # noqa
 import pkg_resources  # noqa: E402,F401
diff --git a/pagure/lib/model_base.py b/pagure/lib/model_base.py
index 1bc0a04..97b8969 100644
--- a/pagure/lib/model_base.py
+++ b/pagure/lib/model_base.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 from sqlalchemy import MetaData
 from sqlalchemy.ext.declarative import declarative_base
diff --git a/pagure/lib/notify.py b/pagure/lib/notify.py
index d1e9bb0..b89a2a5 100644
--- a/pagure/lib/notify.py
+++ b/pagure/lib/notify.py
@@ -8,7 +8,7 @@
 
 pagure notifications.
 """
-from __future__ import print_function, unicode_literals
+from __future__ import print_function, unicode_literals, absolute_import
 
 
 # pylint: disable=too-many-branches
diff --git a/pagure/lib/plugins.py b/pagure/lib/plugins.py
index 1859053..9f66848 100644
--- a/pagure/lib/plugins.py
+++ b/pagure/lib/plugins.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 from straight.plugin import load
 
diff --git a/pagure/lib/query.py b/pagure/lib/query.py
index 76be22d..e6234f7 100644
--- a/pagure/lib/query.py
+++ b/pagure/lib/query.py
@@ -9,7 +9,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 # pylint: disable=too-many-branches
 # pylint: disable=too-many-arguments
diff --git a/pagure/lib/repo.py b/pagure/lib/repo.py
index b4e64f4..968c077 100644
--- a/pagure/lib/repo.py
+++ b/pagure/lib/repo.py
@@ -7,7 +7,7 @@
    Pierre-Yves Chibon <pingou@pingoured.fr>
 
 """
-from __future__ import print_function, unicode_literals
+from __future__ import print_function, unicode_literals, absolute_import
 
 import logging
 
diff --git a/pagure/lib/tasks.py b/pagure/lib/tasks.py
index dc6ea36..211d77d 100644
--- a/pagure/lib/tasks.py
+++ b/pagure/lib/tasks.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import collections
 import datetime
diff --git a/pagure/lib/tasks_mirror.py b/pagure/lib/tasks_mirror.py
index fea834e..2f9bd7c 100644
--- a/pagure/lib/tasks_mirror.py
+++ b/pagure/lib/tasks_mirror.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import base64
 import logging
diff --git a/pagure/lib/tasks_services.py b/pagure/lib/tasks_services.py
index 1a8c0f3..6a30446 100644
--- a/pagure/lib/tasks_services.py
+++ b/pagure/lib/tasks_services.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import datetime
 import hashlib
diff --git a/pagure/lib/tasks_utils.py b/pagure/lib/tasks_utils.py
index c71ec52..9e224d9 100644
--- a/pagure/lib/tasks_utils.py
+++ b/pagure/lib/tasks_utils.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import gc
 from functools import wraps
diff --git a/pagure/login_forms.py b/pagure/login_forms.py
index 63dab4c..2cd8d5c 100644
--- a/pagure/login_forms.py
+++ b/pagure/login_forms.py
@@ -20,7 +20,7 @@
 # pylint: disable=no-init
 
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import wtforms
 
diff --git a/pagure/mail_logging.py b/pagure/mail_logging.py
index b85eb3c..449fc63 100644
--- a/pagure/mail_logging.py
+++ b/pagure/mail_logging.py
@@ -23,7 +23,7 @@
 Mail handler for logging.
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import logging
 import logging.handlers
diff --git a/pagure/perfrepo.py b/pagure/perfrepo.py
index 2e4d39f..e351312 100644
--- a/pagure/perfrepo.py
+++ b/pagure/perfrepo.py
@@ -9,7 +9,7 @@
 
 """
 
-from __future__ import print_function, unicode_literals
+from __future__ import print_function, unicode_literals, absolute_import
 
 
 import pprint
diff --git a/pagure/pfmarkdown.py b/pagure/pfmarkdown.py
index 6e5355d..b0c5bc6 100644
--- a/pagure/pfmarkdown.py
+++ b/pagure/pfmarkdown.py
@@ -19,7 +19,7 @@ Author: Ralph Bean <rbean@redhat.com>
         Pierre-Yves Chibon <pingou@pingoured.fr>
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import flask
 
diff --git a/pagure/proxy.py b/pagure/proxy.py
index 3cacdbe..6b588b0 100644
--- a/pagure/proxy.py
+++ b/pagure/proxy.py
@@ -26,7 +26,7 @@ redirects are using ``https``.
 Source: http://flask.pocoo.org/snippets/35/ by Peter Hansen
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 
 class ReverseProxied(object):  # pragma: no cover
diff --git a/pagure/ui/__init__.py b/pagure/ui/__init__.py
index 8d40d07..ec64735 100644
--- a/pagure/ui/__init__.py
+++ b/pagure/ui/__init__.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import flask
 
diff --git a/pagure/ui/app.py b/pagure/ui/app.py
index 374fd2b..4b2818c 100644
--- a/pagure/ui/app.py
+++ b/pagure/ui/app.py
@@ -9,7 +9,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import datetime
 import logging
diff --git a/pagure/ui/clone.py b/pagure/ui/clone.py
index ce19e50..9fe5ffc 100644
--- a/pagure/ui/clone.py
+++ b/pagure/ui/clone.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import logging
 import subprocess
diff --git a/pagure/ui/fas_login.py b/pagure/ui/fas_login.py
index a9d55ea..0f2cba7 100644
--- a/pagure/ui/fas_login.py
+++ b/pagure/ui/fas_login.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import logging
 
diff --git a/pagure/ui/filters.py b/pagure/ui/filters.py
index f7cb6c1..51c6c22 100644
--- a/pagure/ui/filters.py
+++ b/pagure/ui/filters.py
@@ -13,7 +13,7 @@
 # pylint: disable=too-many-locals
 
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import textwrap
 import logging
diff --git a/pagure/ui/fork.py b/pagure/ui/fork.py
index d26dd66..2b9231f 100644
--- a/pagure/ui/fork.py
+++ b/pagure/ui/fork.py
@@ -16,7 +16,7 @@
 # pylint: disable=too-many-lines
 
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import logging
 import os
diff --git a/pagure/ui/groups.py b/pagure/ui/groups.py
index bcb023e..b845c23 100644
--- a/pagure/ui/groups.py
+++ b/pagure/ui/groups.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import logging
 
diff --git a/pagure/ui/issues.py b/pagure/ui/issues.py
index 63de12b..dd2bed7 100644
--- a/pagure/ui/issues.py
+++ b/pagure/ui/issues.py
@@ -14,7 +14,7 @@
 # pylint: disable=too-many-statements
 
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import datetime
 import logging
diff --git a/pagure/ui/login.py b/pagure/ui/login.py
index 2babfa4..e5be27c 100644
--- a/pagure/ui/login.py
+++ b/pagure/ui/login.py
@@ -9,7 +9,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import datetime
 import logging
diff --git a/pagure/ui/oidc_login.py b/pagure/ui/oidc_login.py
index e05ecbe..eba73e8 100644
--- a/pagure/ui/oidc_login.py
+++ b/pagure/ui/oidc_login.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import logging
 
diff --git a/pagure/ui/plugins.py b/pagure/ui/plugins.py
index 72d92b8..feed3d3 100644
--- a/pagure/ui/plugins.py
+++ b/pagure/ui/plugins.py
@@ -11,7 +11,7 @@
 
 # pylint: disable=too-many-branches
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import logging
 
diff --git a/pagure/ui/repo.py b/pagure/ui/repo.py
index b6e717c..bc95201 100644
--- a/pagure/ui/repo.py
+++ b/pagure/ui/repo.py
@@ -17,7 +17,7 @@
 # pylint: disable=broad-except
 
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import datetime
 import json
diff --git a/pagure/utils.py b/pagure/utils.py
index 719831f..45c6d14 100644
--- a/pagure/utils.py
+++ b/pagure/utils.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import logging
 import logging.config
diff --git a/rundocserver.py b/rundocserver.py
index 0e397e5..55b162d 100755
--- a/rundocserver.py
+++ b/rundocserver.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 # These two lines are needed to run on EL6
 __requires__ = ['SQLAlchemy >= 0.8', 'jinja2 >= 2.4']
diff --git a/runserver.py b/runserver.py
index 70676bb..f06f34a 100755
--- a/runserver.py
+++ b/runserver.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 # These two lines are needed to run on EL6
 __requires__ = ['SQLAlchemy >= 0.8', 'jinja2 >= 2.4']
diff --git a/runtests.py b/runtests.py
index 0adc49b..7e25ee6 100755
--- a/runtests.py
+++ b/runtests.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python3
 
-from __future__ import print_function, unicode_literals
+from __future__ import print_function, unicode_literals, absolute_import
 
 import argparse
 import coverage
diff --git a/runworker.py b/runworker.py
index c5c88fa..83ad7e5 100755
--- a/runworker.py
+++ b/runworker.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 # These two lines are needed to run on EL6
 __requires__ = ['SQLAlchemy >= 0.8', 'jinja2 >= 2.4']
diff --git a/tests/__init__.py b/tests/__init__.py
index 101530e..b9776ba 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.7']
 import pkg_resources
diff --git a/tests/test_alembic.py b/tests/test_alembic.py
index b05bb0b..f5614a0 100644
--- a/tests/test_alembic.py
+++ b/tests/test_alembic.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import os
 import subprocess
diff --git a/tests/test_fnmatch.py b/tests/test_fnmatch.py
index d554714..e8732b1 100644
--- a/tests/test_fnmatch.py
+++ b/tests/test_fnmatch.py
@@ -12,7 +12,7 @@ elsewhere in the code.
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import os
 import sys
diff --git a/tests/test_pagure_admin.py b/tests/test_pagure_admin.py
index e5270a8..3d5c650 100644
--- a/tests/test_pagure_admin.py
+++ b/tests/test_pagure_admin.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources  # noqa
diff --git a/tests/test_pagure_exclude_group_index.py b/tests/test_pagure_exclude_group_index.py
index fff1bac..a4324f1 100644
--- a/tests/test_pagure_exclude_group_index.py
+++ b/tests/test_pagure_exclude_group_index.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask.py b/tests/test_pagure_flask.py
index b1a7089..6972c0f 100644
--- a/tests/test_pagure_flask.py
+++ b/tests/test_pagure_flask.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_api.py b/tests/test_pagure_flask_api.py
index f22a1e6..657cedc 100644
--- a/tests/test_pagure_flask_api.py
+++ b/tests/test_pagure_flask_api.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_api_auth.py b/tests/test_pagure_flask_api_auth.py
index d810748..f414439 100644
--- a/tests/test_pagure_flask_api_auth.py
+++ b/tests/test_pagure_flask_api_auth.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_api_fork.py b/tests/test_pagure_flask_api_fork.py
index 59cc74b..8aa18fa 100644
--- a/tests/test_pagure_flask_api_fork.py
+++ b/tests/test_pagure_flask_api_fork.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_api_group.py b/tests/test_pagure_flask_api_group.py
index f06022a..d8353a5 100644
--- a/tests/test_pagure_flask_api_group.py
+++ b/tests/test_pagure_flask_api_group.py
@@ -9,7 +9,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import unittest
diff --git a/tests/test_pagure_flask_api_issue.py b/tests/test_pagure_flask_api_issue.py
index 39290ea..22ed2a0 100644
--- a/tests/test_pagure_flask_api_issue.py
+++ b/tests/test_pagure_flask_api_issue.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_api_issue_change_status.py b/tests/test_pagure_flask_api_issue_change_status.py
index 3840051..a3056ea 100644
--- a/tests/test_pagure_flask_api_issue_change_status.py
+++ b/tests/test_pagure_flask_api_issue_change_status.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_api_issue_comment.py b/tests/test_pagure_flask_api_issue_comment.py
index 2ccf301..4571d9f 100644
--- a/tests/test_pagure_flask_api_issue_comment.py
+++ b/tests/test_pagure_flask_api_issue_comment.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 
 import datetime
diff --git a/tests/test_pagure_flask_api_issue_create.py b/tests/test_pagure_flask_api_issue_create.py
index 8247033..a65ace9 100644
--- a/tests/test_pagure_flask_api_issue_create.py
+++ b/tests/test_pagure_flask_api_issue_create.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import datetime
 import unittest
diff --git a/tests/test_pagure_flask_api_issue_custom_fields.py b/tests/test_pagure_flask_api_issue_custom_fields.py
index ab876be..dc2611b 100644
--- a/tests/test_pagure_flask_api_issue_custom_fields.py
+++ b/tests/test_pagure_flask_api_issue_custom_fields.py
@@ -6,7 +6,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import unittest
 import sys
diff --git a/tests/test_pagure_flask_api_pr_flag.py b/tests/test_pagure_flask_api_pr_flag.py
index 20ff1fc..599e26c 100644
--- a/tests/test_pagure_flask_api_pr_flag.py
+++ b/tests/test_pagure_flask_api_pr_flag.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import unittest
 import sys
diff --git a/tests/test_pagure_flask_api_project.py b/tests/test_pagure_flask_api_project.py
index 555e9ac..190d8d4 100644
--- a/tests/test_pagure_flask_api_project.py
+++ b/tests/test_pagure_flask_api_project.py
@@ -9,7 +9,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_api_project_update_watch.py b/tests/test_pagure_flask_api_project_update_watch.py
index 3ac3495..db3bdea 100644
--- a/tests/test_pagure_flask_api_project_update_watch.py
+++ b/tests/test_pagure_flask_api_project_update_watch.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_api_ui_private_repo.py b/tests/test_pagure_flask_api_ui_private_repo.py
index 3e7c3cf..6829655 100644
--- a/tests/test_pagure_flask_api_ui_private_repo.py
+++ b/tests/test_pagure_flask_api_ui_private_repo.py
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_api_user.py b/tests/test_pagure_flask_api_user.py
index f04a055..59ae575 100644
--- a/tests/test_pagure_flask_api_user.py
+++ b/tests/test_pagure_flask_api_user.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_docs.py b/tests/test_pagure_flask_docs.py
index 829f2e3..e95c401 100644
--- a/tests/test_pagure_flask_docs.py
+++ b/tests/test_pagure_flask_docs.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_dump_load_ticket.py b/tests/test_pagure_flask_dump_load_ticket.py
index 6e96674..b0e8812 100644
--- a/tests/test_pagure_flask_dump_load_ticket.py
+++ b/tests/test_pagure_flask_dump_load_ticket.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_form.py b/tests/test_pagure_flask_form.py
index 586aa5c..f454437 100644
--- a/tests/test_pagure_flask_form.py
+++ b/tests/test_pagure_flask_form.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_internal.py b/tests/test_pagure_flask_internal.py
index 837f779..437391c 100644
--- a/tests/test_pagure_flask_internal.py
+++ b/tests/test_pagure_flask_internal.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_rebase.py b/tests/test_pagure_flask_rebase.py
index 4591b23..ba2e368 100644
--- a/tests/test_pagure_flask_rebase.py
+++ b/tests/test_pagure_flask_rebase.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_app.py b/tests/test_pagure_flask_ui_app.py
index f3d9924..30ce3c3 100644
--- a/tests/test_pagure_flask_ui_app.py
+++ b/tests/test_pagure_flask_ui_app.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_app_browse.py b/tests/test_pagure_flask_ui_app_browse.py
index d62db00..8abf858 100644
--- a/tests/test_pagure_flask_ui_app_browse.py
+++ b/tests/test_pagure_flask_ui_app_browse.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_app_give_project.py b/tests/test_pagure_flask_ui_app_give_project.py
index 1a24b1f..63cb638 100644
--- a/tests/test_pagure_flask_ui_app_give_project.py
+++ b/tests/test_pagure_flask_ui_app_give_project.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_app_index.py b/tests/test_pagure_flask_ui_app_index.py
index 09e2fea..6d6ef8d 100644
--- a/tests/test_pagure_flask_ui_app_index.py
+++ b/tests/test_pagure_flask_ui_app_index.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_app_userdash.py b/tests/test_pagure_flask_ui_app_userdash.py
index a9f5a48..ca2e540 100644
--- a/tests/test_pagure_flask_ui_app_userdash.py
+++ b/tests/test_pagure_flask_ui_app_userdash.py
@@ -8,7 +8,7 @@
    Ryan Lerch <rlerch@redhat.com>
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_archives.py b/tests/test_pagure_flask_ui_archives.py
index 3755421..1b31a87 100644
--- a/tests/test_pagure_flask_ui_archives.py
+++ b/tests/test_pagure_flask_ui_archives.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import unittest
 import sys
diff --git a/tests/test_pagure_flask_ui_clone.py b/tests/test_pagure_flask_ui_clone.py
index 73f3486..7447593 100644
--- a/tests/test_pagure_flask_ui_clone.py
+++ b/tests/test_pagure_flask_ui_clone.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_fork.py b/tests/test_pagure_flask_ui_fork.py
index 3ac12ab..4bb267e 100644
--- a/tests/test_pagure_flask_ui_fork.py
+++ b/tests/test_pagure_flask_ui_fork.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_groups.py b/tests/test_pagure_flask_ui_groups.py
index 5833985..48b4e3c 100644
--- a/tests/test_pagure_flask_ui_groups.py
+++ b/tests/test_pagure_flask_ui_groups.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_issue_pr_link.py b/tests/test_pagure_flask_ui_issue_pr_link.py
index e21b297..5b85bd7 100644
--- a/tests/test_pagure_flask_ui_issue_pr_link.py
+++ b/tests/test_pagure_flask_ui_issue_pr_link.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_issues.py b/tests/test_pagure_flask_ui_issues.py
index 52891c0..6f32620 100644
--- a/tests/test_pagure_flask_ui_issues.py
+++ b/tests/test_pagure_flask_ui_issues.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_issues_acl_checks.py b/tests/test_pagure_flask_ui_issues_acl_checks.py
index 29450aa..65bb975 100644
--- a/tests/test_pagure_flask_ui_issues_acl_checks.py
+++ b/tests/test_pagure_flask_ui_issues_acl_checks.py
@@ -9,7 +9,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_issues_open_access.py b/tests/test_pagure_flask_ui_issues_open_access.py
index 3f28ea6..ccc3a1f 100644
--- a/tests/test_pagure_flask_ui_issues_open_access.py
+++ b/tests/test_pagure_flask_ui_issues_open_access.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_issues_private.py b/tests/test_pagure_flask_ui_issues_private.py
index bb1ed09..8e1b625 100644
--- a/tests/test_pagure_flask_ui_issues_private.py
+++ b/tests/test_pagure_flask_ui_issues_private.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import unittest
 import sys
diff --git a/tests/test_pagure_flask_ui_issues_read_only.py b/tests/test_pagure_flask_ui_issues_read_only.py
index 6bf58aa..61f65af 100644
--- a/tests/test_pagure_flask_ui_issues_read_only.py
+++ b/tests/test_pagure_flask_ui_issues_read_only.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import json
 import unittest
diff --git a/tests/test_pagure_flask_ui_issues_templates.py b/tests/test_pagure_flask_ui_issues_templates.py
index 56f0e18..442bbbe 100644
--- a/tests/test_pagure_flask_ui_issues_templates.py
+++ b/tests/test_pagure_flask_ui_issues_templates.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_login.py b/tests/test_pagure_flask_ui_login.py
index d1d825a..25331e1 100644
--- a/tests/test_pagure_flask_ui_login.py
+++ b/tests/test_pagure_flask_ui_login.py
@@ -9,7 +9,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_no_master_branch.py b/tests/test_pagure_flask_ui_no_master_branch.py
index 83c9ccd..6c93ac8 100644
--- a/tests/test_pagure_flask_ui_no_master_branch.py
+++ b/tests/test_pagure_flask_ui_no_master_branch.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_old_commit.py b/tests/test_pagure_flask_ui_old_commit.py
index 2b0ccf8..6eec80a 100644
--- a/tests/test_pagure_flask_ui_old_commit.py
+++ b/tests/test_pagure_flask_ui_old_commit.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import unittest
diff --git a/tests/test_pagure_flask_ui_plugins.py b/tests/test_pagure_flask_ui_plugins.py
index 203ea46..88e3cfd 100644
--- a/tests/test_pagure_flask_ui_plugins.py
+++ b/tests/test_pagure_flask_ui_plugins.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 
diff --git a/tests/test_pagure_flask_ui_plugins_default_hook.py b/tests/test_pagure_flask_ui_plugins_default_hook.py
index 2c9eb6d..10336d8 100644
--- a/tests/test_pagure_flask_ui_plugins_default_hook.py
+++ b/tests/test_pagure_flask_ui_plugins_default_hook.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_plugins_fedmsg.py b/tests/test_pagure_flask_ui_plugins_fedmsg.py
index 2bd48c4..a65607e 100644
--- a/tests/test_pagure_flask_ui_plugins_fedmsg.py
+++ b/tests/test_pagure_flask_ui_plugins_fedmsg.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 
diff --git a/tests/test_pagure_flask_ui_plugins_irc.py b/tests/test_pagure_flask_ui_plugins_irc.py
index 69f0cf7..2dd8880 100644
--- a/tests/test_pagure_flask_ui_plugins_irc.py
+++ b/tests/test_pagure_flask_ui_plugins_irc.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import unittest
diff --git a/tests/test_pagure_flask_ui_plugins_mail.py b/tests/test_pagure_flask_ui_plugins_mail.py
index f141ae7..b3443db 100644
--- a/tests/test_pagure_flask_ui_plugins_mail.py
+++ b/tests/test_pagure_flask_ui_plugins_mail.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 
diff --git a/tests/test_pagure_flask_ui_plugins_mirror.py b/tests/test_pagure_flask_ui_plugins_mirror.py
index 48c7f9c..58a08e3 100644
--- a/tests/test_pagure_flask_ui_plugins_mirror.py
+++ b/tests/test_pagure_flask_ui_plugins_mirror.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 
diff --git a/tests/test_pagure_flask_ui_plugins_noff.py b/tests/test_pagure_flask_ui_plugins_noff.py
index cc117c3..833944c 100644
--- a/tests/test_pagure_flask_ui_plugins_noff.py
+++ b/tests/test_pagure_flask_ui_plugins_noff.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 
diff --git a/tests/test_pagure_flask_ui_plugins_pagure_ci.py b/tests/test_pagure_flask_ui_plugins_pagure_ci.py
index 59717f0..cd2c6b0 100644
--- a/tests/test_pagure_flask_ui_plugins_pagure_ci.py
+++ b/tests/test_pagure_flask_ui_plugins_pagure_ci.py
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 
diff --git a/tests/test_pagure_flask_ui_plugins_pagure_hook.py b/tests/test_pagure_flask_ui_plugins_pagure_hook.py
index aed7e7e..9aa235b 100644
--- a/tests/test_pagure_flask_ui_plugins_pagure_hook.py
+++ b/tests/test_pagure_flask_ui_plugins_pagure_hook.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 
diff --git a/tests/test_pagure_flask_ui_plugins_pagure_no_new_branch.py b/tests/test_pagure_flask_ui_plugins_pagure_no_new_branch.py
index 4c4be51..2b7e59c 100644
--- a/tests/test_pagure_flask_ui_plugins_pagure_no_new_branch.py
+++ b/tests/test_pagure_flask_ui_plugins_pagure_no_new_branch.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 
diff --git a/tests/test_pagure_flask_ui_plugins_pagure_request_hook.py b/tests/test_pagure_flask_ui_plugins_pagure_request_hook.py
index 03dddc4..510b3a2 100644
--- a/tests/test_pagure_flask_ui_plugins_pagure_request_hook.py
+++ b/tests/test_pagure_flask_ui_plugins_pagure_request_hook.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 
diff --git a/tests/test_pagure_flask_ui_plugins_pagure_ticket_hook.py b/tests/test_pagure_flask_ui_plugins_pagure_ticket_hook.py
index 9b5e309..24270df 100644
--- a/tests/test_pagure_flask_ui_plugins_pagure_ticket_hook.py
+++ b/tests/test_pagure_flask_ui_plugins_pagure_ticket_hook.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 
diff --git a/tests/test_pagure_flask_ui_plugins_rtd_hook.py b/tests/test_pagure_flask_ui_plugins_rtd_hook.py
index 60507c4..a2cbec9 100644
--- a/tests/test_pagure_flask_ui_plugins_rtd_hook.py
+++ b/tests/test_pagure_flask_ui_plugins_rtd_hook.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import unittest
diff --git a/tests/test_pagure_flask_ui_plugins_unsigned.py b/tests/test_pagure_flask_ui_plugins_unsigned.py
index 34ba5e8..3f1c2e9 100644
--- a/tests/test_pagure_flask_ui_plugins_unsigned.py
+++ b/tests/test_pagure_flask_ui_plugins_unsigned.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 
diff --git a/tests/test_pagure_flask_ui_pr_no_sources.py b/tests/test_pagure_flask_ui_pr_no_sources.py
index 70a9962..98076b3 100644
--- a/tests/test_pagure_flask_ui_pr_no_sources.py
+++ b/tests/test_pagure_flask_ui_pr_no_sources.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_priorities.py b/tests/test_pagure_flask_ui_priorities.py
index aaa1088..7317d8a 100644
--- a/tests/test_pagure_flask_ui_priorities.py
+++ b/tests/test_pagure_flask_ui_priorities.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_quick_reply.py b/tests/test_pagure_flask_ui_quick_reply.py
index 99870b6..b699f3f 100644
--- a/tests/test_pagure_flask_ui_quick_reply.py
+++ b/tests/test_pagure_flask_ui_quick_reply.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import mock
 import os
diff --git a/tests/test_pagure_flask_ui_remote_pr.py b/tests/test_pagure_flask_ui_remote_pr.py
index 3482d98..aebe952 100644
--- a/tests/test_pagure_flask_ui_remote_pr.py
+++ b/tests/test_pagure_flask_ui_remote_pr.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_repo.py b/tests/test_pagure_flask_ui_repo.py
index 6f5e935..bdf9618 100644
--- a/tests/test_pagure_flask_ui_repo.py
+++ b/tests/test_pagure_flask_ui_repo.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_repo_delete_project.py b/tests/test_pagure_flask_ui_repo_delete_project.py
index e17ec5e..0e53ddb 100644
--- a/tests/test_pagure_flask_ui_repo_delete_project.py
+++ b/tests/test_pagure_flask_ui_repo_delete_project.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_repo_flag_commit.py b/tests/test_pagure_flask_ui_repo_flag_commit.py
index 71225b2..48f6b04 100644
--- a/tests/test_pagure_flask_ui_repo_flag_commit.py
+++ b/tests/test_pagure_flask_ui_repo_flag_commit.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import unittest
 import sys
diff --git a/tests/test_pagure_flask_ui_repo_milestones.py b/tests/test_pagure_flask_ui_repo_milestones.py
index d657aba..69dba94 100644
--- a/tests/test_pagure_flask_ui_repo_milestones.py
+++ b/tests/test_pagure_flask_ui_repo_milestones.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_repo_slash_name.py b/tests/test_pagure_flask_ui_repo_slash_name.py
index 414790e..4f228ee 100644
--- a/tests/test_pagure_flask_ui_repo_slash_name.py
+++ b/tests/test_pagure_flask_ui_repo_slash_name.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_repo_view_file.py b/tests/test_pagure_flask_ui_repo_view_file.py
index e035b89..7330024 100644
--- a/tests/test_pagure_flask_ui_repo_view_file.py
+++ b/tests/test_pagure_flask_ui_repo_view_file.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import unittest
 import sys
diff --git a/tests/test_pagure_flask_ui_roadmap.py b/tests/test_pagure_flask_ui_roadmap.py
index 2c9d941..238a43a 100644
--- a/tests/test_pagure_flask_ui_roadmap.py
+++ b/tests/test_pagure_flask_ui_roadmap.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_slash_branch_name.py b/tests/test_pagure_flask_ui_slash_branch_name.py
index ae3675c..585aff7 100644
--- a/tests/test_pagure_flask_ui_slash_branch_name.py
+++ b/tests/test_pagure_flask_ui_slash_branch_name.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_ui_star_project.py b/tests/test_pagure_flask_ui_star_project.py
index e9b4800..a28716f 100644
--- a/tests/test_pagure_flask_ui_star_project.py
+++ b/tests/test_pagure_flask_ui_star_project.py
@@ -9,7 +9,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_flask_util.py b/tests/test_pagure_flask_util.py
index da18950..268e436 100644
--- a/tests/test_pagure_flask_util.py
+++ b/tests/test_pagure_flask_util.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_hooks_pagure_hook.py b/tests/test_pagure_hooks_pagure_hook.py
index aa768ef..5a90c44 100644
--- a/tests/test_pagure_hooks_pagure_hook.py
+++ b/tests/test_pagure_hooks_pagure_hook.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import unittest
 import sys
diff --git a/tests/test_pagure_lib.py b/tests/test_pagure_lib.py
index f791e4d..67927e7 100644
--- a/tests/test_pagure_lib.py
+++ b/tests/test_pagure_lib.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_lib_add_user_to_project.py b/tests/test_pagure_lib_add_user_to_project.py
index ea491ad..2cafdaa 100644
--- a/tests/test_pagure_lib_add_user_to_project.py
+++ b/tests/test_pagure_lib_add_user_to_project.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import unittest
 import sys
diff --git a/tests/test_pagure_lib_drop_issue.py b/tests/test_pagure_lib_drop_issue.py
index fec9659..d594766 100644
--- a/tests/test_pagure_lib_drop_issue.py
+++ b/tests/test_pagure_lib_drop_issue.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_lib_encoding_utils.py b/tests/test_pagure_lib_encoding_utils.py
index d92a02b..4fc7d8f 100644
--- a/tests/test_pagure_lib_encoding_utils.py
+++ b/tests/test_pagure_lib_encoding_utils.py
@@ -3,7 +3,7 @@
 Tests for :module:`pagure.lib.encoding_utils`.
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import chardet
 import os
diff --git a/tests/test_pagure_lib_git.py b/tests/test_pagure_lib_git.py
index 711cf43..f4d61bf 100644
--- a/tests/test_pagure_lib_git.py
+++ b/tests/test_pagure_lib_git.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 
diff --git a/tests/test_pagure_lib_git_auth.py b/tests/test_pagure_lib_git_auth.py
index 937a6d3..5f69085 100644
--- a/tests/test_pagure_lib_git_auth.py
+++ b/tests/test_pagure_lib_git_auth.py
@@ -9,7 +9,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 
diff --git a/tests/test_pagure_lib_git_diff_pr.py b/tests/test_pagure_lib_git_diff_pr.py
index 1b8d7e7..ab492a6 100644
--- a/tests/test_pagure_lib_git_diff_pr.py
+++ b/tests/test_pagure_lib_git_diff_pr.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources  # noqa
diff --git a/tests/test_pagure_lib_git_get_tags_objects.py b/tests/test_pagure_lib_git_get_tags_objects.py
index 23ec107..a3ccb06 100644
--- a/tests/test_pagure_lib_git_get_tags_objects.py
+++ b/tests/test_pagure_lib_git_get_tags_objects.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import unittest
 import sys
diff --git a/tests/test_pagure_lib_git_mirror_project.py b/tests/test_pagure_lib_git_mirror_project.py
index 4540e32..9788e0c 100644
--- a/tests/test_pagure_lib_git_mirror_project.py
+++ b/tests/test_pagure_lib_git_mirror_project.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 
diff --git a/tests/test_pagure_lib_gitolite_config.py b/tests/test_pagure_lib_gitolite_config.py
index da4a106..0ec7a13 100644
--- a/tests/test_pagure_lib_gitolite_config.py
+++ b/tests/test_pagure_lib_gitolite_config.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 
diff --git a/tests/test_pagure_lib_link.py b/tests/test_pagure_lib_link.py
index cb7df6e..c7d0c30 100644
--- a/tests/test_pagure_lib_link.py
+++ b/tests/test_pagure_lib_link.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_lib_login.py b/tests/test_pagure_lib_login.py
index c8a13d1..2be4b8c 100644
--- a/tests/test_pagure_lib_login.py
+++ b/tests/test_pagure_lib_login.py
@@ -9,7 +9,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_lib_mimetype.py b/tests/test_pagure_lib_mimetype.py
index fbaffe3..b96ac14 100644
--- a/tests/test_pagure_lib_mimetype.py
+++ b/tests/test_pagure_lib_mimetype.py
@@ -3,7 +3,7 @@
 Tests for :module:`pagure.lib.mimetype`.
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import os
 import unittest
diff --git a/tests/test_pagure_lib_model.py b/tests/test_pagure_lib_model.py
index f00e2ad..3376cc9 100644
--- a/tests/test_pagure_lib_model.py
+++ b/tests/test_pagure_lib_model.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_lib_model_delete_project.py b/tests/test_pagure_lib_model_delete_project.py
index 91fb4a4..b5f41fc 100644
--- a/tests/test_pagure_lib_model_delete_project.py
+++ b/tests/test_pagure_lib_model_delete_project.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_lib_notify.py b/tests/test_pagure_lib_notify.py
index 4ec6cca..60b41f1 100644
--- a/tests/test_pagure_lib_notify.py
+++ b/tests/test_pagure_lib_notify.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_lib_notify_email.py b/tests/test_pagure_lib_notify_email.py
index 377ff42..85846ee 100644
--- a/tests/test_pagure_lib_notify_email.py
+++ b/tests/test_pagure_lib_notify_email.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import unittest
 import sys
diff --git a/tests/test_pagure_lib_plugins.py b/tests/test_pagure_lib_plugins.py
index b6a174b..56124f5 100644
--- a/tests/test_pagure_lib_plugins.py
+++ b/tests/test_pagure_lib_plugins.py
@@ -7,7 +7,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_lib_star_project.py b/tests/test_pagure_lib_star_project.py
index 3150b8a..673f3f8 100644
--- a/tests/test_pagure_lib_star_project.py
+++ b/tests/test_pagure_lib_star_project.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_lib_task_mirror.py b/tests/test_pagure_lib_task_mirror.py
index 1751eab..bf0c3d5 100644
--- a/tests/test_pagure_lib_task_mirror.py
+++ b/tests/test_pagure_lib_task_mirror.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import datetime
 import os
diff --git a/tests/test_pagure_lib_task_services.py b/tests/test_pagure_lib_task_services.py
index 3060811..77c32f4 100644
--- a/tests/test_pagure_lib_task_services.py
+++ b/tests/test_pagure_lib_task_services.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import datetime
 import os
diff --git a/tests/test_pagure_lib_watch_list.py b/tests/test_pagure_lib_watch_list.py
index b351495..ab50796 100644
--- a/tests/test_pagure_lib_watch_list.py
+++ b/tests/test_pagure_lib_watch_list.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_merge_pr_no_fork.py b/tests/test_pagure_merge_pr_no_fork.py
index cc7b4d0..241d774 100644
--- a/tests/test_pagure_merge_pr_no_fork.py
+++ b/tests/test_pagure_merge_pr_no_fork.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 
 import unittest
diff --git a/tests/test_pagure_repospanner.py b/tests/test_pagure_repospanner.py
index d8f288a..906c8a1 100644
--- a/tests/test_pagure_repospanner.py
+++ b/tests/test_pagure_repospanner.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pagure_utils.py b/tests/test_pagure_utils.py
index b9045b1..bd1677f 100644
--- a/tests/test_pagure_utils.py
+++ b/tests/test_pagure_utils.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 __requires__ = ['SQLAlchemy >= 0.8']
 import pkg_resources
diff --git a/tests/test_pfmarkdown.py b/tests/test_pfmarkdown.py
index f232f56..754c475 100644
--- a/tests/test_pfmarkdown.py
+++ b/tests/test_pfmarkdown.py
@@ -1,5 +1,5 @@
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import unittest
 from xml.etree import ElementTree
diff --git a/tests/test_stream_server.py b/tests/test_stream_server.py
index 5c4a37a..d94d5d0 100644
--- a/tests/test_stream_server.py
+++ b/tests/test_stream_server.py
@@ -14,7 +14,7 @@ Tests for the Pagure streaming server.
 # obviously this is fine for testing.
 # pylint: disable=locally-disabled, protected-access
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import logging
 import os
diff --git a/tests/test_style.py b/tests/test_style.py
index 6d63a22..31e5fa3 100644
--- a/tests/test_style.py
+++ b/tests/test_style.py
@@ -11,7 +11,7 @@ Tests for flake8 compliance of the code
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import os
 import subprocess
diff --git a/tests/test_tasks.py b/tests/test_tasks.py
index a4b1335..ef9fd93 100644
--- a/tests/test_tasks.py
+++ b/tests/test_tasks.py
@@ -1,3 +1,6 @@
+
+from __future__ import unicode_literals, absolute_import
+
 from mock import patch, MagicMock, Mock
 from collections import namedtuple
 import os
diff --git a/utils/perfplugin.py b/utils/perfplugin.py
index c818485..4f8137d 100644
--- a/utils/perfplugin.py
+++ b/utils/perfplugin.py
@@ -8,7 +8,7 @@
 
 """
 
-from __future__ import unicode_literals
+from __future__ import unicode_literals, absolute_import
 
 import logging
 import os

From d9e6bcd56623ccc8b2f4e2ed879527eaf06b41c4 Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Dec 20 2018 15:00:15 +0000
Subject: [PATCH 2/9] Drop the in-code requirements for SQLAlchemy >= 0.8


This is covered in the requirements.txt and anyway all the plateform
we run on have a newer version.

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/createdb.py b/createdb.py
index ca66288..f8a166e 100644
--- a/createdb.py
+++ b/createdb.py
@@ -2,10 +2,6 @@
 
 from __future__ import print_function, unicode_literals, absolute_import
 
-# These two lines are needed to run on EL6
-__requires__ = ['SQLAlchemy >= 0.8', 'jinja2 >= 2.4']
-import pkg_resources  # noqa
-
 import argparse
 import sys
 import os
diff --git a/nosetests b/nosetests
index 646c4db..fdaf2bc 100755
--- a/nosetests
+++ b/nosetests
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 # EASY-INSTALL-ENTRY-SCRIPT: 'nose==0.10.4','console_scripts','nosetests'
-__requires__ = ['nose>=0.10.4', 'SQLAlchemy >= 0.7', 'jinja2 >= 2.4']
+__requires__ = ['nose>=0.10.4']
 import sys
 from pkg_resources import load_entry_point
 
diff --git a/pagure/lib/model.py b/pagure/lib/model.py
index c8bf00b..793da43 100644
--- a/pagure/lib/model.py
+++ b/pagure/lib/model.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ["SQLAlchemy >= 0.8", "jinja2 >= 2.4"]  # noqa
-import pkg_resources  # noqa: E402,F401
-
 import arrow
 import datetime
 import collections
diff --git a/rundocserver.py b/rundocserver.py
index 55b162d..f43d4de 100755
--- a/rundocserver.py
+++ b/rundocserver.py
@@ -3,7 +3,7 @@
 from __future__ import unicode_literals, absolute_import
 
 # These two lines are needed to run on EL6
-__requires__ = ['SQLAlchemy >= 0.8', 'jinja2 >= 2.4']
+__requires__ = ['jinja2 >= 2.4']
 import pkg_resources
 
 import argparse
diff --git a/runserver.py b/runserver.py
index f06f34a..b266f9d 100755
--- a/runserver.py
+++ b/runserver.py
@@ -2,10 +2,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-# These two lines are needed to run on EL6
-__requires__ = ['SQLAlchemy >= 0.8', 'jinja2 >= 2.4']
-import pkg_resources
-
 import argparse
 import sys
 import os
diff --git a/runworker.py b/runworker.py
index 83ad7e5..320421c 100755
--- a/runworker.py
+++ b/runworker.py
@@ -2,10 +2,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-# These two lines are needed to run on EL6
-__requires__ = ['SQLAlchemy >= 0.8', 'jinja2 >= 2.4']
-import pkg_resources
-
 import argparse
 import sys
 import os
diff --git a/tests/__init__.py b/tests/__init__.py
index b9776ba..d27badf 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.7']
-import pkg_resources
-
 import imp
 import json
 import logging
diff --git a/tests/test_pagure_admin.py b/tests/test_pagure_admin.py
index 3d5c650..55dcf96 100644
--- a/tests/test_pagure_admin.py
+++ b/tests/test_pagure_admin.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources  # noqa
-
 import datetime  # noqa
 import os  # noqa
 import platform  # noqa
diff --git a/tests/test_pagure_exclude_group_index.py b/tests/test_pagure_exclude_group_index.py
index a4324f1..7a5efc5 100644
--- a/tests/test_pagure_exclude_group_index.py
+++ b/tests/test_pagure_exclude_group_index.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import unittest
 import shutil
 import sys
diff --git a/tests/test_pagure_flask.py b/tests/test_pagure_flask.py
index 6972c0f..45010dc 100644
--- a/tests/test_pagure_flask.py
+++ b/tests/test_pagure_flask.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import unittest
 import shutil
 import sys
diff --git a/tests/test_pagure_flask_api.py b/tests/test_pagure_flask_api.py
index 657cedc..1467746 100644
--- a/tests/test_pagure_flask_api.py
+++ b/tests/test_pagure_flask_api.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import unittest
 import shutil
 import sys
diff --git a/tests/test_pagure_flask_api_auth.py b/tests/test_pagure_flask_api_auth.py
index f414439..f0d6a64 100644
--- a/tests/test_pagure_flask_api_auth.py
+++ b/tests/test_pagure_flask_api_auth.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import unittest
 import shutil
 import sys
diff --git a/tests/test_pagure_flask_api_fork.py b/tests/test_pagure_flask_api_fork.py
index 8aa18fa..e6b546c 100644
--- a/tests/test_pagure_flask_api_fork.py
+++ b/tests/test_pagure_flask_api_fork.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import datetime
 import unittest
 import shutil
diff --git a/tests/test_pagure_flask_api_group.py b/tests/test_pagure_flask_api_group.py
index d8353a5..773d6a9 100644
--- a/tests/test_pagure_flask_api_group.py
+++ b/tests/test_pagure_flask_api_group.py
@@ -11,7 +11,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
 import unittest
 import sys
 import os
diff --git a/tests/test_pagure_flask_api_issue.py b/tests/test_pagure_flask_api_issue.py
index 22ed2a0..8be82a5 100644
--- a/tests/test_pagure_flask_api_issue.py
+++ b/tests/test_pagure_flask_api_issue.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import arrow
 import copy
 import datetime
diff --git a/tests/test_pagure_flask_api_issue_change_status.py b/tests/test_pagure_flask_api_issue_change_status.py
index a3056ea..80d544a 100644
--- a/tests/test_pagure_flask_api_issue_change_status.py
+++ b/tests/test_pagure_flask_api_issue_change_status.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import copy
 import datetime
 import unittest
diff --git a/tests/test_pagure_flask_api_project.py b/tests/test_pagure_flask_api_project.py
index 190d8d4..5c6f180 100644
--- a/tests/test_pagure_flask_api_project.py
+++ b/tests/test_pagure_flask_api_project.py
@@ -11,9 +11,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import datetime
 import json
 import unittest
diff --git a/tests/test_pagure_flask_api_project_update_watch.py b/tests/test_pagure_flask_api_project_update_watch.py
index db3bdea..2486b60 100644
--- a/tests/test_pagure_flask_api_project_update_watch.py
+++ b/tests/test_pagure_flask_api_project_update_watch.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import copy
 import datetime
 import unittest
diff --git a/tests/test_pagure_flask_api_ui_private_repo.py b/tests/test_pagure_flask_api_ui_private_repo.py
index 6829655..aa8933b 100644
--- a/tests/test_pagure_flask_api_ui_private_repo.py
+++ b/tests/test_pagure_flask_api_ui_private_repo.py
@@ -2,9 +2,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import datetime
 import unittest
 import shutil
diff --git a/tests/test_pagure_flask_api_user.py b/tests/test_pagure_flask_api_user.py
index 59ae575..dc885af 100644
--- a/tests/test_pagure_flask_api_user.py
+++ b/tests/test_pagure_flask_api_user.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import datetime
 import unittest
 import shutil
diff --git a/tests/test_pagure_flask_docs.py b/tests/test_pagure_flask_docs.py
index e95c401..55ad7c3 100644
--- a/tests/test_pagure_flask_docs.py
+++ b/tests/test_pagure_flask_docs.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import json
 import unittest
 import shutil
diff --git a/tests/test_pagure_flask_dump_load_ticket.py b/tests/test_pagure_flask_dump_load_ticket.py
index b0e8812..df372ac 100644
--- a/tests/test_pagure_flask_dump_load_ticket.py
+++ b/tests/test_pagure_flask_dump_load_ticket.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import json
 import unittest
 import shutil
diff --git a/tests/test_pagure_flask_form.py b/tests/test_pagure_flask_form.py
index f454437..81ae333 100644
--- a/tests/test_pagure_flask_form.py
+++ b/tests/test_pagure_flask_form.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import datetime
 import unittest
 import sys
diff --git a/tests/test_pagure_flask_internal.py b/tests/test_pagure_flask_internal.py
index 437391c..c588ba1 100644
--- a/tests/test_pagure_flask_internal.py
+++ b/tests/test_pagure_flask_internal.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import datetime
 import json
 import unittest
diff --git a/tests/test_pagure_flask_rebase.py b/tests/test_pagure_flask_rebase.py
index ba2e368..e43afea 100644
--- a/tests/test_pagure_flask_rebase.py
+++ b/tests/test_pagure_flask_rebase.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import datetime
 import unittest
 import shutil
diff --git a/tests/test_pagure_flask_ui_app.py b/tests/test_pagure_flask_ui_app.py
index 30ce3c3..bd5c6c8 100644
--- a/tests/test_pagure_flask_ui_app.py
+++ b/tests/test_pagure_flask_ui_app.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import datetime
 import unittest
 import shutil
diff --git a/tests/test_pagure_flask_ui_app_browse.py b/tests/test_pagure_flask_ui_app_browse.py
index 8abf858..35454e3 100644
--- a/tests/test_pagure_flask_ui_app_browse.py
+++ b/tests/test_pagure_flask_ui_app_browse.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import unittest
 import sys
 import os
diff --git a/tests/test_pagure_flask_ui_app_give_project.py b/tests/test_pagure_flask_ui_app_give_project.py
index 63cb638..c7376f4 100644
--- a/tests/test_pagure_flask_ui_app_give_project.py
+++ b/tests/test_pagure_flask_ui_app_give_project.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import unittest
 import shutil
 import sys
diff --git a/tests/test_pagure_flask_ui_app_index.py b/tests/test_pagure_flask_ui_app_index.py
index 6d6ef8d..ab5ebcb 100644
--- a/tests/test_pagure_flask_ui_app_index.py
+++ b/tests/test_pagure_flask_ui_app_index.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import datetime
 import unittest
 import shutil
diff --git a/tests/test_pagure_flask_ui_app_userdash.py b/tests/test_pagure_flask_ui_app_userdash.py
index ca2e540..0bc0773 100644
--- a/tests/test_pagure_flask_ui_app_userdash.py
+++ b/tests/test_pagure_flask_ui_app_userdash.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import datetime
 import unittest
 import shutil
diff --git a/tests/test_pagure_flask_ui_clone.py b/tests/test_pagure_flask_ui_clone.py
index 7447593..5f66369 100644
--- a/tests/test_pagure_flask_ui_clone.py
+++ b/tests/test_pagure_flask_ui_clone.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import datetime
 import unittest
 import shutil
diff --git a/tests/test_pagure_flask_ui_fork.py b/tests/test_pagure_flask_ui_fork.py
index 4bb267e..b19b0f0 100644
--- a/tests/test_pagure_flask_ui_fork.py
+++ b/tests/test_pagure_flask_ui_fork.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import json
 import unittest
 import shutil
diff --git a/tests/test_pagure_flask_ui_groups.py b/tests/test_pagure_flask_ui_groups.py
index 48b4e3c..ddf7197 100644
--- a/tests/test_pagure_flask_ui_groups.py
+++ b/tests/test_pagure_flask_ui_groups.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import unittest
 import shutil
 import sys
diff --git a/tests/test_pagure_flask_ui_issue_pr_link.py b/tests/test_pagure_flask_ui_issue_pr_link.py
index 5b85bd7..b40e1f5 100644
--- a/tests/test_pagure_flask_ui_issue_pr_link.py
+++ b/tests/test_pagure_flask_ui_issue_pr_link.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import datetime
 import json
 import unittest
diff --git a/tests/test_pagure_flask_ui_issues.py b/tests/test_pagure_flask_ui_issues.py
index 6f32620..207e372 100644
--- a/tests/test_pagure_flask_ui_issues.py
+++ b/tests/test_pagure_flask_ui_issues.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 from unittest.case import SkipTest
 import json
 import unittest
diff --git a/tests/test_pagure_flask_ui_issues_acl_checks.py b/tests/test_pagure_flask_ui_issues_acl_checks.py
index 65bb975..ac20405 100644
--- a/tests/test_pagure_flask_ui_issues_acl_checks.py
+++ b/tests/test_pagure_flask_ui_issues_acl_checks.py
@@ -11,9 +11,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 from unittest.case import SkipTest
 import json
 import unittest
diff --git a/tests/test_pagure_flask_ui_issues_open_access.py b/tests/test_pagure_flask_ui_issues_open_access.py
index ccc3a1f..f7be2ca 100644
--- a/tests/test_pagure_flask_ui_issues_open_access.py
+++ b/tests/test_pagure_flask_ui_issues_open_access.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 from unittest.case import SkipTest
 import json
 import unittest
diff --git a/tests/test_pagure_flask_ui_issues_templates.py b/tests/test_pagure_flask_ui_issues_templates.py
index 442bbbe..99b0a02 100644
--- a/tests/test_pagure_flask_ui_issues_templates.py
+++ b/tests/test_pagure_flask_ui_issues_templates.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import json
 import unittest
 import sys
diff --git a/tests/test_pagure_flask_ui_login.py b/tests/test_pagure_flask_ui_login.py
index 25331e1..d77fc42 100644
--- a/tests/test_pagure_flask_ui_login.py
+++ b/tests/test_pagure_flask_ui_login.py
@@ -11,9 +11,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import datetime
 import hashlib
 import json
diff --git a/tests/test_pagure_flask_ui_no_master_branch.py b/tests/test_pagure_flask_ui_no_master_branch.py
index 6c93ac8..297cc42 100644
--- a/tests/test_pagure_flask_ui_no_master_branch.py
+++ b/tests/test_pagure_flask_ui_no_master_branch.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import json
 import unittest
 import shutil
diff --git a/tests/test_pagure_flask_ui_old_commit.py b/tests/test_pagure_flask_ui_old_commit.py
index 6eec80a..a80c6ca 100644
--- a/tests/test_pagure_flask_ui_old_commit.py
+++ b/tests/test_pagure_flask_ui_old_commit.py
@@ -10,7 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
 import unittest
 import sys
 import os
diff --git a/tests/test_pagure_flask_ui_plugins.py b/tests/test_pagure_flask_ui_plugins.py
index 88e3cfd..7d7a741 100644
--- a/tests/test_pagure_flask_ui_plugins.py
+++ b/tests/test_pagure_flask_ui_plugins.py
@@ -10,8 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-
 import unittest
 import sys
 import os
diff --git a/tests/test_pagure_flask_ui_plugins_default_hook.py b/tests/test_pagure_flask_ui_plugins_default_hook.py
index 10336d8..5da68fe 100644
--- a/tests/test_pagure_flask_ui_plugins_default_hook.py
+++ b/tests/test_pagure_flask_ui_plugins_default_hook.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import json
 import unittest
 import shutil
diff --git a/tests/test_pagure_flask_ui_plugins_fedmsg.py b/tests/test_pagure_flask_ui_plugins_fedmsg.py
index a65607e..6c8200f 100644
--- a/tests/test_pagure_flask_ui_plugins_fedmsg.py
+++ b/tests/test_pagure_flask_ui_plugins_fedmsg.py
@@ -10,8 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-
 import unittest
 import sys
 import os
diff --git a/tests/test_pagure_flask_ui_plugins_irc.py b/tests/test_pagure_flask_ui_plugins_irc.py
index 2dd8880..3eaaaf0 100644
--- a/tests/test_pagure_flask_ui_plugins_irc.py
+++ b/tests/test_pagure_flask_ui_plugins_irc.py
@@ -10,7 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
 import unittest
 import sys
 import os
diff --git a/tests/test_pagure_flask_ui_plugins_mail.py b/tests/test_pagure_flask_ui_plugins_mail.py
index b3443db..af59bf5 100644
--- a/tests/test_pagure_flask_ui_plugins_mail.py
+++ b/tests/test_pagure_flask_ui_plugins_mail.py
@@ -10,8 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-
 import unittest
 import sys
 import os
diff --git a/tests/test_pagure_flask_ui_plugins_mirror.py b/tests/test_pagure_flask_ui_plugins_mirror.py
index 58a08e3..8448fe9 100644
--- a/tests/test_pagure_flask_ui_plugins_mirror.py
+++ b/tests/test_pagure_flask_ui_plugins_mirror.py
@@ -10,8 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-
 import unittest
 import sys
 import os
diff --git a/tests/test_pagure_flask_ui_plugins_noff.py b/tests/test_pagure_flask_ui_plugins_noff.py
index 833944c..5334e10 100644
--- a/tests/test_pagure_flask_ui_plugins_noff.py
+++ b/tests/test_pagure_flask_ui_plugins_noff.py
@@ -10,8 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-
 import unittest
 import sys
 import os
diff --git a/tests/test_pagure_flask_ui_plugins_pagure_ci.py b/tests/test_pagure_flask_ui_plugins_pagure_ci.py
index cd2c6b0..1604dc2 100644
--- a/tests/test_pagure_flask_ui_plugins_pagure_ci.py
+++ b/tests/test_pagure_flask_ui_plugins_pagure_ci.py
@@ -2,8 +2,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-
 import unittest
 import sys
 import os
diff --git a/tests/test_pagure_flask_ui_plugins_pagure_hook.py b/tests/test_pagure_flask_ui_plugins_pagure_hook.py
index 9aa235b..a62d7c6 100644
--- a/tests/test_pagure_flask_ui_plugins_pagure_hook.py
+++ b/tests/test_pagure_flask_ui_plugins_pagure_hook.py
@@ -10,8 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-
 import unittest
 import sys
 import os
diff --git a/tests/test_pagure_flask_ui_plugins_pagure_no_new_branch.py b/tests/test_pagure_flask_ui_plugins_pagure_no_new_branch.py
index 2b7e59c..c4bfe82 100644
--- a/tests/test_pagure_flask_ui_plugins_pagure_no_new_branch.py
+++ b/tests/test_pagure_flask_ui_plugins_pagure_no_new_branch.py
@@ -10,8 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-
 import unittest
 import shutil
 import sys
diff --git a/tests/test_pagure_flask_ui_plugins_pagure_request_hook.py b/tests/test_pagure_flask_ui_plugins_pagure_request_hook.py
index 510b3a2..dfffdfd 100644
--- a/tests/test_pagure_flask_ui_plugins_pagure_request_hook.py
+++ b/tests/test_pagure_flask_ui_plugins_pagure_request_hook.py
@@ -10,8 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-
 import unittest
 import shutil
 import sys
diff --git a/tests/test_pagure_flask_ui_plugins_pagure_ticket_hook.py b/tests/test_pagure_flask_ui_plugins_pagure_ticket_hook.py
index 24270df..f4bfdf6 100644
--- a/tests/test_pagure_flask_ui_plugins_pagure_ticket_hook.py
+++ b/tests/test_pagure_flask_ui_plugins_pagure_ticket_hook.py
@@ -10,8 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-
 import unittest
 import shutil
 import sys
diff --git a/tests/test_pagure_flask_ui_plugins_rtd_hook.py b/tests/test_pagure_flask_ui_plugins_rtd_hook.py
index a2cbec9..d185050 100644
--- a/tests/test_pagure_flask_ui_plugins_rtd_hook.py
+++ b/tests/test_pagure_flask_ui_plugins_rtd_hook.py
@@ -10,7 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
 import unittest
 import shutil
 import sys
diff --git a/tests/test_pagure_flask_ui_plugins_unsigned.py b/tests/test_pagure_flask_ui_plugins_unsigned.py
index 3f1c2e9..7585df1 100644
--- a/tests/test_pagure_flask_ui_plugins_unsigned.py
+++ b/tests/test_pagure_flask_ui_plugins_unsigned.py
@@ -10,8 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-
 import unittest
 import sys
 import os
diff --git a/tests/test_pagure_flask_ui_pr_no_sources.py b/tests/test_pagure_flask_ui_pr_no_sources.py
index 98076b3..343ae24 100644
--- a/tests/test_pagure_flask_ui_pr_no_sources.py
+++ b/tests/test_pagure_flask_ui_pr_no_sources.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import json
 import unittest
 import shutil
diff --git a/tests/test_pagure_flask_ui_priorities.py b/tests/test_pagure_flask_ui_priorities.py
index 7317d8a..68df8a0 100644
--- a/tests/test_pagure_flask_ui_priorities.py
+++ b/tests/test_pagure_flask_ui_priorities.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import datetime
 import json
 import unittest
diff --git a/tests/test_pagure_flask_ui_remote_pr.py b/tests/test_pagure_flask_ui_remote_pr.py
index aebe952..2710a46 100644
--- a/tests/test_pagure_flask_ui_remote_pr.py
+++ b/tests/test_pagure_flask_ui_remote_pr.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import json
 import os
 import re
diff --git a/tests/test_pagure_flask_ui_repo.py b/tests/test_pagure_flask_ui_repo.py
index bdf9618..6c48615 100644
--- a/tests/test_pagure_flask_ui_repo.py
+++ b/tests/test_pagure_flask_ui_repo.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import datetime
 import json
 import unittest
diff --git a/tests/test_pagure_flask_ui_repo_delete_project.py b/tests/test_pagure_flask_ui_repo_delete_project.py
index 0e53ddb..aa1985b 100644
--- a/tests/test_pagure_flask_ui_repo_delete_project.py
+++ b/tests/test_pagure_flask_ui_repo_delete_project.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import sys
 import os
 
diff --git a/tests/test_pagure_flask_ui_repo_milestones.py b/tests/test_pagure_flask_ui_repo_milestones.py
index 69dba94..202ff49 100644
--- a/tests/test_pagure_flask_ui_repo_milestones.py
+++ b/tests/test_pagure_flask_ui_repo_milestones.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import sys
 import unittest
 import os
diff --git a/tests/test_pagure_flask_ui_repo_slash_name.py b/tests/test_pagure_flask_ui_repo_slash_name.py
index 4f228ee..9c1a3e9 100644
--- a/tests/test_pagure_flask_ui_repo_slash_name.py
+++ b/tests/test_pagure_flask_ui_repo_slash_name.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import json
 import unittest
 import shutil
diff --git a/tests/test_pagure_flask_ui_roadmap.py b/tests/test_pagure_flask_ui_roadmap.py
index 238a43a..6161121 100644
--- a/tests/test_pagure_flask_ui_roadmap.py
+++ b/tests/test_pagure_flask_ui_roadmap.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import datetime
 import json
 import unittest
diff --git a/tests/test_pagure_flask_ui_slash_branch_name.py b/tests/test_pagure_flask_ui_slash_branch_name.py
index 585aff7..d2f5997 100644
--- a/tests/test_pagure_flask_ui_slash_branch_name.py
+++ b/tests/test_pagure_flask_ui_slash_branch_name.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import json
 import unittest
 import shutil
diff --git a/tests/test_pagure_flask_ui_star_project.py b/tests/test_pagure_flask_ui_star_project.py
index a28716f..1406ace 100644
--- a/tests/test_pagure_flask_ui_star_project.py
+++ b/tests/test_pagure_flask_ui_star_project.py
@@ -11,9 +11,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import unittest
 import sys
 import os
diff --git a/tests/test_pagure_flask_util.py b/tests/test_pagure_flask_util.py
index 268e436..abfe83a 100644
--- a/tests/test_pagure_flask_util.py
+++ b/tests/test_pagure_flask_util.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import unittest
 import sys
 import os
diff --git a/tests/test_pagure_lib.py b/tests/test_pagure_lib.py
index 67927e7..50ddab1 100644
--- a/tests/test_pagure_lib.py
+++ b/tests/test_pagure_lib.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import datetime
 import unittest
 import shutil
diff --git a/tests/test_pagure_lib_drop_issue.py b/tests/test_pagure_lib_drop_issue.py
index d594766..f25225b 100644
--- a/tests/test_pagure_lib_drop_issue.py
+++ b/tests/test_pagure_lib_drop_issue.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import unittest
 import shutil
 import sys
diff --git a/tests/test_pagure_lib_git.py b/tests/test_pagure_lib_git.py
index f4d61bf..4915a65 100644
--- a/tests/test_pagure_lib_git.py
+++ b/tests/test_pagure_lib_git.py
@@ -10,10 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-
-import pkg_resources
-
 import datetime
 import os
 import shutil
diff --git a/tests/test_pagure_lib_git_auth.py b/tests/test_pagure_lib_git_auth.py
index 5f69085..3488006 100644
--- a/tests/test_pagure_lib_git_auth.py
+++ b/tests/test_pagure_lib_git_auth.py
@@ -11,10 +11,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-
-import pkg_resources
-
 import datetime
 import os
 import shutil
diff --git a/tests/test_pagure_lib_git_diff_pr.py b/tests/test_pagure_lib_git_diff_pr.py
index ab492a6..eeece16 100644
--- a/tests/test_pagure_lib_git_diff_pr.py
+++ b/tests/test_pagure_lib_git_diff_pr.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources  # noqa
-
 import json  # noqa
 import unittest  # noqa
 import shutil  # noqa
diff --git a/tests/test_pagure_lib_git_mirror_project.py b/tests/test_pagure_lib_git_mirror_project.py
index 9788e0c..1119177 100644
--- a/tests/test_pagure_lib_git_mirror_project.py
+++ b/tests/test_pagure_lib_git_mirror_project.py
@@ -10,10 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-
-import pkg_resources
-
 import datetime
 import os
 import shutil
diff --git a/tests/test_pagure_lib_gitolite_config.py b/tests/test_pagure_lib_gitolite_config.py
index 0ec7a13..329463d 100644
--- a/tests/test_pagure_lib_gitolite_config.py
+++ b/tests/test_pagure_lib_gitolite_config.py
@@ -10,10 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-
-import pkg_resources
-
 import datetime
 import os
 import shutil
diff --git a/tests/test_pagure_lib_link.py b/tests/test_pagure_lib_link.py
index c7d0c30..901cfe6 100644
--- a/tests/test_pagure_lib_link.py
+++ b/tests/test_pagure_lib_link.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import json
 import unittest
 import shutil
diff --git a/tests/test_pagure_lib_login.py b/tests/test_pagure_lib_login.py
index 2be4b8c..3afe679 100644
--- a/tests/test_pagure_lib_login.py
+++ b/tests/test_pagure_lib_login.py
@@ -11,9 +11,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import unittest
 import shutil
 import sys
diff --git a/tests/test_pagure_lib_model.py b/tests/test_pagure_lib_model.py
index 3376cc9..3e4f82c 100644
--- a/tests/test_pagure_lib_model.py
+++ b/tests/test_pagure_lib_model.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import unittest
 import sys
 import os
diff --git a/tests/test_pagure_lib_model_delete_project.py b/tests/test_pagure_lib_model_delete_project.py
index b5f41fc..ca73f66 100644
--- a/tests/test_pagure_lib_model_delete_project.py
+++ b/tests/test_pagure_lib_model_delete_project.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import json
 import unittest
 import sys
diff --git a/tests/test_pagure_lib_notify.py b/tests/test_pagure_lib_notify.py
index 60b41f1..6caa331 100644
--- a/tests/test_pagure_lib_notify.py
+++ b/tests/test_pagure_lib_notify.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import unittest
 import shutil
 import sys
diff --git a/tests/test_pagure_lib_plugins.py b/tests/test_pagure_lib_plugins.py
index 56124f5..ba97dfb 100644
--- a/tests/test_pagure_lib_plugins.py
+++ b/tests/test_pagure_lib_plugins.py
@@ -9,9 +9,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import os
 import sys
 
diff --git a/tests/test_pagure_lib_star_project.py b/tests/test_pagure_lib_star_project.py
index 673f3f8..be15968 100644
--- a/tests/test_pagure_lib_star_project.py
+++ b/tests/test_pagure_lib_star_project.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import unittest
 import sys
 import os
diff --git a/tests/test_pagure_lib_watch_list.py b/tests/test_pagure_lib_watch_list.py
index ab50796..fec1d26 100644
--- a/tests/test_pagure_lib_watch_list.py
+++ b/tests/test_pagure_lib_watch_list.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import unittest
 import shutil
 import sys
diff --git a/tests/test_pagure_merge_pr_no_fork.py b/tests/test_pagure_merge_pr_no_fork.py
index 241d774..c630981 100644
--- a/tests/test_pagure_merge_pr_no_fork.py
+++ b/tests/test_pagure_merge_pr_no_fork.py
@@ -10,7 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-
 import unittest
 import sys
 import os
diff --git a/tests/test_pagure_repospanner.py b/tests/test_pagure_repospanner.py
index 906c8a1..6bdad4d 100644
--- a/tests/test_pagure_repospanner.py
+++ b/tests/test_pagure_repospanner.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import datetime
 import munch
 import unittest
diff --git a/tests/test_pagure_utils.py b/tests/test_pagure_utils.py
index bd1677f..bcddbf0 100644
--- a/tests/test_pagure_utils.py
+++ b/tests/test_pagure_utils.py
@@ -10,9 +10,6 @@
 
 from __future__ import unicode_literals, absolute_import
 
-__requires__ = ['SQLAlchemy >= 0.8']
-import pkg_resources
-
 import unittest
 import shutil
 import sys

From 68a7d7ded07b0ea64ad371c4049405a0b71ab611 Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Dec 20 2018 15:01:49 +0000
Subject: [PATCH 3/9] Add a missing docstring to test_pfmarkdown


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/tests/test_pfmarkdown.py b/tests/test_pfmarkdown.py
index 754c475..7b08d5f 100644
--- a/tests/test_pfmarkdown.py
+++ b/tests/test_pfmarkdown.py
@@ -1,3 +1,12 @@
+# -*- coding: utf-8 -*-
+
+"""
+ (c) 2016 - Copyright Red Hat Inc
+
+ Authors:
+   Jeremy Cline <jeremy@jcline.org>
+
+"""
 
 from __future__ import unicode_literals, absolute_import
 

From 4babe061ac7fbb92721a24ae6d5eb6336083dffc Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Dec 20 2018 15:39:43 +0000
Subject: [PATCH 4/9] Speed up the test suite by dropping some of the sleep calls


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/tests/test_pagure_flask_dump_load_ticket.py b/tests/test_pagure_flask_dump_load_ticket.py
index df372ac..4494971 100644
--- a/tests/test_pagure_flask_dump_load_ticket.py
+++ b/tests/test_pagure_flask_dump_load_ticket.py
@@ -168,8 +168,6 @@ class PagureFlaskDumpLoadTicketTests(tests.Modeltests):
         # Test reloading the JSON
         self.tearDown()
         self.setUp()
-        # Give the worker time to spawn
-        time.sleep(2)
         tests.create_projects(self.session)
 
         # Create repo
diff --git a/tests/test_pagure_flask_internal.py b/tests/test_pagure_flask_internal.py
index c588ba1..6f1279b 100644
--- a/tests/test_pagure_flask_internal.py
+++ b/tests/test_pagure_flask_internal.py
@@ -2144,7 +2144,6 @@ class PagureFlaskInternaltests(tests.Modeltests):
 
         output = self.app.get(js_data['url'])
         while output.status_code == 418:
-            time.sleep(0.5)
             output = self.app.get(js_data['url'])
         js_data2 = json.loads(output.get_data(as_text=True))
         self.assertTrue(js_data2['results'][3] > 1509110062)
diff --git a/tests/test_pagure_flask_ui_fork.py b/tests/test_pagure_flask_ui_fork.py
index b19b0f0..bc5a12a 100644
--- a/tests/test_pagure_flask_ui_fork.py
+++ b/tests/test_pagure_flask_ui_fork.py
@@ -96,7 +96,6 @@ def set_up_git_repo(
         # list of binary strings representing parents of the new commit
         prev_commit
     )
-    time.sleep(1)
     refname = 'refs/heads/master:refs/heads/master'
     ori_remote = clone_repo.remotes[0]
     PagureRepo.push(ori_remote, refname)
diff --git a/tests/test_pagure_flask_ui_pr_no_sources.py b/tests/test_pagure_flask_ui_pr_no_sources.py
index 343ae24..a09b748 100644
--- a/tests/test_pagure_flask_ui_pr_no_sources.py
+++ b/tests/test_pagure_flask_ui_pr_no_sources.py
@@ -73,13 +73,7 @@ class PagureFlaskPrNoSourcestests(tests.Modeltests):
         path = os.path.join(
             self.path, 'repos', 'test.git',
             'refs', 'pull', '1', 'head')
-        cnt = 0
-        while not os.path.exists(path):
-            time.sleep(0.1)
-            cnt += 1
-            if cnt == 100:
-                # We're about 10 seconds in, let's bail
-                raise Exception('Sorry, worker took too long')
+        self.assertTrue(os.path.exists(path))
 
     def set_up_git_repo(self, repo, fork, branch_from='feature'):
         """ Set up the git repo and create the corresponding PullRequest
diff --git a/tests/test_pagure_flask_ui_remote_pr.py b/tests/test_pagure_flask_ui_remote_pr.py
index 2710a46..54e9f67 100644
--- a/tests/test_pagure_flask_ui_remote_pr.py
+++ b/tests/test_pagure_flask_ui_remote_pr.py
@@ -92,7 +92,7 @@ class PagureRemotePRtests(tests.Modeltests):
             # list of binary strings representing parents of the new commit
             prev_commit
         )
-        time.sleep(1)
+        # time.sleep(1)
         refname = 'refs/heads/master:refs/heads/master'
         ori_remote = clone_repo.remotes[0]
         PagureRepo.push(ori_remote, refname)
diff --git a/tests/test_pagure_flask_ui_repo.py b/tests/test_pagure_flask_ui_repo.py
index 6c48615..1e89014 100644
--- a/tests/test_pagure_flask_ui_repo.py
+++ b/tests/test_pagure_flask_ui_repo.py
@@ -2184,13 +2184,11 @@ class PagureFlaskRepotests(tests.Modeltests):
         tests.add_commit_git_repo(
             os.path.join(self.path, 'repos', 'test.git'), ncommits=1)
         c1 = repo.revparse_single('HEAD')
-        time.sleep(1)
 
         # Add another commit to git repo
         tests.add_commit_git_repo(
             os.path.join(self.path, 'repos', 'test.git'), ncommits=1)
         c2 = repo.revparse_single('HEAD')
-        time.sleep(1)
 
         # Add one more commit to git repo
         tests.add_commit_git_repo(
@@ -4912,20 +4910,9 @@ index 0000000..fb7093d
             folder = os.path.join(upload_dir, 'test')
             checksum_file = os.path.join(folder, 'CHECKSUMS')
 
-            # Wait for the worker to create the checksums file
-            cnt = 0
-            while not os.path.exists(checksum_file):
-                print(os.listdir(os.path.join(upload_dir, 'test')))
-                cnt += 1
-                if cnt == 40:
-                    raise ValueError(
-                        'The worker did not create the checksums file '
-                        'in a timely manner')
-                time.sleep(0.5)
-
-            self.assertEqual(len(os.listdir(folder)), 2)
-
+            # Check the checksums file
             self.assertTrue(os.path.exists(checksum_file))
+            self.assertEqual(len(os.listdir(folder)), 2)
 
             # Check the content of the checksums file
             with open(checksum_file) as stream:
@@ -4991,19 +4978,9 @@ index 0000000..fb7093d
             folder = os.path.join(upload_dir, 'test')
             checksum_file = os.path.join(folder, 'CHECKSUMS')
 
-            # Wait for the worker to create the checksums file
-            cnt = 0
-            while not os.path.exists(checksum_file):
-                cnt += 1
-                if cnt == 40:
-                    raise ValueError(
-                        'The worker did not create the checksums file '
-                        'in a timely manner')
-                time.sleep(0.5)
-
-            self.assertEqual(len(os.listdir(folder)), 3)
-
+            # Check the checksums file
             self.assertTrue(os.path.exists(checksum_file))
+            self.assertEqual(len(os.listdir(folder)), 3)
 
             # Check the content of the checksums file
             with open(checksum_file) as stream:
diff --git a/tests/test_pagure_lib_git_diff_pr.py b/tests/test_pagure_lib_git_diff_pr.py
index eeece16..d9fc3a9 100644
--- a/tests/test_pagure_lib_git_diff_pr.py
+++ b/tests/test_pagure_lib_git_diff_pr.py
@@ -106,7 +106,6 @@ class PagureFlaskForkPrtests(tests.Modeltests):
                 # list of binary strings representing parents of the new commit
                 parents
             )
-            time.sleep(1)
 
         # Push to the main repo
         refname = 'refs/heads/master:refs/heads/master'
@@ -142,7 +141,6 @@ class PagureFlaskForkPrtests(tests.Modeltests):
                 # list of binary strings representing parents of the new commit
                 [last_commit.oid.hex]
             )
-            time.sleep(1)
         # Push to the main repo
         refname = 'refs/heads/master:refs/heads/master'
         ori_remote = clone_repo.remotes[0]
@@ -175,7 +173,6 @@ class PagureFlaskForkPrtests(tests.Modeltests):
             # list of binary strings representing parents of the new commit
             [last_commit.oid.hex]
         )
-        time.sleep(1)
 
         with open(os.path.join(repopath, 'sources'), 'w') as stream:
                 stream.write('foo\n bar\nbaz\n')
@@ -305,13 +302,10 @@ class PagureFlaskForkPrtests(tests.Modeltests):
         # we don't know the task id but we'll give it 30 sec to finish
         cnt = 0
         repo = PagureRepo(gitrepo)
-        while 1:
-            if 'refs/pull/1/head' in list(repo.listall_references()):
-                break
-            cnt += 1
-            if cnt == 60:
-                break
-            time.sleep(0.5)
+        self.assertIn(
+            'refs/pull/1/head',
+            list(repo.listall_references())
+        )
 
         self.assertTrue(cnt < 60)
 
@@ -348,13 +342,10 @@ class PagureFlaskForkPrtests(tests.Modeltests):
         # we don't know the task id but we'll give it 30 sec to finish
         cnt = 0
         repo = PagureRepo(gitrepo)
-        while 1:
-            if 'refs/pull/1/head' in list(repo.listall_references()):
-                break
-            cnt += 1
-            if cnt == 60:
-                break
-            time.sleep(0.5)
+        self.assertIn(
+            'refs/pull/1/head',
+            list(repo.listall_references())
+        )
 
         self.assertTrue(cnt < 60)
 
@@ -414,13 +405,10 @@ class PagureFlaskForkPrtests(tests.Modeltests):
         # we don't know the task id but we'll give it 30 sec to finish
         cnt = 0
         repo = PagureRepo(gitrepo)
-        while 1:
-            if 'refs/pull/1/head' in list(repo.listall_references()):
-                break
-            cnt += 1
-            if cnt == 60:
-                break
-            time.sleep(0.5)
+        self.assertIn(
+            'refs/pull/1/head',
+            list(repo.listall_references())
+        )
 
         self.assertTrue(cnt < 60)
 
@@ -461,13 +449,10 @@ class PagureFlaskForkPrtests(tests.Modeltests):
         # we don't know the task id but we'll give it 30 sec to finish
         cnt = 0
         repo = PagureRepo(gitrepo)
-        while 1:
-            if 'refs/pull/1/head' in list(repo.listall_references()):
-                break
-            cnt += 1
-            if cnt == 60:
-                break
-            time.sleep(0.5)
+        self.assertIn(
+            'refs/pull/1/head',
+            list(repo.listall_references())
+        )
 
         self.assertTrue(cnt < 60)
 
@@ -496,13 +481,10 @@ class PagureFlaskForkPrtests(tests.Modeltests):
         # we don't know the task id but we'll give it 30 sec to finish
         cnt = 0
         repo = PagureRepo(gitrepo)
-        while 1:
-            if 'refs/pull/1/head' in list(repo.listall_references()):
-                break
-            cnt += 1
-            if cnt == 60:
-                break
-            time.sleep(0.5)
+        self.assertIn(
+            'refs/pull/1/head',
+            list(repo.listall_references())
+        )
 
         self.assertTrue(cnt < 60)
 
diff --git a/tests/test_pagure_repospanner.py b/tests/test_pagure_repospanner.py
index 6bdad4d..d8f12aa 100644
--- a/tests/test_pagure_repospanner.py
+++ b/tests/test_pagure_repospanner.py
@@ -205,9 +205,6 @@ class PagureRepoSpannerTests(tests.Modeltests):
                 stderr=subprocess.STDOUT,
             )
 
-            # Give repoSpanner time to start
-            time.sleep(1)
-
             # Wait for the instance to become available
             resp = requests.get(
                 'https://nodea.regiona.repospanner.local:%d/'

From fe8d0f69b29ae8d81008d4b5865523039523dbb4 Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Dec 21 2018 15:02:47 +0000
Subject: [PATCH 5/9] Change how the fork is created so we're sure there is a shared history


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/tests/test_pagure_merge_pr_no_fork.py b/tests/test_pagure_merge_pr_no_fork.py
index c630981..2287f18 100644
--- a/tests/test_pagure_merge_pr_no_fork.py
+++ b/tests/test_pagure_merge_pr_no_fork.py
@@ -36,22 +36,25 @@ class PagureMergePrNoForkTest(tests.Modeltests):
         super(PagureMergePrNoForkTest, self).setUp()
 
         tests.create_projects(self.session)
-        tests.create_projects_git(
-            os.path.join(self.path, "repos"),
-            bare=True
-        )
         tests.add_content_git_repo(
             os.path.join(self.path, "repos", "test.git"))
-        tests.create_projects(
-            self.session,
-            is_fork=True,
-            hook_token_suffix='fork')
-        tests.create_projects_git(
-            os.path.join(self.path, "repos", "forks", "pingou"),
-            bare=True
+
+        # Fork
+        project = pagure.lib.query.get_authorized_project(
+            self.session, 'test')
+        task = pagure.lib.query.fork_project(
+            session=self.session,
+            user='pingou',
+            repo=project,
         )
-        tests.add_content_git_repo(
-            os.path.join(self.path, "repos", "forks", "pingou", "test.git"))
+        self.session.commit()
+        self.assertEqual(
+            task.get(),
+            {'endpoint': 'ui_ns.view_repo',
+             'repo': 'test',
+             'namespace': None,
+             'username': 'pingou'})
+
         tests.add_readme_git_repo(
             os.path.join(self.path, "repos", "forks", "pingou", "test.git"))
         project = pagure.lib.query.get_authorized_project(

From b35ae4b1c02cd311b518ca265a83a279c2a73a50 Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Dec 21 2018 15:23:08 +0000
Subject: [PATCH 6/9] Get the Pagure CI plugin so we can access the ci_hook backref


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/pagure/lib/query.py b/pagure/lib/query.py
index e6234f7..2b5c855 100644
--- a/pagure/lib/query.py
+++ b/pagure/lib/query.py
@@ -1939,6 +1939,8 @@ def new_pull_request(
     )
 
     # Send notification to the CI server
+    ci_hook = pagure.lib.plugins.get_plugin("Pagure CI")
+    ci_hook.db_object()
     if (
         pagure_config.get("PAGURE_CI_SERVICES")
         and request.project.ci_hook

From 6cd3e3a945695bae468f0a0c73a947ee22e38b2a Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Dec 21 2018 15:24:28 +0000
Subject: [PATCH 7/9] Fix acting or not on the MQTT_NOTIFICATIONS configuration key


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/pagure/lib/notify.py b/pagure/lib/notify.py
index b89a2a5..17c15c0 100644
--- a/pagure/lib/notify.py
+++ b/pagure/lib/notify.py
@@ -109,7 +109,7 @@ def blinker_publish(topic, message):
 
 def mqtt_publish(topic, message):
     """ Try to publish a message on a MQTT message bus. """
-    if pagure_config.get("MQTT_NOTIFICATIONS", False):
+    if not pagure_config.get("MQTT_NOTIFICATIONS", False):
         return
 
     mqtt_host = pagure_config.get("MQTT_HOST")

From 40a8927741dfe20d7bf6169221a3791598e1b1c1 Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Dec 21 2018 15:40:41 +0000
Subject: [PATCH 8/9] Fix showing a regular comment on a PR when there are none before


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/pagure/templates/repo_pull_request.html b/pagure/templates/repo_pull_request.html
index 689d357..9467bb6 100644
--- a/pagure/templates/repo_pull_request.html
+++ b/pagure/templates/repo_pull_request.html
@@ -382,7 +382,6 @@
     <div class="col-md-8">
     {{ show_pr_initial_comment(pull_request, repo, form, username) }}
     <section class="request_comment" >
-    {% if pull_request.comments %}
       <form action="{{ url_for('ui_ns.pull_request_drop_comment',
             repo=repo.name,
             username=username,
@@ -391,6 +390,7 @@
           }}" method="post" id="request_comment"
           onsubmit="return try_async_comment(this, null)">
 
+    {% if pull_request.comments %}
       {% for comment in pull_request.comments %}
         {% if comment.commit_id %}
         {{ show_comment(comment, comment.id, repo, username,
@@ -412,8 +412,8 @@
         {% endif %}
       {% endfor %}
       {{ mergeform.csrf_token }}
-      </form>
     {% endif %}
+      </form>
     </section>
 
     {% if g.authenticated and mergeform %}

From e68347400230e9273579c9ff4150b1b3ddb526e5 Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Dec 21 2018 15:59:39 +0000
Subject: [PATCH 9/9] Revert "Make the filepath shown in the UI an unicode"


We had added that commit because the tests in:
``tests/test_pagure_merge_pr_no_fork.py`` was flaky on jenkins and
we thought it could be related.
This test has been fixed in: fe8d0f69b29ae8d81008d4b5865523039523dbb4
so this change is no longer needed (and even potentially harmful now)

This reverts commit 71aa91a17fda9202b5d8aa253aec60a089f98274.

---

diff --git a/pagure/templates/repo_pull_request.html b/pagure/templates/repo_pull_request.html
index 9467bb6..67fde9c 100644
--- a/pagure/templates/repo_pull_request.html
+++ b/pagure/templates/repo_pull_request.html
@@ -678,7 +678,7 @@
           <div class="pull-xs-left pr-changes-description"><strong>file <span class="text-success">added</span></strong></div>
         </div>
         <div class="ellipsis pr-changes-description">
-          <small>{{ filepath | unicode }}</small>
+          <small>{{filepath}}</small>
         </div>
     </a>
     {%- endmacro %}

