Opened 13 years ago

Last modified 12 years ago

#281 closed defect (FIXED)

MediaGoblin broken by recent WebOb release

Reported by: Christopher Allan Webber Owned by: Christopher Allan Webber
Priority: critical Milestone: 0.1.0
Component: programming Keywords:
Cc: Parent Tickets:

Description

::

    URL: http://127.0.0.1:6543/favicon.ico
    File '/home/cwebber/devel/mediagoblin/lib/python2.6/site-packages/Paste-1.7.5.1-py2.6.egg/paste/exceptions/errormiddleware.py', line 144 in __call__
      app_iter = self.application(environ, sr_checker)
    File '/home/cwebber/devel/mediagoblin/lib/python2.6/site-packages/Paste-1.7.5.1-py2.6.egg/paste/urlmap.py', line 203 in __call__
      return app(environ, start_response)
    File '/home/cwebber/devel/mediagoblin/lib/python2.6/site-packages/Beaker-1.5.4-py2.6.egg/beaker/middleware.py', line 152 in __call__
      return self.wrap_app(environ, session_start_response)
    File '/home/cwebber/devel/mediagoblin/mediagoblin/app.py', line 140 in __call__
      request.locale = translate.get_locale_from_request(request)
    File '/home/cwebber/devel/mediagoblin/mediagoblin/tools/translate.py', line 68 in get_locale_from_request
      accept_lang_matches = request.accept_language.best_matches()
    AttributeError: 'AcceptLanguage' object has no attribute 'best_matches'

`http://docs.webob.org/en/latest/news.html <http://docs.webob.org/en/latest/news.html>`_

Looks like this is what caused it:

"Accept.best\_matches() is gone; use list(request.accept) or
request.accept.best\_match(..) instead (applies to all Accept-\*
headers) or similar with request.accept\_language."



Change History (4)

comment:1 by Christopher Allan Webber, 13 years ago

Status: NewClosed
Fixed, and pushed said fix.



comment:2 by Christopher Allan Webber, 12 years ago

Status: ClosedIn Progress
I'm re-opening this.

The tests are still broken... WebOb is broken if you don't pass in
a language in the header.

I'm submitting a patch to WebOb... in the meanwhile we should
target at an older WebOb as a stopgap fix.



comment:3 by Christopher Allan Webber, 12 years ago

Status: In ProgressClosed
Submitted and got a patch merged:
`https://github.com/Pylons/webob/issues/5 <https://github.com/Pylons/webob/issues/5>`_

And pushed a version requirement as a temporary fix.



comment:4 by Will Kahn-Greene, 12 years ago

The original url for this bug was http://bugs.foocorp.net/issues/622 .

Note: See TracTickets for help on using tickets.