The change is for exposing ssh key to the API needed for Quickly. We don't allow uploading or setting it directly yet (this will be an UDS discussion).
output of make lint, I added also the testsuite call too:
$ make lint
utilities/shhh.py PYTHONPATH= python2.5 bootstrap.py\ --ez_setup-source=ez_setup.py \
--download-base=download-cache/dist --eggs=eggs
Enter passphrase for key '/home/ubuntu/.ssh/id_rsa':
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
lib/lp/registry/interfaces/ssh.py
19: 'export_read_operation' imported but unused
19: 'export_as_webservice_collection' imported but unused
19: 'operation_parameters' imported but unused
19: 'collection_default_content' imported but unused
19: 'operation_returns_collection_of' imported but unused
== Pylint notices ==
lib/lp/registry/interfaces/person.py
520: [C0301] Line too long (80/78)
53: [F0401] Unable to import 'lazr.enum' (No module named enum)
54: [F0401] Unable to import 'lazr.lifecycle.snapshot' (No module named lifecycle)
55: [F0401] Unable to import 'lazr.restful.interface' (No module named restful)
56: [F0401] Unable to import 'lazr.restful.declarations' (No module named restful)
63: [F0401] Unable to import 'lazr.restful.fields' (No module named restful)
410: [E1002, PersonNameField._validate] Use super on an old style class
1404: [C0322, IPersonEditRestricted.addMember] Operator not preceded by a space
status=copy_field(ITeamMembership['status']),
^
comment=Text(required=False))
@export_write_operation()
def addMember(person, reviewer, status=TeamMembershipStatus.APPROVED,
comment=None, force_team_add=False,
may_subscribe_to_list=True):
1445: [C0322, IPersonEditRestricted.acceptInvitationToBeMemberOf] Operator not preceded by a space
comment=Text())
^
@export_write_operation()
def acceptInvitationToBeMemberOf(team, comment):
1457: [C0322, IPersonEditRestricted.declineInvitationToBeMemberOf] Operator not preceded by a space
comment=Text())
^
@export_write_operation()
def declineInvitationToBeMemberOf(team, comment):
1755: [C0322, IPersonSet.newTeam] Operator not preceded by a space
defaultmembershipperiod='default_membership_period',
^
defaultrenewalperiod='default_renewal_period')
@operation_parameters(
subscriptionpolicy=Choice(
title=_('Subscription policy'), vocabulary=TeamSubscriptionPolicy,
required=False, default=TeamSubscriptionPolicy.MODERATED))
@export_factory_operation(
ITeam, ['name', 'displayname', 'teamdescription',
'defaultmembershipperiod', 'defaultrenewalperiod'])
def newTeam(teamowner, name, displayname, teamdescription=None,
subscriptionpolicy=TeamSubscriptionPolicy.MODERATED,
defaultmembershipperiod=None, defaultrenewalperiod=None):
1824: [C0322, IPersonSet.findPerson] Operator not preceded by a space
created_after=Datetime(
^
title=_("Created after"), required=False),
created_before=Datetime(
title=_("Created before"), required=False),
)
@operation_returns_collection_of(IPerson)
@export_read_operation()
def findPerson(text="", exclude_inactive_accounts=True,
must_have_email=False,
created_after=None, created_before=None):
lib/lp/registry/interfaces/ssh.py
18: [F0401] Unable to import 'lazr.enum' (No module named enum)
19: [F0401] Unable to import 'lazr.restful.declarations' (No module named restful)
19: [W0611] Unused import export_read_operation
19: [W0611] Unused import operation_returns_collection_of
19: [W0611] Unused import collection_default_content
19: [W0611] Unused import operation_parameters
19: [W0611] Unused import export_as_webservice_collection
ubuntu@ubuntu:~/launchpad/lp-branches/devel$ make^C
ubuntu@ubuntu:~/launchpad/lp-branches/devel$ ./bin/test -1cvvt webservice/xx-person.txt
Running tests at level 1
Running canonical.testing.layers.PageTestLayer tests:
Set up canonical.testing.layers.BaseLayer in 0.048 seconds.
Set up canonical.testing.layers.DatabaseLayer in 9.500 seconds.
Set up canonical.testing.layers.LibrarianLayer in 31.812 seconds.
Set up canonical.testing.layers.MemcachedLayer in 0.262 seconds.
Set up canonical.testing.layers.LaunchpadLayer in 0.000 seconds.
Set up canonical.testing.layers.FunctionalLayer in 8.642 seconds.
Set up canonical.testing.layers.LaunchpadFunctionalLayer in 0.000 seconds.
Set up canonical.testing.layers.GoogleServiceLayer in 5.243 seconds.
Set up canonical.testing.layers.PageTestLayer in 0.007 seconds.
Running:
lib/lp/registry/tests/../stories/webservice/xx-person.txt
Ran 45 tests with 0 failures and 0 errors in 16.329 seconds.
Tearing down left over layers:
Tear down canonical.testing.layers.PageTestLayer in 0.000 seconds.
Tear down canonical.testing.layers.LaunchpadFunctionalLayer in 0.000 seconds.
Tear down canonical.testing.layers.LaunchpadLayer in 0.000 seconds.
Tear down canonical.testing.layers.LibrarianLayer in 0.849 seconds.
Tear down canonical.testing.layers.MemcachedLayer in 5.023 seconds.
Tear down canonical.testing.layers.GoogleServiceLayer in 0.126 seconds.
Tear down canonical.testing.layers.FunctionalLayer ... not supported
Tear down canonical.testing.layers.DatabaseLayer in 0.078 seconds.
Tear down canonical.testing.layers.BaseLayer in 0.000 seconds.
There are some import that can be cleaned, but it was the same on jml's branch and other interface. Not sure if you want to get that remove for futur extension easyness.
The branch has been made in a pair programming session with jml, that's why I didn't added any more detail about it. bazaar. launchpad. net/~jml/ launchpad/ expose- gpgkeys- bug-389872/
You can see inspiration and pair session programming on jml's gpg branch: http://
The change is for exposing ssh key to the API needed for Quickly. We don't allow uploading or setting it directly yet (this will be an UDS discussion).
https:/ /bugs.edge. launchpad. net/launchpad- registry/ +bug/357235 is for the corresponding bug report. Again, we don't upload the ssh key/setting is right now.
output of make lint, I added also the testsuite call too:
--ez_ setup-source= ez_setup. py \ base=download- cache/dist --eggs=eggs ubuntu/ .ssh/id_ rsa':
$ make lint
utilities/shhh.py PYTHONPATH= python2.5 bootstrap.py\
--download-
Enter passphrase for key '/home/
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: registry/ browser/ configure. zcml registry/ browser/ tests/test_ sshkey. py registry/ interfaces/ person. py registry/ interfaces/ ssh.py registry/ stories/ webservice/ xx-person. txt
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
== Pyflakes notices ==
lib/lp/ registry/ interfaces/ ssh.py read_operation' imported but unused as_webservice_ collection' imported but unused parameters' imported but unused default_ content' imported but unused returns_ collection_ of' imported but unused
19: 'export_
19: 'export_
19: 'operation_
19: 'collection_
19: 'operation_
== Pylint notices ==
lib/lp/ registry/ interfaces/ person. py .snapshot' (No module named lifecycle) interface' (No module named restful) declarations' (No module named restful) fields' (No module named restful) ._validate] Use super on an old style class ricted. addMember] Operator not preceded by a space copy_field( ITeamMembership ['status' ]), Text(required= False)) write_operation () TeamMembershipS tatus.APPROVED, add=False, subscribe_ to_list= True): ricted. acceptInvitatio nToBeMemberOf] Operator not preceded by a space write_operation () nToBeMemberOf( team, comment): ricted. declineInvitati onToBeMemberOf] Operator not preceded by a space write_operation () onToBeMemberOf( team, comment): ershipperiod= 'default_ membership_ period' , walperiod= 'default_ renewal_ period' ) parameters( npolicy= Choice( _('Subscription policy'), vocabulary= TeamSubscriptio nPolicy, TeamSubscriptio nPolicy. MODERATED) ) factory_ operation( bershipperiod' , 'defaultrenewal period' ]) =None, npolicy= TeamSubscriptio nPolicy. MODERATED, ershipperiod= None, defaultrenewalp eriod=None) : findPerson] Operator not preceded by a space after=Datetime( _("Created after"), required=False), before= Datetime( _("Created before"), required=False), returns_ collection_ of(IPerson) read_operation( ) inactive_ accounts= True, have_email= False, after=None, created_ before= None):
520: [C0301] Line too long (80/78)
53: [F0401] Unable to import 'lazr.enum' (No module named enum)
54: [F0401] Unable to import 'lazr.lifecycle
55: [F0401] Unable to import 'lazr.restful.
56: [F0401] Unable to import 'lazr.restful.
63: [F0401] Unable to import 'lazr.restful.
410: [E1002, PersonNameField
1404: [C0322, IPersonEditRest
status=
^
comment=
@export_
def addMember(person, reviewer, status=
comment=None, force_team_
may_
1445: [C0322, IPersonEditRest
comment=Text())
^
@export_
def acceptInvitatio
1457: [C0322, IPersonEditRest
comment=Text())
^
@export_
def declineInvitati
1755: [C0322, IPersonSet.newTeam] Operator not preceded by a space
defaultmemb
^
defaultrene
@operation_
subscriptio
title=
required=False, default=
@export_
ITeam, ['name', 'displayname', 'teamdescription',
'defaultmem
def newTeam(teamowner, name, displayname, teamdescription
subscriptio
defaultmemb
1824: [C0322, IPersonSet.
created_
^
title=
created_
title=
)
@operation_
@export_
def findPerson(text="", exclude_
must_
created_
lib/lp/ registry/ interfaces/ ssh.py declarations' (No module named restful) read_operation returns_ collection_ of default_ content parameters as_webservice_ collection ubuntu: ~/launchpad/ lp-branches/ devel$ make^C ubuntu: ~/launchpad/ lp-branches/ devel$ ./bin/test -1cvvt webservice/ xx-person. txt testing. layers. PageTestLayer tests: testing. layers. BaseLayer in 0.048 seconds. testing. layers. DatabaseLayer in 9.500 seconds. testing. layers. LibrarianLayer in 31.812 seconds. testing. layers. MemcachedLayer in 0.262 seconds. testing. layers. LaunchpadLayer in 0.000 seconds. testing. layers. FunctionalLayer in 8.642 seconds. testing. layers. LaunchpadFuncti onalLayer in 0.000 seconds. testing. layers. GoogleServiceLa yer in 5.243 seconds. testing. layers. PageTestLayer in 0.007 seconds. registry/ tests/. ./stories/ webservice/ xx-person. txt testing. layers. PageTestLayer in 0.000 seconds. testing. layers. LaunchpadFuncti onalLayer in 0.000 seconds. testing. layers. LaunchpadLayer in 0.000 seconds. testing. layers. LibrarianLayer in 0.849 seconds. testing. layers. MemcachedLayer in 5.023 seconds. testing. layers. GoogleServiceLa yer in 0.126 seconds. testing. layers. FunctionalLayer ... not supported testing. layers. DatabaseLayer in 0.078 seconds. testing. layers. BaseLayer in 0.000 seconds.
18: [F0401] Unable to import 'lazr.enum' (No module named enum)
19: [F0401] Unable to import 'lazr.restful.
19: [W0611] Unused import export_
19: [W0611] Unused import operation_
19: [W0611] Unused import collection_
19: [W0611] Unused import operation_
19: [W0611] Unused import export_
ubuntu@
ubuntu@
Running tests at level 1
Running canonical.
Set up canonical.
Set up canonical.
Set up canonical.
Set up canonical.
Set up canonical.
Set up canonical.
Set up canonical.
Set up canonical.
Set up canonical.
Running:
lib/lp/
Ran 45 tests with 0 failures and 0 errors in 16.329 seconds.
Tearing down left over layers:
Tear down canonical.
Tear down canonical.
Tear down canonical.
Tear down canonical.
Tear down canonical.
Tear down canonical.
Tear down canonical.
Tear down canonical.
Tear down canonical.
There are some import that can be cleaned, but it was the same on jml's branch and other interface. Not sure if you want to get that remove for futur extension easyness.
So, I'm resubmit the branch now :)