Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added "extension_order" option #181

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jajadinimueter
Copy link

Added "extension_order" option to the "buidout" section.
This allows you to specify the order in which the declared
extensions are loaded.

Added "extension_order" option to the "buidout" section.
This allows you to specify the order in which the declared
extensions are loaded.
@mgedmin
Copy link
Member

mgedmin commented Apr 15, 2014

I don't see any documentation for this, or tests either.

@mgedmin
Copy link
Member

mgedmin commented Apr 15, 2014

It took me a while to understand why the existing extensions option couldn't be used for this.

(It enumerates Python packages, that is, distributions, and each of those might conceivably contain several buildout extensions by providing multiple (named) entry points.)

@jajadinimueter
Copy link
Author

I'd gladly write tests and documentation.

Did a quick search for documentation of the "extensions" option but did not find much. So I assumed it's some undocumented feature and didn't want to write documentation for extensions related stuff when extensions are not fully documented. But I could do that as well when you give me a place to write my stuff.

As for the test, I tried one, but I am not too familiar with that doctests format. I tried to adopt an existing extensions test but I could not figure out how to actually test the order in which extensions are loaded. It seems, that only stuff which is observable from a users perspective is tested, did not find a unit test for extensions. Are there some better examples?

@mgedmin
Copy link
Member

mgedmin commented Apr 16, 2014

While zc.buildout's documentation is not stellar, extensions are documented:
https://pypi.python.org/pypi/zc.buildout/2.2.1#extensions

The source for that documentation is

As for tests, I agree that doctests are hard to modify. Creating a new doctest (extension-order.txt) might be simplest. Add a couple of extensions that print stuff to sys stdout, show a couple of buildout configs that put them in different order, see how they get printed.

(I should probably mention that I'm not the primary maintainer of zc.buildout -- @jimfulton is. I'm not familiar with buildout's implementation details. I may comment on stylistic issues in patches, but it's Jim's decision whether features should be merged or not. Unfortunately he hasn't been very responsive lately -- probably very busy with other projects.)

@jajadinimueter
Copy link
Author

Ok, I see, did not find those files. Will see that the feature gets documented.

Your idea for the test sounds very reasonable. I will do that asap.

Well, I hope @jimfulton will find some time in the future.

Thanks for the good support!

@reinout
Copy link
Contributor

reinout commented Jul 1, 2015

Why do you need a separate extension order option? Cannot you get buildout to respect the order given in the actual extensions= option? Seems like that would be cleaner.

It might be that I mis-understand, though. In any case, we need documentation or tests.

Or is there some input or help that you need?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants