Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which supports Python 3. Fix problems found. Update local hacking checks for new flake8. Remove hacking and friends from lower-constraints, they are not needed to be installed at run-time. Change-Id: Ia6af344ec8441dc98a0820176373dcff3a8c80d5
This commit is contained in:
@@ -184,7 +184,7 @@ class MultiType(wtypes.UserType):
|
||||
class JsonPatchType(wtypes.Base):
|
||||
"""A complex type that represents a single json-patch operation."""
|
||||
|
||||
path = wtypes.wsattr(wtypes.StringType(pattern='^(/[\w-]+)+$'),
|
||||
path = wtypes.wsattr(wtypes.StringType(pattern=r'^(/[\w-]+)+$'),
|
||||
mandatory=True)
|
||||
op = wtypes.wsattr(wtypes.Enum(str, 'add', 'replace', 'remove'),
|
||||
mandatory=True)
|
||||
|
||||
@@ -25,6 +25,7 @@ class VERSIONS(enum.Enum):
|
||||
MINOR_4_WEBHOOK_API = 4 # v1.4: Add webhook trigger API
|
||||
MINOR_MAX_VERSION = 4
|
||||
|
||||
|
||||
# This is the version 1 API
|
||||
BASE_VERSION = 1
|
||||
# String representations of the minor and maximum versions
|
||||
|
||||
@@ -34,7 +34,7 @@ class AuthTokenMiddleware(auth_token.AuthProtocol):
|
||||
|
||||
"""
|
||||
def __init__(self, app, conf, public_api_routes=()):
|
||||
route_pattern_tpl = '%s(\.json|\.xml)?$'
|
||||
route_pattern_tpl = r'%s(\.json|\.xml)?$'
|
||||
|
||||
try:
|
||||
self.public_api_routes = [re.compile(route_pattern_tpl % route_tpl)
|
||||
|
||||
Reference in New Issue
Block a user