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

Documentation/accept #1487

Merged
merged 6 commits into from
Feb 6, 2015
Merged

Documentation/accept #1487

merged 6 commits into from
Feb 6, 2015

Conversation

digitalresistor
Copy link
Member

As a follow up to: #1391 and #1481 this is a documentation change that moves accept from a predicate to a non-predicate.

This then explicitly documents that not_ will not work with it since it is not technically a predicate.

@@ -109,6 +109,12 @@ Deprecations
Docs
----

- Moved the documentation for ``accept`` on ``Configurator.add_view`` to no
longer be part of the decorator list. See
Copy link
Member

Choose a reason for hiding this comment

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

s/decorator/predicate/?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch. Fixed! Thank you.

While accept is partially documented as a predicate, it is actually NOT
a predicate in that the view machinery has all kinds of special cases
for it. This also means that `not_` will not function on it correctly
since it is not actually a predicate.
While this is somewhat a predicate, it really isn't for all intents and
purposes because it is treated special.

Make sure we document it that way.
longer be part of the predicate list. See
https://github.com/Pylons/pyramid/issues/1391 for a bug report stating
``not_`` was failing on ``accept``. Discussion with @mcdonc led to the
conclusion that it should not be documented as a predicate.
Copy link
Member

Choose a reason for hiding this comment

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

Can you reference this PR pretty please.

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.

3 participants