Abhilash Raj pushed to branch master at GNU Mailman / Mailman Core

Commits:
be64ed11 by Abhilash Raj at 2019-03-03T01:53:45Z
Fix our custom router due to internal API change in falcon.

Since we are using falcon's internal API, pre-release of 2.0.0a1 broke us 
since
we are using an internal `create_http_method_map` method. With 2.0.0 major
release, falcon dropped that method.

However, falcon refactored above mentioned method in 1.4.0 to two separate
map_http_methods and set_default_responders. We just adapt to that and set the
minimum required version to 1.4.0.

- - - - -
15aab91c by Abhilash Raj at 2019-03-03T01:53:45Z
Merge branch 'fix-for-falcon' into 'master'

Fix our custom router due to internal API change in falcon.

Closes #559

See merge request mailman/mailman!466
- - - - -


2 changed files:

- setup.py
- src/mailman/rest/wsgiapp.py


Changes:

=====================================
setup.py
=====================================
@@ -109,7 +109,7 @@ case second `m'.  Any other spelling is incorrect.""",
         'atpublic',
         'click>=7.0',
         'dnspython>=1.14.0',
-        'falcon>=1.0.0rc1',
+        'falcon>=1.4.0',
         'flufl.bounce',
         'flufl.i18n>=2.0',
         'flufl.lock>=3.1',


=====================================
src/mailman/rest/wsgiapp.py
=====================================
@@ -22,7 +22,7 @@ import logging
 
 from base64 import b64decode
 from falcon import API, HTTPUnauthorized
-from falcon.routing import create_http_method_map
+from falcon.routing import map_http_methods, set_default_responders
 from mailman.config import config
 from mailman.database.transaction import transactional
 from mailman.rest.root import Root
@@ -184,7 +184,8 @@ class ObjectRouter:
                 if len(segments) == 0:
                     # We're at the end of the path, so the root must be the
                     # responder.
-                    method_map = create_http_method_map(resource)
+                    method_map = map_http_methods(resource)
+                    set_default_responders(method_map)
                     return resource, method_map, context
                 this_segment = segments.pop(0)
                 break



View it on GitLab: 
https://gitlab.com/mailman/mailman/compare/4eaebacee9b7c2228879c1c818b75e5c62392463...15aab91c014f886a690cc35041650f1eb1da5b5f

-- 
View it on GitLab: 
https://gitlab.com/mailman/mailman/compare/4eaebacee9b7c2228879c1c818b75e5c62392463...15aab91c014f886a690cc35041650f1eb1da5b5f
You're receiving this email because of your account on gitlab.com.
_______________________________________________
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to