@@ -1,6 +1,6 @@
#!/usr/bin/env python2
-from __future__ import print_function
+from __future__ import print_function, unicode_literals
# These two lines are needed to run on EL6
__requires__ = ['SQLAlchemy >= 0.8', 'jinja2 >= 2.4']
@@ -1,6 +1,8 @@
#!/usr/bin/env python
""" Populate the pagure db with some dev data. """
+
import argparse
import os
import sys
@@ -19,6 +19,8 @@ nc localhost 8080
"""
+from __future__ import unicode_literals
import logging
@@ -5,7 +5,8 @@
# Return REJECT,TEMPFAIL,ACCEPT to short circuit processing for a message.
# You can also add/del recipients, replacebody, add/del headers, etc.
import base64
import email
import hashlib
@@ -8,6 +8,8 @@
__version__ = '4.0.1'
__api_version__ = '0.23'
@@ -14,6 +14,8 @@ API namespace version 0.
# pylint: disable=too-few-public-methods
# pylint: disable=too-many-locals
import codecs
import functools
import flask
@@ -9,6 +9,8 @@
import pagure
@@ -8,7 +8,7 @@
import datetime
import collections
from math import ceil
@@ -7,7 +7,8 @@
Pierre-Yves Chibon <pingou@pingoured.fr>
import os # noqa: E402
import flask # noqa: E402
@@ -7,6 +7,9 @@
Clement Verna <cverna@tutanota.com>
from pagure.flask_app import admin_session_timedout
from functools import wraps
from datetime import timedelta
import docutils
import docutils.core
import docutils.examples
class PagureException(Exception):
''' Parent class of all the exception for all Pagure specific
import gc
@@ -12,6 +12,8 @@
# pylint: disable=no-init
# pylint: disable=super-on-old-class
import re
import six
import sqlalchemy as sa
import wtforms
try:
@@ -3,7 +3,7 @@
"""Pagure specific hook to be added to all projects in pagure by default.
@@ -47,6 +47,8 @@ See the accompanying README file for the complete documentation.
@@ -5,7 +5,7 @@
statement.
@@ -4,7 +4,7 @@
"""Pagure specific hook to block non-fastforward pushes.
relates to an issue.
based on the information pushed in the requests git repository.
"""Pagure specific hook to update tickets stored in the database based on
the information pushed in the tickets git repository.
"""Pagure specific hook to trigger a build on a readthedocs.org project.
import pygit2
@@ -10,6 +10,8 @@ Internal endpoints.
# pylint: disable=too-many-branches
# pylint: disable=too-many-arguments
@@ -7,7 +7,7 @@
import abc
@@ -10,6 +10,8 @@
import time
@@ -10,6 +10,7 @@
from straight.plugin import load
from pagure.lib.model import BASE
import hmac
@@ -20,6 +20,8 @@
from flask_wtf import FlaskForm as FlaskForm
@@ -22,6 +22,9 @@
'''
Mail handler for logging.
import logging.handlers
Patrick Uiterwijk <puiterwijk@redhat.com>
import pprint
@@ -19,6 +19,8 @@ Author: Ralph Bean <rbean@redhat.com>
import markdown.inlinepatterns
@@ -26,6 +26,8 @@ redirects are using ``https``.
Source: http://flask.pocoo.org/snippets/35/ by Peter Hansen
class ReverseProxied(object): # pragma: no cover
'''Wrap the application in this middleware and configure the
UI_NS = flask.Blueprint('ui_ns', __name__)
from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, Error, \
Number, Operator, Generic, Whitespace, Punctuation, Other, Literal
@@ -13,6 +13,8 @@
import textwrap
import arrow
@@ -16,6 +16,8 @@
# pylint: disable=too-many-lines
@@ -14,6 +14,8 @@
# pylint: disable=too-many-statements
@@ -11,6 +11,8 @@
@@ -17,6 +17,8 @@
# pylint: disable=broad-except
import json
from six.moves.urllib.parse import urlparse, urljoin
@@ -1,5 +1,7 @@
import pkg_resources
import subprocess
import unittest
@@ -12,6 +12,8 @@ elsewhere in the code.
__requires__ = ['SQLAlchemy >= 0.8']
import pkg_resources # noqa
@@ -6,6 +6,8 @@
# -*- coding: utf-8 -*-
import shutil