Move acl security to authorization#3563
Conversation
stevepiercy
left a comment
There was a problem hiding this comment.
LGTM so far.
Needs a change log entry for how to upgrade to 2.0, pending choice of option 1 or 2 for how to proceed.
Also suggest adding versionchanged or deprecated reST directives where helpful.
|
👍 I agree it's the right way to organize things, even if its temporarily a bit more messy until we can remove the deprecated items. Re |
|
Ok I will fix the changelog and docs. There are more changes once #3557 is merged as well - I didn't fix the tutorials in this branch because I knew it would cause conflicts - so I will leave this open until then. |
stevepiercy
left a comment
There was a problem hiding this comment.
For all single-quoted strings in docs/api/security.rst and docs/api/authorization.rst, should they be double-backticked instead as inline literals?
merwok
left a comment
There was a problem hiding this comment.
Minor markup tweaks to have names rendered as code and strings rendered as strings
Co-Authored-By: Éric Araujo <merwok@netwok.org>
stevepiercy
left a comment
There was a problem hiding this comment.
The mix of double-backticking thing and 'other' regarding ' is inconsistent. Suggest removing the single quotes.
merwok
left a comment
There was a problem hiding this comment.
apply markup fixes to overlooked mentions
If you mean that the doc for pyramid.security docs says but the one for pyramid.authorization has I have sent change suggestions to make them consistent. If you mean the difference between and then I don’t see the inconsistency: the name is not a string. |
Co-Authored-By: Éric Araujo <merwok@netwok.org>
|
I re-synced some of the docs after merging #3557. This should be good to go. |
The import paths for these modules has changed in Pyramid 2.0, and raises warnings. There are other Pyramid 2.0 warnings, but are more involved than changing an import path, and should be addressed as another commit. Refs: Pylons/pyramid#3563 Signed-off-by: Mike Fiedler <miketheman@gmail.com>
* Fix PytestCollectionWarning
When collecting tests, this class raises a warning since it's named
`Test*`:
PytestCollectionWarning: cannot collect test class 'TestAdminFlagValues'
because it has a __new__ constructor
Set an attribute that informs pytest to ignore this class, and thus
remove the warning.
Refs: https://docs.pytest.org/en/6.2.x/example/pythoncollection.html#customizing-test-collection
(last lines)
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
* Fix PytestDeprecationWarning
Current test warns:
PytestDeprecationWarning: The --strict option is deprecated, use --strict-markers instead.
Marked as deprecated in pytest-dev/pytest#7985
Released in pytest 6.2.0
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
* Fix DeprecationWarning pyramid import
The import paths for these modules has changed in Pyramid 2.0, and
raises warnings.
There are other Pyramid 2.0 warnings, but are more involved than
changing an import path, and should be addressed as another commit.
Refs: Pylons/pyramid#3563
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
* Fix DeprecationWarning for jinja.contextfilter
A few instances of this warning are raised:
DeprecationWarning: 'contextfilter' is renamed to 'pass_context',
the old name will be removed in Jinja 3.1.
Replace the usages accordingly.
Refs: pallets/jinja#1389
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
* Fix DeprecationWarning for jinja.Markup
The pass-through import of markup.Markup() has been deprecated in Jinja
3.0, and will be removed in Jinja 3.1. Warnings raised:
DeprecationWarning: 'jinja2.Markup' is deprecated and will be removed in Jinja 3.1.
Import 'markupsafe.Markup' instead.
Replace the import paths.
TODO: Determine if the requirements/main.in needs to be changed as well.
Refs: pallets/jinja#1391
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
* Fix DeprecationWarning for babel.numbers.from_number
Warnings raised:
DeprecationWarning: Use babel.numbers.format_decimal() instead.
Deprecated since 2.6.0
Refs: python-babel/babel#538
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Co-authored-by: Dustin Ingram <di@users.noreply.github.com>
* Fix PytestCollectionWarning
When collecting tests, this class raises a warning since it's named
`Test*`:
PytestCollectionWarning: cannot collect test class 'TestAdminFlagValues'
because it has a __new__ constructor
Set an attribute that informs pytest to ignore this class, and thus
remove the warning.
Refs: https://docs.pytest.org/en/6.2.x/example/pythoncollection.html#customizing-test-collection
(last lines)
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
* Fix PytestDeprecationWarning
Current test warns:
PytestDeprecationWarning: The --strict option is deprecated, use --strict-markers instead.
Marked as deprecated in pytest-dev/pytest#7985
Released in pytest 6.2.0
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
* Fix DeprecationWarning pyramid import
The import paths for these modules has changed in Pyramid 2.0, and
raises warnings.
There are other Pyramid 2.0 warnings, but are more involved than
changing an import path, and should be addressed as another commit.
Refs: Pylons/pyramid#3563
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
* Fix DeprecationWarning for jinja.contextfilter
A few instances of this warning are raised:
DeprecationWarning: 'contextfilter' is renamed to 'pass_context',
the old name will be removed in Jinja 3.1.
Replace the usages accordingly.
Refs: pallets/jinja#1389
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
* Fix DeprecationWarning for jinja.Markup
The pass-through import of markup.Markup() has been deprecated in Jinja
3.0, and will be removed in Jinja 3.1. Warnings raised:
DeprecationWarning: 'jinja2.Markup' is deprecated and will be removed in Jinja 3.1.
Import 'markupsafe.Markup' instead.
Replace the import paths.
TODO: Determine if the requirements/main.in needs to be changed as well.
Refs: pallets/jinja#1391
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
* Fix DeprecationWarning for babel.numbers.from_number
Warnings raised:
DeprecationWarning: Use babel.numbers.format_decimal() instead.
Deprecated since 2.6.0
Refs: python-babel/babel#538
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Co-authored-by: Dustin Ingram <di@users.noreply.github.com>
This deprecates the ACL-specific parts of
pyramid.securityand moves them intopyramid.authorizationsince ACL features are not specifically top-level in the security API any longer.Here are the options:
pyramid.authorization.My feeling is that it's good to isolate this stuff into one spot, and if there is pushback by the community after release because
request.effective_principalsand the predicate are deprecated, then we can re-evaluate them by potentially adding an optional method to the security policy or something.cc @luhn