[Zope-dev] (re)moving browser subpackage from zc.catalog?

Michael Howitz mh at gocept.com
Mon Oct 18 15:16:31 EDT 2010


Am 18.10.2010 um 11:02 schrieb Jan-Wijbrand Kolman:
> Hi Michael and Marius,
> 
> Thanks for the feedback and suggestions! This is what I did:
> 
> On 10/13/10 15:37 , Michael Howitz wrote:
>> Am 13.10.2010 um 13:50 schrieb Jan-Wijbrand Kolman:
>>> Then there's no real need for a browser extra, as the browser
>>> subpackage does not really have any code (only registrations). Or
>>> maybe you meant something different?
>> 
>> When someone wants to use the browser package he could use the
>> "browser" extra to get all the packages needed for the ZCML
>> registrations successfully load. Otherwise he has to find out himself
>> where the ZCML directives are declared.
> 
> I created two extra_requires: a browser and a test_browser. The first 
> lists the dependencies for the browser subpackage to work. The second 
> for the corresponding tests to run.
> 
> On 10/13/10 14:42 , Marius Gedminas wrote:
>> On Wed, Oct 13, 2010 at 01:50:39PM +0200, Jan-Wijbrand Kolman wrote:
>>>> Ah, no it wouldn't help there, as the testrunner would find the
>>>> tests in the browser subpackage and it would try to run them
>>>> regardless.
>> You could always conditionally disable them: in each test*.py file
>> have
>> 
>> def test_suite(): suite = unittest.TestSuite() if some condition:
>>    suite.addTest(unittest.makeSuite(...))
>>    suite.addTest(doctest.DocTestSuite(...))
>>    suite.addTest(doctest.DocFileSuite(...)) return suite
> 
> I also made the tests.py in the browser subpackage only add tests to the 
> test suite whenever the test_browser dependencies indeed are available. 
> This fixes the situation where a test runner (in my case the test runner 
> of the grok toolkit) finds these tests and would try to run them.
> 
> The CHANGES.txt contains instructions on how to enable the ZMI views for 
> your project in case you need them.
> 
> I propose to release this as 1.5.0, which would be a major version 
> release that would indicate: "Watch out, potentially backwards 
> incompatible changes ahead!".
> 
> Right?

+1 looks nice.


Yours sincerely,
-- 
Michael Howitz · mh at gocept.com · software developer
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 8 · fax +49 345 1229889 1
Zope and Plone consulting and development



More information about the Zope-Dev mailing list