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 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 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 Sep 7, 2014
- Use list comprehension instead of map for minor performance gain in
- Fixes #155
@ltvolks ltvolks force-pushed the ltvolks:155-accept-wildcard branch from 8f49817 to e51a608 Mar 23, 2015
Copy link
Contributor Author

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 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. :-)

@bertjwregeer bertjwregeer added this to the Version 1.6 milestone Dec 29, 2015
@bertjwregeer bertjwregeer merged commit e51a608 into Pylons:master Jan 29, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
@pyup-bot pyup-bot mentioned this pull request Nov 3, 2017
@pyup-bot pyup-bot mentioned this pull request Jan 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.