Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 180 lines (122 sloc) 5.859 kb
0511437 @mcdonc not BFG no mo
mcdonc authored
1 Pyramid TODOs
2 =============
69364d6 @tseaver Tidying
tseaver authored
3
8ac9e61 @mcdonc garden
mcdonc authored
4 Nice-to-Have
5 ------------
8b6f09d @mcdonc add rudimentary object description code
mcdonc authored
6
0048824 @mcdonc garden
mcdonc authored
7 - config.set_registry_attr (with conflict detection).
8
9 - _fix_registry should dictify the registry being fixed.
10
2861f1d @mcdonc garden
mcdonc authored
11 - Provide the presumed renderer name to the called view as an attribute of
12 the request.
13
d806f9b @mcdonc note
mcdonc authored
14 - Have action methods return their discriminators.
15
63c969d @mcdonc garden
mcdonc authored
16 - Add docs about upgrading between Pyramid versions (e.g. how to see
17 deprecation warnings).
18
4786cae @mcdonc - The system value ``r`` is now supplied to renderers as an alias for
mcdonc authored
19 - Fix renderers chapter to better document system values passed to template
20 renderers.
21
37f3baa @mcdonc garden
mcdonc authored
22 - Modify view mapper narrative docs to not use pyramid_handlers.
23
cd422c1 @mcdonc garden
mcdonc authored
24 - Modify the urldispatch chapter examples to assume a scan rather than
25 ``add_view``.
26
8ac9e61 @mcdonc garden
mcdonc authored
27 - Introspection:
57a0d77 @mcdonc docs; todo; coverage for Introspector
mcdonc authored
28
63c969d @mcdonc garden
mcdonc authored
29 * ``default root factory`` category (prevent folks from needing to searh
30 "root factories" category)?
58c01ff @mcdonc flesh out categories more
mcdonc authored
31
63c969d @mcdonc garden
mcdonc authored
32 * ``default view mapper`` category (prevent folks from needing to search
33 "view mappers" category)?
58c01ff @mcdonc flesh out categories more
mcdonc authored
34
4a4ef4f @mcdonc simplify actioninfo interface; fix actioninfos passed as tuple via _info
mcdonc authored
35 * get rid of "tweens" category (can't sort properly?)
36
bfc01f5 @mcdonc garden
mcdonc authored
37 - Fix deployment recipes in cookbook (discourage proxying without changing
38 server).
39
773024b @mcdonc garden
mcdonc authored
40 - Try "with transaction.manager" in an exception view with SQLA (preempt
41 homina homina response about how to write "to the database" from within in
63c969d @mcdonc garden
mcdonc authored
42 an exception view). Note: tried this and couldn't formulate the right
43 situation where the database could not be written to within an exception
44 view (but didn't try exhaustively).
773024b @mcdonc garden
mcdonc authored
45
95eab98 @mcdonc organize better
mcdonc authored
46 - Add narrative docs for wsgiapp and wsgiapp2.
3d338ea @mcdonc - Use [app:main] instead of a pipeline in all scaffolds and tutorials
mcdonc authored
47
95eab98 @mcdonc organize better
mcdonc authored
48 - Flesh out "Paste" narrative docs chapter.
51add88 @mcdonc garden
mcdonc authored
49
95eab98 @mcdonc organize better
mcdonc authored
50 - Basic WSGI documentation (pipeline / app / server).
51add88 @mcdonc garden
mcdonc authored
51
63c969d @mcdonc garden
mcdonc authored
52 - Change docs about creating a venusian decorator to not use ZCA (use
53 configurator methods instead).
d8d14a4 @mcdonc garden
mcdonc authored
54
95eab98 @mcdonc organize better
mcdonc authored
55 - Try to better explain the relationship between a renderer and a template in
56 the templates chapter and elsewhere. Scan the documentation for reference
57 to a renderer as *only* view configuration (it's a larger concept now).
b5ffe38 @mcdonc - The ``settings`` dictionary now raises a deprecation warning when you
mcdonc authored
58
a7d50d8 @mcdonc garden
mcdonc authored
59 - Add better docs about what-to-do-when-behind-a-proxy: paste.urlmap ("/foo =
60 app1" and "domain app1.localhost = app1"), ProxyPreserveHost and the nginx
61 equivalent, preserving HTTPS URLs.
62
95eab98 @mcdonc organize better
mcdonc authored
63 - Make "localizer" a property of request (instead of requiring
64 "get_localizer(request)"?
6aafc53 @mcdonc garden
mcdonc authored
65
95eab98 @mcdonc organize better
mcdonc authored
66 - Alias the stupid long default session factory name.
d1432f4 @mcdonc - Reconcile "extending an existing application" chapter with existence o...
mcdonc authored
67
95eab98 @mcdonc organize better
mcdonc authored
68 - Debug option to print view matching decision (e.g. debug_viewlookup or so).
94a5271 @mcdonc gardening, add twophase todo
mcdonc authored
69
f765a6d @mcdonc reprioritize
mcdonc authored
70 - Non-bwcompat use of threadlocals that need to be documented or ameliorated:
71
72 security.principals_allowed_by_permission
73
74 resource.OverrideProvider._get_overrides: can't credibly be removed,
75 because it stores an overrideprovider as a module-scope global.
76
77 traversal.traverse: this API is a stepchild, and needs to be changed.
78
79 Configurator.add_translation_dirs: not passed any context but a message,
80 can't credibly be removed.
81
95eab98 @mcdonc organize better
mcdonc authored
82 - Deprecate pyramid.security.view_execution_permitted (it only works for
83 traversal).
f077653 - A ``repoze.bfg.events.subscriber`` decorator was added. This
Chris McDonough authored
84
7c15496 @mcdonc remove; too complex to document here
mcdonc authored
85 - Provide a ``has_view`` function.
86
485ef69 @mcdonc gardening
mcdonc authored
87 - Update App engine chapter with less creaky directions.
5efc45b @mcdonc add notes about shedding threadlocals
mcdonc authored
88
9ff3b26 @mcdonc record idea from Zart about a pyramid app factory entry point for 100% d...
mcdonc authored
89 - Idea from Zart:
90
91 diff --git a/pyramid/paster.py b/pyramid/paster.py
92 index b0e4d79..b3bd82a 100644
93 --- a/pyramid/paster.py
94 +++ b/pyramid/paster.py
95 @@ -8,6 +8,7 @@ from paste.deploy import (
96 from pyramid.compat import configparser
97 from logging.config import fileConfig
98 from pyramid.scripting import prepare
99 +from pyramid.config import Configurator
100
101 def get_app(config_uri, name=None, loadapp=loadapp):
102 """ Return the WSGI application named ``name`` in the PasteDeploy
103 @@ -111,3 +112,10 @@ def bootstrap(config_uri, request=None):
104 env['app'] = app
105 return env
106
107 +def make_pyramid_app(global_conf, app=None, **settings):
108 + """Return pyramid application configured with provided settings"""
109 + config = Configurator(package='pyramid', settings=settings)
110 + if app:
111 + config.include(app)
112 + app = config.make_wsgi_app()
113 + return app
114 diff --git a/setup.py b/setup.py
115 index 03ebb42..91e0e21 100644
116 --- a/setup.py
117 +++ b/setup.py
118 @@ -118,6 +118,8 @@ setup(name='pyramid',
119 [paste.server_runner]
120 wsgiref = pyramid.scripts.pserve:wsgiref_server_runner
121 cherrypy = pyramid.scripts.pserve:cherrypy_server_runner
122 + [paster.app_factory]
123 + main = pyramid.paster:make_pyramid_app
124 """
125 )
126
127
cccc918 @mcdonc garden
mcdonc authored
128 Future
129 ------
130
b6a102e @mcdonc garden
mcdonc authored
131 - 1.5: remove ``pyramid.view.static`` and ``pyramid.view.is_response``.
6413015 @mcdonc garden
mcdonc authored
132
2a96825 @mcdonc garden
mcdonc authored
133 - 1.5: turn ``pyramid.settings.Settings`` into a function that returns the
134 original dict (after ``__getattr__`` deprecation period, it was deprecated
135 in 1.2).
136
07cb8f0 @mcdonc add pyramid.decorator.reify as an API. Closes #682
mcdonc authored
137 - 1.5: Remove ``pyramid.requests.DeprecatedRequestMethodsMixin`` and code in
138 renderers module that looks for _response_content_type, et. al.
2a96825 @mcdonc garden
mcdonc authored
139
023c88b @mcdonc rename set_request_method to add_request_method. closes #683
mcdonc authored
140 - 1.5: Maybe? deprecate set_request_property in favor of pointing people at
141 add_request_method, schedule removal for 1.8?
0048824 @mcdonc garden
mcdonc authored
142
f272f27 @mcdonc note potential 1.5 removals and remove dead code
mcdonc authored
143 - 1.5: Remove pyramid.config.rendering set_renderer_globals_factory maybe.
144
145 - 1.5: remove pyramid.config.route _add_view_from_route function.
146
63c969d @mcdonc garden
mcdonc authored
147 - 1.6: Remove IContextURL and TraversalContextURL.
148
d8d14a4 @mcdonc garden
mcdonc authored
149 Probably Bad Ideas
150 ------------------
151
485ef69 @mcdonc gardening
mcdonc authored
152 - Add functionality that mocks the behavior of ``repoze.browserid``.
76d7eb6 @mcdonc - Internal: ZCML directives no longer call get_current_registry() if the...
mcdonc authored
153
5f3fc07 @mcdonc garden
mcdonc authored
154 - Consider implementing the API outlined in
155 http://plope.com/pyramid_auth_design_api_postmortem, phasing out the
156 current auth-n-auth abstractions in a backwards compatible way.
157
d8d14a4 @mcdonc garden
mcdonc authored
158 - Maybe add ``add_renderer_globals`` method to Configurator.
159
95eab98 @mcdonc organize better
mcdonc authored
160 - Supply ``X-Vhm-Host`` support (probably better to do what paste#prefix
161 middleware does).
162
c5724cb @mcdonc garden
mcdonc authored
163 - Have ``remember`` and ``forget`` actually set headers on the response using
164 a response callback (and return the empty list)?
f8636ce @mcdonc bad idea
mcdonc authored
165
166 - http://pythonguy.wordpress.com/2011/06/22/dynamic-variables-revisited/
167 instead of thread locals
a0547ef @mcdonc garden
mcdonc authored
168
169 - Context manager for creating a new configurator (replacing
170 ``with_package``). E.g.::
171
172 with config.partial(package='bar') as c:
173 c.add_view(...)
174
175 or::
176
177 with config.partial(introspection=False) as c:
178 c.add_view(..)
179
Something went wrong with that request. Please try again.