On Wed, 24 Jul 2013 12:00:45 -0700
bjmc <notifications@github.com> wrote:

> > @@ -416,6 +466,27 @@ def post_email_validation(self,
> > validation_code): params = {'validation_code': validation_code}
> >          return self._issue_rest_request(url, http_method='POST',
> > params=params) 
> > +    def post_rsa_key(self, key_name, rsa_key=None,
> > rsa_key_file=None):
> > +        if rsa_key_file is not None:
> > +             with open(rsa_key_file, 'r') as key_file:
> > +                 key = key_file.readline()
> > +        elif rsa_key is not None:
> > +             key = rsa_key
> > +        else:
> > +            raise AttributeError("No rsa key was specified")
> > +        
> > +        path = '/users/'+self.client+'/credentials/ssh2'
> > +        params = {'alias': key_name, 'ssh_key': key}
> > +        return self._issue_rest_request(path, http_method='POST',
> > params=params) +
> > +    def get_rsa_key_list(self):
> > +        path = '/users/'+self.client+'/credentials'
> 
> Haha. I'm glad they deprecated it. It makes no sense that % means
> "modulo" and also "string format" ... those things have nothing in
> common.
I have no problem with the same character be used for two unrelated
operators. If they were related then it might be confusing. Also printf
family has used % to mark format specifiers, so the % has a nice
association with formatting and interpolation.

Back to more relevant discussion, what version of Python are we
targeting? I think we should at least support 2.6, which does have
str.format. This is what the transfer-api requires - I've had a few
users with older Python in restrictive environments, but they found
workarounds eventually and making it work with 2.4/5 never became a
priority. In general I like to support older versions when it's not too
hard. Sometimes it's better to use the old deprecated stuff,
depending on user requirements.


> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/globusonline/python-nexus-client/pull/1/files#r5380640