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

Avoid modifying global state of other packages (dask) at import #2739

Closed
pelson opened this issue Aug 16, 2017 · 2 comments
Closed

Avoid modifying global state of other packages (dask) at import #2739

pelson opened this issue Aug 16, 2017 · 2 comments
Assignees
Milestone

Comments

@pelson
Copy link
Member

pelson commented Aug 16, 2017

It is bad form to modify a package's global state when another package is imported.

We shouldn't be changing the dask options when iris._lazy_data is imported. If it is that important to us, we should have our own state that we modify and maintain.

Note: Cartopy does a similar thing, and it is bad news.

@pelson pelson added the dask label Aug 16, 2017
@pelson pelson added this to the v2.0 milestone Aug 16, 2017
@pelson
Copy link
Member Author

pelson commented Aug 16, 2017

Discussion with @dkillick. Pseudo code of one potential approach:

iris.config.get

    if iris.config._da_getter is explicitly set
        use it
    else
        get da.config
            if the bad one
                change to the default iris one
            else
                use da.config

@pelson
Copy link
Member Author

pelson commented Oct 27, 2017

Closed by #2879

@pelson pelson closed this as completed Oct 27, 2017
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

No branches or pull requests

2 participants