summaryrefslogtreecommitdiff
path: root/CHANGES.txt
AgeCommit message (Collapse)Author
2011-07-21- Remove ``compat`` code that served only the purpose of providing backwardsChris McDonough
compatibility with Python 2.4.
2011-07-20- Reordered chapters in narrative section for better new user friendliness.Chris McDonough
- Added more indexing markers to sections in documentation.
2011-07-19- Fixed two typos in wiki2 (SQLA + URL Dispatch) tutorial.Chris McDonough
2011-07-18prep for 1.1b4Chris McDonough
2011-07-16- Change paster pviews and paster proutes to use bootstrap.Chris McDonough
2011-07-16mention paster pshell using bootstrapChris McDonough
2011-07-16mention paster pshell using prepareChris McDonough
2011-07-16add note about removing make_requestChris McDonough
2011-07-16- Omit custom environ variables when rendering a custom exception template inChris McDonough
``pyramid.httpexceptions.WSGIHTTPException._set_default_attrs``; stringifying thse may trigger code that should not be executed; see https://github.com/Pylons/pyramid/issues/239 Closes #239
2011-07-16- Added a section entitled "Writing a Script" to the "Command-Line Pyramid"Chris McDonough
chapter.
2011-07-15prep for 1.1b3Chris McDonough
2011-07-15- get_root2 -> prepareChris McDonough
- change prepare return value to a dict, and return the registry, request, etc - various docs and changelog entries.
2011-07-14typoChris McDonough
2011-07-14- Without a mo-file loaded for the combination of domain/locale,Chris McDonough
``pyramid.i18n.Localizer.pluralize`` run using that domain/locale combination raised an inscrutable "translations object has no attr 'plural' error. Now, instead it "works" (it uses a germanic pluralization by default). This is not the "right" thing really (it's nonsensical to try to pluralize something without translations for that locale/domain available), but it matches the behavior of ``pyramid.i18n.Localizer.translate`` so it's at least consistent; see https://github.com/Pylons/pyramid/issues/235. Closes #235.
2011-07-14typoChris McDonough
2011-07-14forgot to change whatsnewChris McDonough
2011-07-14- New API class: ``pyramid.static.static_view``. This supersedes theChris McDonough
deprecated ``pyramid.view.static`` class. ``pyramid.satic.static_view`` by default serves up documents as the result of the request's ``path_info``, attribute rather than it's ``subpath`` attribute (the inverse was true of ``pyramid.view.static``, and still is). ``pyramid.static.static_view`` exposes a ``use_subpath`` flag for use when you don't want the static view to behave like the older deprecated version. - The ``pyramid.view.static`` class has been deprecated in favor of the newer ``pyramid.static.static_view`` class. A deprecation warning is raised when it is used. You should replace it with a reference to ``pyramid.static.static_view`` with the ``use_subpath=True`` argument.
2011-07-13- Fix corner case to ease semifunctional testing of views: create a newChris McDonough
rendererinfo to clear out old registry on a rescan. See https://github.com/Pylons/pyramid/pull/234. Closes #234.
2011-07-13prep for 1.1b2Chris McDonough
2011-07-13- Views associated with routes with spaces in the route name may not haveChris McDonough
been looked up correctly when using Pyramid with ``zope.interface`` 3.6.4 and better. Closes #232.
2011-07-13- We now clear ``request.response`` before we invoke an exception view; anChris McDonough
exception view will be working with a request.response that has not been touched by any code prior to the exception.
2011-07-12- New environment setting ``PYRAMID_PREVENT_HTTP_CACHE`` and newChris McDonough
configuration file value ``prevent_http_cache``. These are synomymous and allow you to prevent HTTP cache headers from being set by Pyramid's ``http_cache`` machinery globally in a process. see the "Influencing HTTP Caching" section of the "View Configuration" narrative chapter and the detailed documentation for this setting in the "Environment Variables and Configuration Settings" narrative chapter. - New documentation section in View Configuration narrative chapter: "Influencing HTTP Caching".
2011-07-12- The ``pyramid_routesalchemy`` and ``pyramid_alchemy`` scaffoldsChris McDonough
inappropriately used ``DBSession.rollback()`` instead of ``transaction.abort()`` in one place. - Wiki2 (SQLAlchemy + URL Dispatch) tutorial ``models.initialize_sql`` didn't match the ``pyramid_routesalchemy`` scaffold function of the same name; it didn't get synchronized when it was changed in the scaffold.
2011-07-12- The ``Configurator.add_route`` method allowed two routes with the sameChris McDonough
route to be added without an intermediate ``config.commit()``. If you now receive a ``ConfigurationError`` at startup time that appears to be ``add_route`` related, you'll need to either a) ensure that all of your route names are unique or b) call ``config.commit()`` before adding a second route with the name of a previously added name or c) use a Configurator that works in ``autocommit`` mode.
2011-07-12- Previously, If a ``BeforeRender`` event subscriber added a value via theChris McDonough
``__setitem__`` or ``update`` methods of the event object with a key that already existed in the renderer globals dictionary, a ``KeyError`` was raised. With the deprecation of the "add_renderer_globals" feature of the configurator, there was no way to override an existing value in the renderer globals dictionary that already existed. Now, the event object will overwrite an older value that is already in the globals dictionary when its ``__setitem__`` or ``update`` is called (as well as the new ``setdefault`` method), just like a plain old dictionary. As a result, for maximum interoperability with other third-party subscribers, if you write an event subscriber meant to be used as a BeforeRender subscriber, your subscriber code will now need to (using ``.get`` or ``__contains__`` of the event object) ensure no value already exists in the renderer globals dictionary before setting an overriding value.
2011-07-10prep for 1.1b1Chris McDonough
2011-07-10add info to changes.txt and whatsnew about pshell changes; removed unused ↵Chris McDonough
import and unwrap string
2011-07-09request.json -> request.json_body; add some docs for json_bodyChris McDonough
2011-07-09add a note about response wrapping bug fixChris McDonough
2011-07-06- The ``config.scan`` method has grown a ``**kw`` argument. ``kw`` argumentChris McDonough
represents a set of keyword arguments to pass to the Venusian ``Scanner`` object created by Pyramid. (See the Venusian documentation for more information about ``Scanner``).
2011-07-04- New request attribute: ``json``. If the request's ``content_type`` isChris McDonough
``application/json``, this attribute will contain the JSON-decoded variant of the request body. If the request's ``content_type`` is not ``application/json``, this attribute will be ``None``.
2011-07-04- A new value ``http_cache`` can be used as a view configurationChris McDonough
parameter. When you supply an ``http_cache`` value to a view configuration, the ``Expires`` and ``Cache-Control`` headers of a response generated by the associated view callable are modified. The value for ``http_cache`` may be one of the following: - A nonzero integer. If it's a nonzero integer, it's treated as a number of seconds. This number of seconds will be used to compute the ``Expires`` header and the ``Cache-Control: max-age`` parameter of responses to requests which call this view. For example: ``http_cache=3600`` instructs the requesting browser to 'cache this response for an hour, please'. - A ``datetime.timedelta`` instance. If it's a ``datetime.timedelta`` instance, it will be converted into a number of seconds, and that number of seconds will be used to compute the ``Expires`` header and the ``Cache-Control: max-age`` parameter of responses to requests which call this view. For example: ``http_cache=datetime.timedelta(days=1)`` instructs the requesting browser to 'cache this response for a day, please'. - Zero (``0``). If the value is zero, the ``Cache-Control`` and ``Expires`` headers present in all responses from this view will be composed such that client browser cache (and any intermediate caches) are instructed to never cache the response. - A two-tuple. If it's a two tuple (e.g. ``http_cache=(1, {'public':True})``), the first value in the tuple may be a nonzero integer or a ``datetime.timedelta`` instance; in either case this value will be used as the number of seconds to cache the response. The second value in the tuple must be a dictionary. The values present in the dictionary will be used as input to the ``Cache-Control`` response header. For example: ``http_cache=(3600, {'public':True})`` means 'cache for an hour, and add ``public`` to the Cache-Control header of the response'. All keys and values supported by the ``webob.cachecontrol.CacheControl`` interface may be added to the dictionary. Supplying ``{'public':True}`` is equivalent to calling ``response.cache_control.public = True``. Providing a non-tuple value as ``http_cache`` is equivalent to calling ``response.cache_expires(value)`` within your view's body. Providing a two-tuple value as ``http_cache`` is equivalent to calling ``response.cache_expires(value[0], **value[1])`` within your view's body. If you wish to avoid influencing, the ``Expires`` header, and instead wish to only influence ``Cache-Control`` headers, pass a tuple as ``http_cache`` with the first element of ``None``, e.g.: ``(None, {'public':True})``.
2011-07-01move 1.0 stuff to HISTORY.txtChris McDonough
2011-07-01prep for 1.1a4Chris McDonough
2011-07-01fixChris McDonough
2011-07-01- The ``pyramid.events.subscriber`` directive behaved contrary to theChris McDonough
documentation when passed more than one interface object to its constructor. For example, when the following listener was registered:: @subscriber(IFoo, IBar) def expects_ifoo_events_and_ibar_events(event): print event The Events chapter docs claimed that the listener would be registered and listening for both ``IFoo`` and ``IBar`` events. Instead, it registered an "object event" subscriber which would only be called if an IObjectEvent was emitted where the object interface was ``IFoo`` and the event interface was ``IBar``. The behavior now matches the documentation. If you were relying on the buggy behavior of the 1.0 ``subscriber`` directive in order to register an object event subscriber, you must now pass a sequence to indicate you'd like to register a subscriber for an object event. e.g.: @subscriber([IFoo, IBar]) def expects_object_event(object, event): print object, event
2011-07-01fix wiki tests tooChris McDonough
2011-07-01- The Wiki2 tutorial "Tests" chapter had two bugs: it did not tell the userChris McDonough
to depend on WebTest, and 2 tests failed as the result of changes to Pyramid itself. These issues have been fixed.
2011-07-01- Deprecated the ``set_renderer_globals_factory`` method of the ConfiguratorChris McDonough
and the ``renderer_globals`` Configurator constructor parameter.
2011-07-01Add JSONP rendererChris McDonough
2011-06-26- ``pyramid.testing.DummyRequest`` now raises deprecation warnings whenChris McDonough
attributes deprecated for ``pyramid.request.Request`` are accessed (like ``response_content_type``). This is for the benefit of folks running unit tests which use DummyRequest instead of a "real" request, so they know things are deprecated without necessarily needing a functional test suite.
2011-06-26prep for 1.1a3Chris McDonough
2011-06-26- Added ``mako.preprocessor`` config file parameter; allows for a MakoChris McDonough
preprocessor to be specified as a Python callable or Python dotted name. See https://github.com/Pylons/pyramid/pull/183 for rationale. Closes #183.
2011-06-26- Accessing or setting deprecated response_* attrs on requestChris McDonough
(e.g. ``response_content_type``) now issues a deprecation warning at access time rather than at rendering time.
2011-06-23gardenChris McDonough
2011-06-22prep for 1.1a2Chris McDonough
2011-06-22leave undefinedChris McDonough
2011-06-22take robert forkels adviceChris McDonough
2011-06-22- If multiple specs were provided in a single call toChris McDonough
``config.add_translation_dirs``, the directories were inserted into the beginning of the directory list in the wrong order: they were inserted in the reverse of the order they were provided in the ``*specs`` list (items later in the list trumped ones earlier in the list). This is now fixed. Note however, that later calls to ``config.add_translation_dirs`` continue to insert directories into the beginning of the list of translation directories created by earlier calls. This means that the same translation found in a directory added via ``add_translation_dirs`` later in the configuration process will be found before one added earlier via a separate call to ``add_translation_dirs`` in the configuration process.
2011-06-22suggestions from sluggoChris McDonough