Skip to content

Commit

Permalink
every subscriber predicate must accept only one arg, so codify that
Browse files Browse the repository at this point in the history
  • Loading branch information
mmerickel committed Jan 28, 2024
1 parent 44be883 commit 56fad7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
10 changes: 6 additions & 4 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ unreleased
Features
--------

- Pyramid adds support for Python 3.11.
- Add support for Python 3.11 and 3.12.

- Added HTTP 418 error code via `pyramid.httpexceptions.HTTPImATeapot`.
See https://github.com/Pylons/pyramid/pull/3667

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

Bug Fixes
---------
Expand All @@ -28,10 +28,12 @@ Bug Fixes
Backward Incompatibilities
--------------------------

- Drop support for Python 3.6.

- Requests to a static_view are no longer allowed to contain a null-byte in any
part of the path segment.
- Pyramid is no longer tested on, nor supports Python 3.6
- Pyramid drops support for l*gettext() methods in the i18n module.

- Drop support for l*gettext() methods in the i18n module.
These have been deprecated in Python's gettext module since 3.8, and
removed in Python 3.11.

Expand Down
11 changes: 2 additions & 9 deletions src/pyramid/config/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,8 @@ def register():
return subscriber

def _derive_predicate(self, predicate):
if eventonly(predicate):

def derived_predicate(*arg):
return predicate(arg[0])

# seems pointless to try to fix __doc__, __module__, etc as
# predicate will invariably be an instance
else:
derived_predicate = predicate
def derived_predicate(*arg):
return predicate(arg[0])

return derived_predicate

Expand Down

0 comments on commit 56fad7f

Please sign in to comment.