--- a/cubicweb/repoapi.py Fri Mar 10 14:07:15 2017 +0100
+++ b/cubicweb/repoapi.py Fri Mar 10 16:14:05 2017 +0100
@@ -23,7 +23,6 @@
from logilab.common.deprecation import class_deprecated
-from cubicweb.utils import parse_repo_uri
from cubicweb import AuthenticationError
from cubicweb.server.session import Connection
--- a/cubicweb/test/unittest_utils.py Fri Mar 10 14:07:15 2017 +0100
+++ b/cubicweb/test/unittest_utils.py Fri Mar 10 16:14:05 2017 +0100
@@ -33,7 +33,7 @@
from cubicweb import Binary, Unauthorized
from cubicweb.devtools.testlib import CubicWebTC
from cubicweb.utils import (make_uid, UStringIO, RepeatList, HTMLHead,
- QueryCache, parse_repo_uri)
+ QueryCache)
from cubicweb.entity import Entity
try:
@@ -59,18 +59,6 @@
d.add(uid)
-class TestParseRepoUri(TestCase):
-
- def test_parse_repo_uri(self):
- self.assertEqual(('inmemory', None, 'myapp'),
- parse_repo_uri('myapp'))
- self.assertEqual(('inmemory', None, 'myapp'),
- parse_repo_uri('inmemory://myapp'))
- with self.assertRaises(NotImplementedError):
- parse_repo_uri('foo://bar')
-
-
-
class TestQueryCache(TestCase):
def test_querycache(self):
c = QueryCache(ceiling=20)
--- a/cubicweb/utils.py Fri Mar 10 14:07:15 2017 +0100
+++ b/cubicweb/utils.py Fri Mar 10 16:14:05 2017 +0100
@@ -37,7 +37,6 @@
from logging import getLogger
from six import text_type
-from six.moves.urllib.parse import urlparse
from logilab.mtconverter import xml_escape
from logilab.common.deprecation import deprecated
@@ -585,21 +584,6 @@
return 'javascript: ' + PERCENT_IN_URLQUOTE_RE.sub(r'%25', javascript_code)
-def parse_repo_uri(uri):
- """ transform a command line uri into a (protocol, hostport, appid), e.g:
- <myapp> -> 'inmemory', None, '<myapp>'
- inmemory://<myapp> -> 'inmemory', None, '<myapp>'
- """
- parseduri = urlparse(uri)
- scheme = parseduri.scheme
- if scheme == '':
- return ('inmemory', None, parseduri.path)
- if scheme == 'inmemory':
- return (scheme, None, parseduri.netloc)
- raise NotImplementedError('URI protocol not implemented for `%s`' % uri)
-
-
-
logger = getLogger('cubicweb.utils')
class QueryCache(object):