Merge lp:~nataliabidart/magicicada-protocol/change-python-namespace into lp:magicicada-protocol

Proposed by Natalia Bidart
Status: Merged
Approved by: Natalia Bidart
Approved revision: 173
Merged at revision: 173
Proposed branch: lp:~nataliabidart/magicicada-protocol/change-python-namespace
Merge into: lp:magicicada-protocol
Diff against target: 665 lines (+61/-148)
36 files modified
.bzrignore (+0/-4)
HACKING (+0/-33)
MANIFEST.in (+2/-5)
Makefile (+3/-3)
README (+2/-15)
magicicadaprotocol/__init__.py (+1/-1)
magicicadaprotocol/client.py (+2/-2)
magicicadaprotocol/delta.py (+1/-1)
magicicadaprotocol/dircontent.proto (+2/-2)
magicicadaprotocol/dircontent.py (+2/-1)
magicicadaprotocol/errors.py (+2/-2)
magicicadaprotocol/protocol.proto (+2/-2)
magicicadaprotocol/request.py (+2/-2)
magicicadaprotocol/sharersp.py (+1/-1)
magicicadaprotocol/tests/__init__.py (+1/-1)
magicicadaprotocol/tests/test_bytesproducer.py (+1/-1)
magicicadaprotocol/tests/test_client.py (+3/-4)
magicicadaprotocol/tests/test_context.py (+1/-1)
magicicadaprotocol/tests/test_delta_info.py (+1/-1)
magicicadaprotocol/tests/test_dircontent.py (+4/-3)
magicicadaprotocol/tests/test_errors.py (+1/-1)
magicicadaprotocol/tests/test_hashes.py (+1/-1)
magicicadaprotocol/tests/test_proxy_tunnel.py (+2/-1)
magicicadaprotocol/tests/test_public_file_info.py (+1/-1)
magicicadaprotocol/tests/test_putcontent.py (+3/-4)
magicicadaprotocol/tests/test_query.py (+1/-1)
magicicadaprotocol/tests/test_request.py (+2/-2)
magicicadaprotocol/tests/test_sharersp.py (+2/-2)
magicicadaprotocol/tests/test_throttling.py (+1/-1)
magicicadaprotocol/tests/test_volumes.py (+1/-1)
magicicadaprotocol/validators.py (+2/-2)
magicicadaprotocol/volumes.py (+1/-1)
samples/easy_client.py (+4/-4)
samples/ping_client.py (+2/-3)
setup.py (+4/-5)
ubuntuone/__init__.py (+0/-33)
To merge this branch: bzr merge lp:~nataliabidart/magicicada-protocol/change-python-namespace
Reviewer Review Type Date Requested Status
Facundo Batista Approve
Review via email: mp+343269@code.launchpad.net

Commit message

- Renamed python module to magicicadaprotocol, removing the need of the namespace package "ubuntuone".

To post a comment you must log in.
Revision history for this message
Facundo Batista (facundo) wrote :

