Skip to content

Commit

Permalink
Use pyramid.util.Sentinel and update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
ericatkin committed Jan 29, 2024
1 parent 184d815 commit f4c6d10
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Features

- Coverage reports in tests based on Python 3.11 instead of Python 3.8.

- Added `LIFT` sentinel value that may be used for context and name arguments
to view_config on class methods in conjunction with venusian lift.

Bug Fixes
---------

Expand Down
4 changes: 2 additions & 2 deletions src/pyramid/config/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,8 +573,8 @@ def wrapper(context, request):
The :term:`view name`. Read :ref:`traversal_chapter` to
understand the concept of a view name. When :term:`view` is a class,
the sentinel value view.LIFT will cause the :term:`attr` value to be
copied to name (useful with view_defaults to reduce boilerplate).
the sentinel value view.LIFT will cause the attr value to be copied
to name (useful with view_defaults to reduce boilerplate).
context
Expand Down
4 changes: 2 additions & 2 deletions src/pyramid/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
IViewClassifier,
)
from pyramid.threadlocal import get_current_registry, manager
from pyramid.util import hide_attrs, reraise as reraise_
from pyramid.util import Sentinel, hide_attrs, reraise as reraise_

_marker = object()
LIFT = object()
LIFT = Sentinel('LIFT')


def render_view_to_response(context, request, name='', secure=True):
Expand Down

0 comments on commit f4c6d10

Please sign in to comment.