Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow wildcards to be used when comparing a MIMEAccept against an offer #185

merged 2 commits into from Jan 29, 2016


Copy link

@ltvolks ltvolks commented Jan 14, 2015

Primary motivation is to address Pylons/pyramid#1407, which would enable usage of wildcards as an accept predicate:

def view(request):

Webob.acceptparse.MIMEAccept now supports the following, where previously an exception was raised:

>>> accept = MIMEAccept('text/html')
>>> 'text/*' in accept
>>> '*/html' in accept
>>> '*' in accept

Copy link

@bertjwregeer bertjwregeer commented Mar 23, 2015

Would you be so kind as to add some extra tests that would add coverage for the changes, that would be fantastic.

ltvolks added 2 commits Mar 23, 2015
- Use list comprehension instead of map for minor performance gain in
- Fixes Pylons#155
Copy link
Contributor Author

@ltvolks ltvolks commented Mar 23, 2015

Here you go... Curiously, webob.util only shows 91% coverage against master when I run coverage locally, but Travis seems happy enough.

Copy link

@bertjwregeer bertjwregeer commented Apr 1, 2015

I'll work on any other coverage issues once I get this pulled in, thanks for updating this PR with tests. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

2 participants