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

rex: don't let packages pollute namespace of future packages #364

Conversation

pmolodo
Copy link
Contributor

@pmolodo pmolodo commented Nov 12, 2016

The package executor currently has a bug where the global namespace is shared when multiple packages are executed when setting up a context. This can create differing behavior depending on the order of execution of packages, which is clearly undesired.

This fix patches the behavior, so that the global namespace in which each package executes is "reset" after each package runs.

exec_namespace=self.globals)
finally:
self.globals.clear()
self.globals.update(saved_globals)
Copy link
Contributor

@nerdvegas nerdvegas Mar 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm gonna do this as a separate release anyway, since there's the outside chance that a studio is accidentally relying on this buggy behavior (and it'll be clearer to point that out in a separate release).

@nerdvegas nerdvegas merged commit 2d656f0 into AcademySoftwareFoundation:master Mar 11, 2017
@pmolodo
Copy link
Contributor Author

pmolodo commented Mar 11, 2017

Awesome, thanks!

@pmolodo pmolodo deleted the clean_executor_namespace branch March 15, 2017 18:28
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.

2 participants