Go!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
--- .bzrignore 2018-04-08 19:22:33 +0000
+++ .bzrignore 2018-04-14 22:31:56 +0000
@@ -1,11 +1,7 @@
1MANIFEST1MANIFEST
2build2build
3debian/files
4debian/ubuntuone-storage-protocol
5dist3dist
6_trial_temp4_trial_temp
7*.debhelper*
8*.substvars
9*_pb2.py5*_pb2.py
10*.pyc6*.pyc
11*.egg-info7*.egg-info
128
=== removed file 'HACKING'
--- HACKING 2010-11-12 14:36:58 +0000
+++ HACKING 1970-01-01 00:00:00 +0000
@@ -1,33 +0,0 @@
1Ubuntu One requires acceptance of the Canonical Contributor Agreement. You
2will need to follow the instructions at:
3
4http://www.canonical.com/contributors
5
6Once the agreement is accepted, you will be added to the Ubuntu One Contributor
7Agreement team on Launchpad, so that your branches may be merged in upstream.
8
9
10In order to run tests in ubuntuone-storage-protocol, you will first need
11to build the portion of code which uses Google Protocol Buffers.
12
13$: ./setup.py build
14
15Then you will need to run the tests. This will run lint and style checkers,
16and the unit tests for the package.
17
18$: ./run-tests
19
20
21Ubuntu One uses branch based development on Launchpad, and bugs to track
22features and issues. Make sure a bug is filed for the piece of code you wish
23to work on. When committing your changes, be sure to specify the bug # it
24fixes using the --fixes option in bzr.
25
26$: bzr commit --fixes=lp:<BUGNUMBER>
27
28If you forget to do this, you can link the branch manually on the Launchpad
29web page. After pushing your branch to Launchpad, you will need to propose it
30for merging into the parent branch. You can do this from the Launchpad web
31page for your branch. In order for your branch to be accepted, you will have
32to have accepted the Canonical Contributor Agreement as stated above, and
33there will need to be at least two approvals from Ubuntu One developers.
340
=== modified file 'MANIFEST.in'
--- MANIFEST.in 2013-05-23 18:58:06 +0000
+++ MANIFEST.in 2018-04-14 22:31:56 +0000
@@ -1,8 +1,5 @@
1include MANIFEST.in1include MANIFEST.in
2include COPYING HACKING README README.windows2include COPYING README
3include LICENSE LICENSE.OpenSSL3include LICENSE LICENSE.OpenSSL
4include run-tests4recursive-include magicicadaprotocol *.proto
5include *.pth
6recursive-include ubuntuone *.proto
7recursive-include samples *.py5recursive-include samples *.py
8recursive-include tests *.py
96
=== modified file 'Makefile'
--- Makefile 2018-04-08 19:22:33 +0000
+++ Makefile 2018-04-14 22:31:56 +0000
@@ -16,7 +16,7 @@
16# For further info, check http://launchpad.net/magicicada-protocol16# For further info, check http://launchpad.net/magicicada-protocol
1717
18ENV = $(CURDIR)/.env18ENV = $(CURDIR)/.env
19SRC_DIR = $(CURDIR)/ubuntuone19SRC_DIR = $(CURDIR)/magicicadaprotocol
20PATH := $(ENV)/bin:$(PATH)20PATH := $(ENV)/bin:$(PATH)
21PYTHON = $(ENV)/bin/python21PYTHON = $(ENV)/bin/python
22PYTHONPATH := $(ENV)/lib/python2.7:$(ENV)/lib/python2.7/site-packages:$(SRC_DIR):$(PYTHONPATH)22PYTHONPATH := $(ENV)/lib/python2.7:$(ENV)/lib/python2.7/site-packages:$(SRC_DIR):$(PYTHONPATH)
@@ -49,12 +49,12 @@
49 $(ENV)/bin/twine upload dist/*.whl49 $(ENV)/bin/twine upload dist/*.whl
5050
51test: lint51test: lint
52 SSL_CERTIFICATES_DIR=ubuntuone/storageprotocol/tests/certs PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python $(ENV)/bin/trial ubuntuone52 SSL_CERTIFICATES_DIR=$(SRC_DIR)/tests/certs PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python $(ENV)/bin/trial magicicadaprotocol
5353
54clean:54clean:
55 $(PYTHON) setup.py clean55 $(PYTHON) setup.py clean
56 find -name '*.pyc' -delete56 find -name '*.pyc' -delete
57 rm -rf build dist sdist _trial_temp ubuntuone_storageprotocol.egg-info57 rm -rf build dist sdist _trial_temp magicicadaprotocol.egg-info
5858
59lint: $(ENV)59lint: $(ENV)
60 $(ENV)/bin/flake8 --filename='*.py' --exclude='$(ENV),*_pb2.py,build'60 $(ENV)/bin/flake8 --filename='*.py' --exclude='$(ENV),*_pb2.py,build'
6161
=== modified file 'README'
--- README 2009-06-06 01:25:56 +0000
+++ README 2018-04-14 22:31:56 +0000
@@ -1,18 +1,5 @@
1This package contains definitions for the protocol messages used by the1This package contains definitions for the protocol messages used by the
2Ubuntu One file storage/sharing service, as well as python code for a2Magicicada file storage/sharing service (open source fork of Ubuntu One).
3minimal client to talk directly to the storage servers. Python code for
4local/offline functionality may be found in the ubuntuone-client package
5instead, as part of the official clients.
6
7This protocol applies only to the file storage service and not other
8Ubuntu One services.
9
10===
11
12Note: contributions to this package are accepted only from those who have
13signed the Ubuntu One Contributor agreement:
14
15 https://launchpad.net/~ubuntuone-contributor-agreement
163
17===4===
185
@@ -29,7 +16,7 @@
29doing, if you are installing on an Ubuntu system it is probably better16doing, if you are installing on an Ubuntu system it is probably better
30to build and install a Debian package. Recent versions of Ubuntu do not17to build and install a Debian package. Recent versions of Ubuntu do not
31load python modules from /usr/local by default, and you are likely to18load python modules from /usr/local by default, and you are likely to
32already have an installed ubuntuone-storage-protocol package in any case.19already have an installed magicicadaprotocol package in any case.
3320
34Protocol Overview:21Protocol Overview:
3522
3623
=== renamed directory 'ubuntuone/storageprotocol' => 'magicicadaprotocol'
=== modified file 'magicicadaprotocol/__init__.py'
--- ubuntuone/storageprotocol/__init__.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/__init__.py 2018-04-14 22:31:56 +0000
@@ -28,4 +28,4 @@
28# version. If you delete this exception statement from all source28# version. If you delete this exception statement from all source
29# files in the program, then also delete it here.29# files in the program, then also delete it here.
3030
31"""ubuntuone.storageprotocol package."""31"""magicicadaprotocol package."""
3232
=== modified file 'magicicadaprotocol/client.py'
--- ubuntuone/storageprotocol/client.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/client.py 2018-04-14 22:31:56 +0000
@@ -40,7 +40,7 @@
40from twisted.internet import reactor, defer40from twisted.internet import reactor, defer
41from twisted.python import log41from twisted.python import log
4242
43from ubuntuone.storageprotocol import (43from magicicadaprotocol import (
44 delta,44 delta,
45 protocol_pb2,45 protocol_pb2,
46 public_file_info,46 public_file_info,
@@ -1896,7 +1896,7 @@
1896 # ssl.ClientContextFactory())1896 # ssl.ClientContextFactory())
18971897
1898 # using ssl over a proxy1898 # using ssl over a proxy
1899 # from ubuntuone.storageprotocol import proxy_tunnel1899 # from magicicadaprotocol import proxy_tunnel
1900 # proxy_tunnel.connectHTTPS('localhost', 3128,1900 # proxy_tunnel.connectHTTPS('localhost', 3128,
1901 # 'localhost', 20101, StorageClientFactory(),1901 # 'localhost', 20101, StorageClientFactory(),
1902 # user="test", passwd="test")1902 # user="test", passwd="test")
19031903
=== modified file 'magicicadaprotocol/delta.py'
--- ubuntuone/storageprotocol/delta.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/delta.py 2018-04-14 22:31:56 +0000
@@ -30,7 +30,7 @@
3030
31"""Provides wrapper classes for delta nodes messages."""31"""Provides wrapper classes for delta nodes messages."""
3232
33from ubuntuone.storageprotocol import protocol_pb233from magicicadaprotocol import protocol_pb2
3434
35FILE = 035FILE = 0
36DIRECTORY = 136DIRECTORY = 1
3737
=== modified file 'magicicadaprotocol/dircontent.proto'
--- ubuntuone/storageprotocol/dircontent.proto 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/dircontent.proto 2018-04-14 22:31:56 +0000
@@ -27,9 +27,9 @@
27 version. If you delete this exception statement from all source27 version. If you delete this exception statement from all source
28 files in the program, then also delete it here.28 files in the program, then also delete it here.
29*/29*/
30package ubuntuone.storageprotocol;30package magicicadaprotocol;
3131
32option java_package = "com.ubuntuone.storageprotocol";32option java_package = "com.magicicadaprotocol";
33option java_outer_classname = "DirectoryContentProtocol";33option java_outer_classname = "DirectoryContentProtocol";
3434
35enum NodeType {35enum NodeType {
3636
=== modified file 'magicicadaprotocol/dircontent.py'
--- ubuntuone/storageprotocol/dircontent.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/dircontent.py 2018-04-14 22:31:56 +0000
@@ -31,7 +31,8 @@
31"""Standard routines for working with directory content."""31"""Standard routines for working with directory content."""
3232
33import re33import re
34from ubuntuone.storageprotocol.dircontent_pb2 import DirectoryContent34
35from magicicadaprotocol.dircontent_pb2 import DirectoryContent
3536
36ILLEGAL_FILENAMES = [u".", u".."]37ILLEGAL_FILENAMES = [u".", u".."]
37ILLEGAL_FILENAME_CHARS_RE_SOURCE = r'[\000/]'38ILLEGAL_FILENAME_CHARS_RE_SOURCE = r'[\000/]'
3839
=== modified file 'magicicadaprotocol/errors.py'
--- ubuntuone/storageprotocol/errors.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/errors.py 2018-04-14 22:31:56 +0000
@@ -32,7 +32,7 @@
3232
33import uuid33import uuid
3434
35from ubuntuone.storageprotocol import protocol_pb235from magicicadaprotocol import protocol_pb2
3636
3737
38class StorageProtocolError(Exception):38class StorageProtocolError(Exception):
@@ -149,7 +149,7 @@
149 share_id will be None if we got the exception without free space info.149 share_id will be None if we got the exception without free space info.
150 """150 """
151 # to avoid circular dependencies151 # to avoid circular dependencies
152 from ubuntuone.storageprotocol.request import ROOT152 from magicicadaprotocol.request import ROOT
153 super(QuotaExceededError, self).__init__(request, message)153 super(QuotaExceededError, self).__init__(request, message)
154 self.free_bytes = message.free_space_info.free_bytes154 self.free_bytes = message.free_space_info.free_bytes
155 if message.free_space_info.share_id:155 if message.free_space_info.share_id:
156156
=== modified file 'magicicadaprotocol/protocol.proto'
--- ubuntuone/storageprotocol/protocol.proto 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/protocol.proto 2018-04-14 22:31:56 +0000
@@ -27,9 +27,9 @@
27 version. If you delete this exception statement from all source27 version. If you delete this exception statement from all source
28 files in the program, then also delete it here.28 files in the program, then also delete it here.
29*/29*/
30package ubuntuone.storageprotocol;30package magicicadaprotocol;
3131
32option java_package = "com.ubuntuone.storageprotocol";32option java_package = "com.magicicadaprotocol";
33option java_outer_classname = "StorageProtocol";33option java_outer_classname = "StorageProtocol";
3434
35message Message {35message Message {
3636
=== modified file 'magicicadaprotocol/request.py'
--- ubuntuone/storageprotocol/request.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/request.py 2018-04-14 22:31:56 +0000
@@ -43,8 +43,8 @@
43from twisted.internet import defer43from twisted.internet import defer
44from zope.interface import implements44from zope.interface import implements
4545
46from ubuntuone.storageprotocol import protocol_pb2, validators46from magicicadaprotocol import protocol_pb2, validators
47from ubuntuone.storageprotocol.errors import (47from magicicadaprotocol.errors import (
48 StorageProtocolError, StorageProtocolErrorSizeTooBig,48 StorageProtocolError, StorageProtocolErrorSizeTooBig,
49 StorageProtocolProtocolError, StorageRequestError,49 StorageProtocolProtocolError, StorageRequestError,
50 RequestCancelledError, error_to_exception)50 RequestCancelledError, error_to_exception)
5151
=== modified file 'magicicadaprotocol/sharersp.py'
--- ubuntuone/storageprotocol/sharersp.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/sharersp.py 2018-04-14 22:31:56 +0000
@@ -32,7 +32,7 @@
3232
33import uuid33import uuid
3434
35from ubuntuone.storageprotocol import volumes35from magicicadaprotocol import volumes
3636
3737
38class ShareResponse(object):38class ShareResponse(object):
3939
=== modified file 'magicicadaprotocol/tests/__init__.py'
--- ubuntuone/storageprotocol/tests/__init__.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/tests/__init__.py 2018-04-14 22:31:56 +0000
@@ -26,4 +26,4 @@
26# version. If you delete this exception statement from all source26# version. If you delete this exception statement from all source
27# files in the program, then also delete it here.27# files in the program, then also delete it here.
2828
29"""Tests for ubuntuone.storageprotocol."""29"""Tests for magicicadaprotocol."""
3030
=== modified file 'magicicadaprotocol/tests/test_bytesproducer.py'
--- ubuntuone/storageprotocol/tests/test_bytesproducer.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/tests/test_bytesproducer.py 2018-04-14 22:31:56 +0000
@@ -38,7 +38,7 @@
38from twisted.internet import defer, task38from twisted.internet import defer, task
39from twisted.trial.unittest import TestCase as TwistedTestCase39from twisted.trial.unittest import TestCase as TwistedTestCase
4040
41from ubuntuone.storageprotocol import client, protocol_pb241from magicicadaprotocol import client, protocol_pb2
4242
4343
44class FakeRequest(object):44class FakeRequest(object):
4545
=== modified file 'magicicadaprotocol/tests/test_client.py'
--- ubuntuone/storageprotocol/tests/test_client.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/tests/test_client.py 2018-04-14 22:31:56 +0000
@@ -42,8 +42,8 @@
42from twisted.trial.unittest import TestCase as TwistedTestCase42from twisted.trial.unittest import TestCase as TwistedTestCase
43from twisted.web import server, resource43from twisted.web import server, resource
4444
45from ubuntuone.storageprotocol import protocol_pb2, sharersp, delta, request45from magicicadaprotocol import delta, protocol_pb2, request, sharersp, volumes
46from ubuntuone.storageprotocol.client import (46from magicicadaprotocol.client import (
47 Authenticate,47 Authenticate,
48 BytesMessageProducer,48 BytesMessageProducer,
49 ChangePublicAccess,49 ChangePublicAccess,
@@ -60,8 +60,7 @@
60 Unlink,60 Unlink,
61)61)
6262
63from ubuntuone.storageprotocol import volumes63from magicicadaprotocol.tests import test_delta_info
64from ubuntuone.storageprotocol.tests import test_delta_info
6564
6665
67PATH = u'~/Documents/pdfs/moño/'66PATH = u'~/Documents/pdfs/moño/'
6867
=== modified file 'magicicadaprotocol/tests/test_context.py'
--- ubuntuone/storageprotocol/tests/test_context.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/tests/test_context.py 2018-04-14 22:31:56 +0000
@@ -35,7 +35,7 @@
35from twisted.trial import unittest35from twisted.trial import unittest
36from twisted.web import client, resource, server36from twisted.web import client, resource, server
3737
38from ubuntuone.storageprotocol import context38from magicicadaprotocol import context
3939
4040
41class FakeCerts(object):41class FakeCerts(object):
4242
=== modified file 'magicicadaprotocol/tests/test_delta_info.py'
--- ubuntuone/storageprotocol/tests/test_delta_info.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/tests/test_delta_info.py 2018-04-14 22:31:56 +0000
@@ -32,7 +32,7 @@
3232
33import unittest33import unittest
3434
35from ubuntuone.storageprotocol import (35from magicicadaprotocol import (
36 protocol_pb2,36 protocol_pb2,
37 delta,37 delta,
38 content_hash,38 content_hash,
3939
=== modified file 'magicicadaprotocol/tests/test_dircontent.py'
--- ubuntuone/storageprotocol/tests/test_dircontent.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/tests/test_dircontent.py 2018-04-14 22:31:56 +0000
@@ -33,11 +33,12 @@
33from __future__ import with_statement33from __future__ import with_statement
3434
35from cStringIO import StringIO35from cStringIO import StringIO
36from ubuntuone.storageprotocol.dircontent import (36from unittest import TestCase
37
38from magicicadaprotocol.dircontent import (
37 parse_dir_content, write_dir_content, DirEntry,39 parse_dir_content, write_dir_content, DirEntry,
38 normalize_filename, validate_filename, InvalidFilename)40 normalize_filename, validate_filename, InvalidFilename)
39from ubuntuone.storageprotocol.dircontent_pb2 import (DIRECTORY, FILE)41from magicicadaprotocol.dircontent_pb2 import DIRECTORY, FILE
40from unittest import TestCase
4142
4243
43class TestFilenames(TestCase):44class TestFilenames(TestCase):
4445
=== modified file 'magicicadaprotocol/tests/test_errors.py'
--- ubuntuone/storageprotocol/tests/test_errors.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/tests/test_errors.py 2018-04-14 22:31:56 +0000
@@ -33,7 +33,7 @@
33import unittest33import unittest
34import uuid34import uuid
3535
36from ubuntuone.storageprotocol import errors, protocol_pb236from magicicadaprotocol import errors, protocol_pb2
3737
38REQ_ARGS = dict(request=None, message=protocol_pb2.Message())38REQ_ARGS = dict(request=None, message=protocol_pb2.Message())
3939
4040
=== modified file 'magicicadaprotocol/tests/test_hashes.py'
--- ubuntuone/storageprotocol/tests/test_hashes.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/tests/test_hashes.py 2018-04-14 22:31:56 +0000
@@ -35,7 +35,7 @@
35import pickle35import pickle
36import unittest36import unittest
3737
38from ubuntuone.storageprotocol.content_hash import (38from magicicadaprotocol.content_hash import (
39 MagicContentHash,39 MagicContentHash,
40 SHA1ContentHash,40 SHA1ContentHash,
41 content_hash_factory,41 content_hash_factory,
4242
=== modified file 'magicicadaprotocol/tests/test_proxy_tunnel.py'
--- ubuntuone/storageprotocol/tests/test_proxy_tunnel.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/tests/test_proxy_tunnel.py 2018-04-14 22:31:56 +0000
@@ -36,7 +36,8 @@
36from twisted.internet import defer36from twisted.internet import defer
37from twisted.trial.unittest import TestCase as TwistedTestCase37from twisted.trial.unittest import TestCase as TwistedTestCase
38from twisted.test.proto_helpers import StringTransport38from twisted.test.proto_helpers import StringTransport
39from ubuntuone.storageprotocol.proxy_tunnel import ProxyTunnelFactory39
40from magicicadaprotocol.proxy_tunnel import ProxyTunnelFactory
4041
4142
42class FakeTransport(StringTransport):43class FakeTransport(StringTransport):
4344
=== modified file 'magicicadaprotocol/tests/test_public_file_info.py'
--- ubuntuone/storageprotocol/tests/test_public_file_info.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/tests/test_public_file_info.py 2018-04-14 22:31:56 +0000
@@ -31,7 +31,7 @@
3131
32import unittest32import unittest
3333
34from ubuntuone.storageprotocol import protocol_pb2, public_file_info, request34from magicicadaprotocol import protocol_pb2, public_file_info, request
3535
36SHARE = "share_id"36SHARE = "share_id"
37NODE = "node_id"37NODE = "node_id"
3838
=== modified file 'magicicadaprotocol/tests/test_putcontent.py'
--- ubuntuone/storageprotocol/tests/test_putcontent.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/tests/test_putcontent.py 2018-04-14 22:31:56 +0000
@@ -34,12 +34,11 @@
3434
35from StringIO import StringIO35from StringIO import StringIO
3636
37from mocker import Mocker, ANY
37from twisted.test.proto_helpers import StringTransport38from twisted.test.proto_helpers import StringTransport
3839
39from ubuntuone.storageprotocol.client import PutContent, StorageClient40from magicicadaprotocol import protocol_pb2, request
40from ubuntuone.storageprotocol import request41from magicicadaprotocol.client import PutContent, StorageClient
41from ubuntuone.storageprotocol import protocol_pb2
42from mocker import Mocker, ANY
4342
4443
45class TestOffset(unittest.TestCase):44class TestOffset(unittest.TestCase):
4645
=== modified file 'magicicadaprotocol/tests/test_query.py'
--- ubuntuone/storageprotocol/tests/test_query.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/tests/test_query.py 2018-04-14 22:31:56 +0000
@@ -33,7 +33,7 @@
33import os33import os
34import unittest34import unittest
3535
36from ubuntuone.storageprotocol.client import MultiQuery36from magicicadaprotocol.client import MultiQuery
3737
3838
39class TestQuery10(unittest.TestCase):39class TestQuery10(unittest.TestCase):
4040
=== modified file 'magicicadaprotocol/tests/test_request.py'
--- ubuntuone/storageprotocol/tests/test_request.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/tests/test_request.py 2018-04-14 22:31:56 +0000
@@ -38,8 +38,8 @@
38from twisted.python.failure import Failure38from twisted.python.failure import Failure
39from twisted.trial.unittest import TestCase as TwistedTestCase39from twisted.trial.unittest import TestCase as TwistedTestCase
4040
41from ubuntuone.storageprotocol import errors, protocol_pb241from magicicadaprotocol import errors, protocol_pb2
42from ubuntuone.storageprotocol.request import (42from magicicadaprotocol.request import (
43 RequestHandler, Request, RequestResponse)43 RequestHandler, Request, RequestResponse)
4444
4545
4646
=== modified file 'magicicadaprotocol/tests/test_sharersp.py'
--- ubuntuone/storageprotocol/tests/test_sharersp.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/tests/test_sharersp.py 2018-04-14 22:31:56 +0000
@@ -35,8 +35,8 @@
35from twisted.internet import defer35from twisted.internet import defer
36from twisted.trial.unittest import TestCase36from twisted.trial.unittest import TestCase
3737
38from ubuntuone.storageprotocol.sharersp import ShareResponse38from magicicadaprotocol import protocol_pb2
39from ubuntuone.storageprotocol import protocol_pb239from magicicadaprotocol.sharersp import ShareResponse
4040
4141
42class ShareResponseFromParamsTest(TestCase):42class ShareResponseFromParamsTest(TestCase):
4343
=== modified file 'magicicadaprotocol/tests/test_throttling.py'
--- ubuntuone/storageprotocol/tests/test_throttling.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/tests/test_throttling.py 2018-04-14 22:31:56 +0000
@@ -35,7 +35,7 @@
35from twisted.internet import defer, task35from twisted.internet import defer, task
36from twisted.trial.unittest import TestCase as TwistedTestCase36from twisted.trial.unittest import TestCase as TwistedTestCase
3737
38from ubuntuone.storageprotocol import client38from magicicadaprotocol import client
3939
4040
41class FakeClient(object):41class FakeClient(object):
4242
=== modified file 'magicicadaprotocol/tests/test_volumes.py'
--- ubuntuone/storageprotocol/tests/test_volumes.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/tests/test_volumes.py 2018-04-14 22:31:56 +0000
@@ -35,7 +35,7 @@
3535
36from copy import copy36from copy import copy
3737
38from ubuntuone.storageprotocol import protocol_pb2, volumes38from magicicadaprotocol import protocol_pb2, volumes
3939
40PATH = u'~/Documents/pdfs/moño/'40PATH = u'~/Documents/pdfs/moño/'
41NAME = u'What a beatiful volume'41NAME = u'What a beatiful volume'
4242
=== modified file 'magicicadaprotocol/validators.py'
--- ubuntuone/storageprotocol/validators.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/validators.py 2018-04-14 22:31:56 +0000
@@ -84,7 +84,7 @@
8484
85 """85 """
86 # circular import86 # circular import
87 from ubuntuone.storageprotocol import request87 from magicicadaprotocol import request
88 is_valid = (a_hash == '' or a_hash == request.UNKNOWN_HASH or88 is_valid = (a_hash == '' or a_hash == request.UNKNOWN_HASH or
89 is_valid_sha1(a_hash))89 is_valid_sha1(a_hash))
90 return is_valid90 return is_valid
@@ -95,7 +95,7 @@
95 Recursively validate a message's fields95 Recursively validate a message's fields
96 """96 """
97 is_invalid = []97 is_invalid = []
98 from ubuntuone.storageprotocol import validators # this is us!98 from magicicadaprotocol import validators # this is us!
99 for descriptor, submsg in message.ListFields():99 for descriptor, submsg in message.ListFields():
100 if isinstance(submsg, CONTAINER_CLASSES):100 if isinstance(submsg, CONTAINER_CLASSES):
101 # containers are iterables that have messages in them101 # containers are iterables that have messages in them
102102
=== modified file 'magicicadaprotocol/volumes.py'
--- ubuntuone/storageprotocol/volumes.py 2018-04-08 19:38:42 +0000
+++ magicicadaprotocol/volumes.py 2018-04-14 22:31:56 +0000
@@ -32,7 +32,7 @@
3232
33import uuid33import uuid
3434
35from ubuntuone.storageprotocol import protocol_pb235from magicicadaprotocol import protocol_pb2
3636
37_direction_prot2nice = {37_direction_prot2nice = {
38 protocol_pb2.Shares.FROM_ME: "from_me",38 protocol_pb2.Shares.FROM_ME: "from_me",
3939
=== modified file 'samples/easy_client.py'
--- samples/easy_client.py 2018-04-08 19:38:42 +0000
+++ samples/easy_client.py 2018-04-14 22:31:56 +0000
@@ -38,10 +38,10 @@
3838
39from twisted.internet import reactor, defer39from twisted.internet import reactor, defer
4040
41from ubuntuone.storageprotocol.client import (41from magicicadaprotocol import request, protocol_pb2
42from magicicadaprotocol.client import (
42 StorageClientFactory, StorageClient)43 StorageClientFactory, StorageClient)
43from ubuntuone.storageprotocol import request, protocol_pb244from magicicadaprotocol.dircontent_pb2 import (
44from ubuntuone.storageprotocol.dircontent_pb2 import (
45 DirectoryContent, DIRECTORY)45 DirectoryContent, DIRECTORY)
4646
4747
@@ -302,7 +302,7 @@
302 NUM_CLIENTS = 200302 NUM_CLIENTS = 200
303 NUM_FILES = 50303 NUM_FILES = 50
304304
305 port_num = int(open("tmp/ubuntuone-api.port").read())305 port_num = int(open("tmp/magicicada-api.port").read())
306 deferred = authenticated_client("localhost", int(port_num))306 deferred = authenticated_client("localhost", int(port_num))
307 deferred.addCallback(create_dirs, NUM_CLIENTS)307 deferred.addCallback(create_dirs, NUM_CLIENTS)
308308
309309
=== modified file 'samples/ping_client.py'
--- samples/ping_client.py 2018-04-08 19:38:42 +0000
+++ samples/ping_client.py 2018-04-14 22:31:56 +0000
@@ -32,8 +32,7 @@
3232
33from twisted.internet import reactor33from twisted.internet import reactor
3434
35from ubuntuone.storageprotocol.client import (35from magicicadaprotocol.client import StorageClientFactory, StorageClient
36 StorageClientFactory, StorageClient)
3736
3837
39class PingClient(StorageClient):38class PingClient(StorageClient):
@@ -83,7 +82,7 @@
83 # ssl.ClientContextFactory())82 # ssl.ClientContextFactory())
8483
85 # using ssl over a proxy84 # using ssl over a proxy
86 # from ubuntuone.storageprotocol import proxy_tunnel85 # from magicicadaprotocol import proxy_tunnel
87 # proxy_tunnel.connectHTTPS('localhost', 3128,86 # proxy_tunnel.connectHTTPS('localhost', 3128,
88 # 'localhost', 20101, StorageClientFactory(),87 # 'localhost', 20101, StorageClientFactory(),
89 # user="test", passwd="test")88 # user="test", passwd="test")
9089
=== modified file 'setup.py'
--- setup.py 2018-04-14 22:08:27 +0000
+++ setup.py 2018-04-14 22:31:56 +0000
@@ -39,7 +39,7 @@
39 " package installed?\n")39 " package installed?\n")
40 sys.exit(-1)40 sys.exit(-1)
4141
42 for source in glob.glob('ubuntuone/storageprotocol/*.proto'):42 for source in glob.glob('magicicadaprotocol/*.proto'):
43 # glob works with unix and does not like \ in the search path,43 # glob works with unix and does not like \ in the search path,
44 # we use / and correct the issue on windows when appropiate44 # we use / and correct the issue on windows when appropiate
45 if sys.platform == "win32":45 if sys.platform == "win32":
@@ -58,7 +58,7 @@
5858
59 def run(self):59 def run(self):
60 """Do the clean up"""60 """Do the clean up"""
61 for source in glob.glob("ubuntuone/storageprotocol/*_pb2.py"):61 for source in glob.glob("magicicadaprotocol/*_pb2.py"):
62 os.unlink(source)62 os.unlink(source)
6363
64 # Call the parent class clean command64 # Call the parent class clean command
@@ -66,9 +66,8 @@
6666
6767
68setup(68setup(
69 name='ubuntuone-storageprotocol',69 name='magicicadaprotocol',
70 namespace_packages=['ubuntuone'],70 version='2.0',
71 version='1.0',
72 description=(71 description=(
73 'The protocol implementation for the Magicicada filesync server '72 'The protocol implementation for the Magicicada filesync server '
74 '(open source fork of the Ubuntu One filesync).'),73 '(open source fork of the Ubuntu One filesync).'),
7574
=== removed directory 'ubuntuone'
=== removed file 'ubuntuone/__init__.py'
--- ubuntuone/__init__.py 2018-04-08 19:38:42 +0000
+++ ubuntuone/__init__.py 1970-01-01 00:00:00 +0000
@@ -1,33 +0,0 @@
1# -*- coding: utf-8 -*-
2#
3# Copyright 2009-2012 Canonical Ltd.
4# Copyright 2015-2018 Chicharreros (https://launchpad.net/~chicharreros)
5#
6# This program is free software: you can redistribute it and/or modify it
7# under the terms of the GNU Affero General Public License version 3,
8# as published by the Free Software Foundation.
9#
10# This program is distributed in the hope that it will be useful, but
11# WITHOUT ANY WARRANTY; without even the implied warranties of
12# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
13# PURPOSE. See the GNU Affero General Public License for more details.
14#
15# You should have received a copy of the GNU Affero General Public License
16# along with this program. If not, see <http://www.gnu.org/licenses/>.
17#
18# In addition, as a special exception, the copyright holders give
19# permission to link the code of portions of this program with the
20# OpenSSL library under certain conditions as described in each
21# individual source file, and distribute linked combinations
22# including the two.
23# You must obey the GNU General Public License in all respects
24# for all of the code used other than OpenSSL. If you modify
25# file(s) with this exception, you may extend this exception to your
26# version of the file(s), but you are not obligated to do so. If you
27# do not wish to do so, delete this exception statement from your
28# version. If you delete this exception statement from all source
29# files in the program, then also delete it here.
30
31"""ubuntuone package."""
32
33__import__('pkg_resources').declare_namespace(__name__)

Subscribers

People subscribed via source and target branches

to all changes: