Commit bdce9049 authored by Aurel's avatar Aurel

futurize: stage2

parent ae0c991a
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
"""Git implementation of _version.py.""" """Git implementation of _version.py."""
from __future__ import print_function from __future__ import print_function
from builtins import str
from builtins import range
from builtins import object
import errno import errno
import os import os
import re import re
...@@ -31,7 +34,7 @@ def get_keywords(): ...@@ -31,7 +34,7 @@ def get_keywords():
return keywords return keywords
class VersioneerConfig: class VersioneerConfig(object):
"""Container for Versioneer configuration parameters.""" """Container for Versioneer configuration parameters."""
......
...@@ -17,6 +17,11 @@ ...@@ -17,6 +17,11 @@
# See COPYING file for full licensing terms. # See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options. # See https://www.nexedi.com/licensing for rationale and options.
from future import standard_library
standard_library.install_aliases()
from builtins import str
from builtins import range
from builtins import object
from cryptography import x509 from cryptography import x509
from cryptography.hazmat.primitives.serialization import Encoding from cryptography.hazmat.primitives.serialization import Encoding
from threading import local from threading import local
...@@ -33,7 +38,7 @@ import signal ...@@ -33,7 +38,7 @@ import signal
import sqlite3 import sqlite3
import ssl import ssl
import string import string
import urlparse import urllib.parse
import logging import logging
import logging.handlers import logging.handlers
...@@ -361,7 +366,7 @@ class Kedifa(object): ...@@ -361,7 +366,7 @@ class Kedifa(object):
parameters = {} parameters = {}
if qs: if qs:
try: try:
parameters = urlparse.parse_qs(qs, strict_parsing=True) parameters = urllib.parse.parse_qs(qs, strict_parsing=True)
except ValueError: except ValueError:
start_response('400 Bad Request', headers_text_plain) start_response('400 Bad Request', headers_text_plain)
return ('Query string %r was not correct.' % (qs, ),) return ('Query string %r was not correct.' % (qs, ),)
......
...@@ -19,8 +19,10 @@ from __future__ import absolute_import ...@@ -19,8 +19,10 @@ from __future__ import absolute_import
# See COPYING file for full licensing terms. # See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options. # See https://www.nexedi.com/licensing for rationale and options.
from future import standard_library
standard_library.install_aliases()
import argparse import argparse
import httplib import http.client
import requests import requests
import sys import sys
...@@ -125,7 +127,7 @@ def getter(*args): ...@@ -125,7 +127,7 @@ def getter(*args):
print('%r not downloaded, problem %s' % (url, e)) print('%r not downloaded, problem %s' % (url, e))
sys.exit(1) sys.exit(1)
else: else:
if response.status_code != httplib.OK: if response.status_code != http.client.OK:
print('%r not downloaded, HTTP code %s' % ( print('%r not downloaded, HTTP code %s' % (
url, response.status_code)) url, response.status_code))
sys.exit(1) sys.exit(1)
......
This diff is collapsed.
from __future__ import print_function from __future__ import print_function
import httplib from future import standard_library
standard_library.install_aliases()
from builtins import object
import http.client
import json import json
import os import os
import requests import requests
...@@ -57,7 +60,7 @@ class Updater(object): ...@@ -57,7 +60,7 @@ class Updater(object):
print('Certificate %r: problem with %r not downloaded: %s' % ( print('Certificate %r: problem with %r not downloaded: %s' % (
certificate_file, url, e)) certificate_file, url, e))
else: else:
if response.status_code != httplib.OK: if response.status_code != http.client.OK:
print('Certificate %r: %r not downloaded, HTTP code %s' % ( print('Certificate %r: %r not downloaded, HTTP code %s' % (
certificate_file, url, response.status_code)) certificate_file, url, response.status_code))
else: else:
...@@ -146,7 +149,7 @@ class Updater(object): ...@@ -146,7 +149,7 @@ class Updater(object):
self.master_certificate_file): self.master_certificate_file):
master_content = open(self.master_certificate_file, 'r').read() master_content = open(self.master_certificate_file, 'r').read()
for certificate, (_, fallback) in prepare_mapping.items(): for certificate, (_, fallback) in list(prepare_mapping.items()):
if os.path.exists(certificate): if os.path.exists(certificate):
continue continue
if fallback and os.path.exists(fallback): if fallback and os.path.exists(fallback):
...@@ -176,7 +179,7 @@ class Updater(object): ...@@ -176,7 +179,7 @@ class Updater(object):
except IOError: except IOError:
pass pass
for certificate_file in self.mapping.keys(): for certificate_file in list(self.mapping.keys()):
if self.updateCertificate(certificate_file, master_content): if self.updateCertificate(certificate_file, master_content):
updated = True updated = True
......
...@@ -277,6 +277,11 @@ https://creativecommons.org/publicdomain/zero/1.0/ . ...@@ -277,6 +277,11 @@ https://creativecommons.org/publicdomain/zero/1.0/ .
""" """
from __future__ import print_function from __future__ import print_function
from future import standard_library
standard_library.install_aliases()
from builtins import str
from builtins import range
from builtins import object
try: try:
import configparser import configparser
except ImportError: except ImportError:
...@@ -289,7 +294,7 @@ import subprocess ...@@ -289,7 +294,7 @@ import subprocess
import sys import sys
class VersioneerConfig: class VersioneerConfig(object):
"""Container for Versioneer configuration parameters.""" """Container for Versioneer configuration parameters."""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment