-
-
Notifications
You must be signed in to change notification settings - Fork 953
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
chore: Vendor python-mimeparse #1439
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1439 +/- ##
======================================
Coverage 100% 100%
======================================
Files 39 39
Lines 2565 2565
Branches 396 396
======================================
Hits 2565 2565
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #1439 +/- ##
======================================
Coverage 100% 100%
======================================
Files 39 39
Lines 2565 2565
Branches 396 396
======================================
Hits 2565 2565
Continue to review full report at Codecov.
|
49c1217
to
17f4fc6
Compare
@@ -0,0 +1,12 @@ | |||
#!/usr/bin/env bash | |||
|
|||
_EXPECTED_VERSION_MIMEPARSE="1.6.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the interest of KISS, the version number is hard-coded here instead of going to the trouble of reading it from mimeparse.py
. We can always change this later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, apart from newline nitpicks, I only had one issue when testing this briefly: it seemed that the vendored mimeparse
would not cythonize [1]. Shall we list falcon.vendor
in setup.py
(haven't tried yet):
package_names = ['falcon', 'falcon.util', 'falcon.routing', 'falcon.media']
- A simple illustration
>>> import falcon
>>> falcon.api
<module 'falcon.api' from '/tmp/mimeparse-vendortest/lib/python3.5/site-packages/falcon/api.cpython-35m-x86_64-linux-gnu.so'>
>>> falcon.request
<module 'falcon.request' from '/tmp/mimeparse-vendortest/lib/python3.5/site-packages/falcon/request.cpython-35m-x86_64-linux-gnu.so'>
>>> falcon.vendor.mimeparse
<module 'falcon.vendor.mimeparse' from '/tmp/mimeparse-vendortest/lib/python3.5/site-packages/falcon/vendor/mimeparse/__init__.py'>
>>> falcon.vendor.mimeparse.mimeparse
<module 'falcon.vendor.mimeparse.mimeparse' from '/tmp/mimeparse-vendortest/lib/python3.5/site-packages/falcon/vendor/mimeparse/mimeparse.py'>
falcon/vendor/mimeparse/__init__.py
Outdated
|
||
""" | ||
|
||
from .mimeparse import * # NOQA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No new line at the end of file (in the Unix world, it is a punishable offense 😈 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sheesh. Usually I add an extra line without thinking. Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Editors normally add that, at least for source files. And flake8
would complain, but NOQA
on the last line felled us here. At least Github rendered it in a very visual way, making my job easy 🙂
tools/check-vendored.sh
Outdated
fi | ||
|
||
echo "Latest version of python-mimeparse is newer than expected." | ||
exit 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No new line at the end of file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Nice catch, fixed (and tested locally on my box). |
51dbc4a
to
65bfcff
Compare
65bfcff
to
faf6201
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good now!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Closes #1420