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

make pyramid.paster.bootstrap into a context manager #1822

Closed
mmerickel opened this issue Jun 1, 2015 · 0 comments · Fixed by #2760
Closed

make pyramid.paster.bootstrap into a context manager #1822

mmerickel opened this issue Jun 1, 2015 · 0 comments · Fixed by #2760

Comments

@mmerickel
Copy link
Member

This would just improve the API such that users could automatically call the closer in a reliable way.

from pyramid.paster import bootstrap

with bootstrap('development.ini') as env:
    req = env['request']

This change would also affect pyramid.scripting.prepare which is what bootstrap uses under the hood to construct the env.

@mmerickel mmerickel changed the title make pyramid.paster.bootstrap and pyramid.scripting.prepare into context managers make pyramid.paster.bootstrap into a context manager Jun 1, 2015
marioidival added a commit to marioidival/pyramid that referenced this issue Jun 3, 2015
@mmerickel mmerickel added this to the 1.8 milestone Jul 17, 2016
mmerickel added a commit to mmerickel/pyramid that referenced this issue Sep 1, 2016
mmerickel added a commit to mmerickel/pyramid that referenced this issue Sep 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant