Make Python cmislib easier to use as a package
----------------------------------------------

                 Key: CMIS-249
                 URL: https://issues.apache.org/jira/browse/CMIS-249
             Project: Chemistry
          Issue Type: Improvement
          Components: cmislib
         Environment: SVN Info
URL: https://svn.apache.org/repos/asf/incubator/chemistry/cmislib/trunk
Repository Root: https://svn.apache.org/repos/asf
Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
Revision: 995662
Node Kind: directory
Schedule: normal
Last Changed Author: jpotts
Last Changed Rev: 967147
Last Changed Date: 2010-07-23 10:03:36 -0600 (Fri, 23 Jul 2010)

Environment
Python 2.6.6 on Ubuntu 10.10 beta
            Reporter: Richard Esplin
            Priority: Critical


I want to use cmislib as a package in my project's lib directory. This is hard 
for a few reasons:

* The reference to cmislib.net inside of cmislib.models cannot resolve when 
cmislib is not in the top level directory of my project.
* I didn't know to look at cmislib.models at first (not a big deal).
* cmislib.exceptions cannot be imported directly because the module name 
overrides Python's standard exceptions module.

The attached patch resolves these concerns as follows:

* It changes the calls to cmislib.net to intra-package calls (just net).
* It add public classes from cmislib.models to the package namespace to 
abstract the internal package architecture.
* By always accessing the modules through the package abstraction, "import 
exceptions" doesn't need to be used.
* Documentation is updated to reflect these changes.

I hope this is helpful. Thank you for the great project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to