python-fedora: Refactoring of variable and parameter names

Toshio Kuratomi a.badger at gmail.com
Wed Jun 4 00:49:15 UTC 2008


With some prompting from lmacken, I've just committed the attached patch 
to python-fedora-devel.  This brings the names of variables used in 
python-fedora into conformance with PEP8.  However, it does cause 
breakage in public instance and class variables as well as the parameter 
names.  Since this is destined for 0.3 which has incompatible changes, 
this is the time for these changes.

If this is considered too much of a problem to port apps to for a 
cosmetic change, please holler now so we can revert before too many 
other changes accumulate on top of this.

Also note, I've started compiling a list of incompatibilities between 
0.2.99.11.1 and what will be 0.3.  These are listed below and will be 
replicated in the NEWS file shortly.

* Removal of camelCase.  Rename keyword arguments and public instance 
variables:
   * client.BaseClient
     *Note* that changes to this class propogate out to the same variable in
     derived classes like fas2.AccountSystem and the BaseClient used in
     JsonFasIdentity.
     * __init__(): baseURL => base_url
     * _sessionCookie => _session_cookie: this is a private variable but 
some
       users use this anyway.  For users needing to access this, there's now
       a more appropriate class for doing so (ProxyClass).
   * accounts.fas2.AccountSystem
     * group_by_id(): groupId => group_id
     * person_by_id(): personId => person_id
   * tg.widgets
     * All widgets had widgetId => widget_id
     * Also means accessing the variable is done via self.widget_id
   * tg.json.SABase
     * self.jsonProps => self.json_props
* BaseClient.send_request() has keyword argument input renamed to req_params
* Restructuring of Exceptions in BaseClient
   * New base exception is FedoraServiceError if you want to catch that.
* Rename accounts.fas2.AccountSystem.authenticate() to verify_password()

-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: refactor.patch
Type: text/x-patch
Size: 33133 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/infrastructure/attachments/20080603/871f0e9c/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
Url : http://lists.fedoraproject.org/pipermail/infrastructure/attachments/20080603/871f0e9c/attachment-0001.bin 


More information about the infrastructure mailing list