diff options
| author | Michael Merickel <michael@merickel.org> | 2024-01-27 17:03:06 -0700 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2024-01-27 17:03:06 -0700 |
| commit | 56fad7f1ba9ead433f60210958756c27a1e5d7f3 (patch) | |
| tree | 5aa909cfab77fbd1ae9a57704b1308710b4729c0 | |
| parent | 44be88382f258430b6bb19c318ed93a72ca677c9 (diff) | |
| download | pyramid-56fad7f1ba9ead433f60210958756c27a1e5d7f3.tar.gz pyramid-56fad7f1ba9ead433f60210958756c27a1e5d7f3.tar.bz2 pyramid-56fad7f1ba9ead433f60210958756c27a1e5d7f3.zip | |
every subscriber predicate must accept only one arg, so codify that
| -rw-r--r-- | CHANGES.rst | 10 | ||||
| -rw-r--r-- | src/pyramid/config/adapters.py | 11 |
2 files changed, 8 insertions, 13 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index 46f7fbc18..cb9628827 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -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 --------- @@ -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. diff --git a/src/pyramid/config/adapters.py b/src/pyramid/config/adapters.py index 312dfe1f9..7a73c17f8 100644 --- a/src/pyramid/config/adapters.py +++ b/src/pyramid/config/adapters.py @@ -76,15 +76,8 @@ class AdaptersConfiguratorMixin: 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 |
