Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kedifa
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Łukasz Nowak
kedifa
Commits
4c2db470
Commit
4c2db470
authored
Jan 28, 2020
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kedifa: Use six for py2/py3 compatibility
parent
c9fc3b34
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
21 deletions
+7
-21
kedifa/app.py
kedifa/app.py
+1
-4
kedifa/cli.py
kedifa/cli.py
+1
-4
kedifa/test.py
kedifa/test.py
+3
-9
kedifa/updater.py
kedifa/updater.py
+1
-4
setup.py
setup.py
+1
-0
No files found.
kedifa/app.py
View file @
4c2db470
...
@@ -33,10 +33,7 @@ import signal
...
@@ -33,10 +33,7 @@ import signal
import
sqlite3
import
sqlite3
import
ssl
import
ssl
import
string
import
string
try
:
from
six.moves.urllib
import
parse
as
urlparse
import
urlparse
except
ImportError
:
from
urllib.parse
import
urlparse
import
logging
import
logging
import
logging.handlers
import
logging.handlers
...
...
kedifa/cli.py
View file @
4c2db470
...
@@ -20,10 +20,7 @@
...
@@ -20,10 +20,7 @@
from
__future__
import
print_function
from
__future__
import
print_function
import
argparse
import
argparse
try
:
from
six.moves
import
http_client
as
httplib
import
httplib
except
ImportError
:
from
http
import
client
as
httplib
import
requests
import
requests
import
sys
import
sys
...
...
kedifa/test.py
View file @
4c2db470
...
@@ -17,16 +17,10 @@
...
@@ -17,16 +17,10 @@
# 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.
try
:
from
six
import
StringIO
import
StringIO
except
ImportError
:
from
io
import
StringIO
import
contextlib
import
contextlib
import
datetime
import
datetime
try
:
from
six.moves
import
http_client
as
httplib
import
httplib
except
ImportError
:
from
http
import
client
as
httplib
import
ipaddress
import
ipaddress
import
json
import
json
import
mock
import
mock
...
@@ -68,7 +62,7 @@ def findFreeTCPPort(ip=''):
...
@@ -68,7 +62,7 @@ def findFreeTCPPort(ip=''):
@
contextlib
.
contextmanager
@
contextlib
.
contextmanager
def
captured_output
():
def
captured_output
():
new_out
,
new_err
=
StringIO
.
StringIO
(),
StringIO
.
StringIO
()
new_out
,
new_err
=
StringIO
(),
StringIO
()
old_out
,
old_err
=
sys
.
stdout
,
sys
.
stderr
old_out
,
old_err
=
sys
.
stdout
,
sys
.
stderr
try
:
try
:
sys
.
stdout
,
sys
.
stderr
=
new_out
,
new_err
sys
.
stdout
,
sys
.
stderr
=
new_out
,
new_err
...
...
kedifa/updater.py
View file @
4c2db470
from
__future__
import
print_function
from
__future__
import
print_function
try
:
from
six.moves
import
http_client
as
httplib
import
httplib
except
ImportError
:
from
http
import
client
as
httplib
import
json
import
json
import
os
import
os
import
requests
import
requests
...
...
setup.py
View file @
4c2db470
...
@@ -55,6 +55,7 @@ setup(
...
@@ -55,6 +55,7 @@ setup(
'requests'
,
# for getter and updater
'requests'
,
# for getter and updater
'zc.lockfile'
,
# for stateful updater
'zc.lockfile'
,
# for stateful updater
'urllib3 >= 1.18'
,
# https://github.com/urllib3/urllib3/issues/258
'urllib3 >= 1.18'
,
# https://github.com/urllib3/urllib3/issues/258
'six'
,
# for python 2 and 3 compatibility
'caucase'
,
# provides utils for certificate management;
'caucase'
,
# provides utils for certificate management;
# version requirement caucase >= 0.9.3 is dropped, as it
# version requirement caucase >= 0.9.3 is dropped, as it
# is not working in some cases, but fortunately KeDiFa is
# is not working in some cases, but fortunately KeDiFa is
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment