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

Add whitelist and blacklist support. #16

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mrichar1
Copy link

@mrichar1 mrichar1 commented Nov 20, 2017

This PR aims to fix #14. Explanation of how it is designed to work is in the updated README.

I've opted to set it up so that the presence of any entries in the whitelists, or the location or basename being on a blacklist, is a deny.

After that, the location or basename being on a whitelist 're-allows' that wheel.

I think this is the most flexible approach to allowing filtering against locations and packages, but feel free to disagree, or make any other suggestions on improvements to the code.

@mrichar1
Copy link
Author

Not sure why in the tests load is passed an empty class - the code seems to read config successfully in real situations - though I'm not that up on buildout's internals, so there's probably a better way to get access to the config...

@mrichar1
Copy link
Author

A simple solution to the test errors is to add the following as a method in the Buildout class:

    @staticmethod
    def get(value, default):
        return None

Not sure if you'd prefer another way of handling it? (perhaps implementing returning a test config to run through tests of the new features?)

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

Successfully merging this pull request may close these issues.

Wheel blacklisting
1 participant