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

feat(mediatypes): reimplement (and unvendor) mimeparse #2348

Merged
merged 32 commits into from
Oct 5, 2024

Conversation

vytas7
Copy link
Member

@vytas7 vytas7 commented Sep 30, 2024

Unvendoring and rewriting mimeparse functionality:

I believe the code is more or less complete now, and I'm proposing it as is.

Some things that are, however, known to still be work in progress:

  • Remove debug print()s.
  • Create specialized exception classes, and use them instead ValueError.
  • Provide full code coverage.
  • Add all relevant news fragments.
  • Tune the LRU cache decorators, esp on PyPy (where to use the "simple logic" passthrough). Not critical for release -- postponed to post-4.0.

Copy link

codecov bot commented Sep 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (d45c06c) to head (532b44e).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #2348   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           64        64           
  Lines         7624      7712   +88     
  Branches      1246      1267   +21     
=========================================
+ Hits          7624      7712   +88     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vytas7
Copy link
Member Author

vytas7 commented Oct 1, 2024

The code now has full unit test coverage, but I am still adding more cases.

@vytas7 vytas7 marked this pull request as ready for review October 1, 2024 13:07
@vytas7 vytas7 requested review from CaselIT and kgriffs October 1, 2024 13:07
Copy link
Member

@CaselIT CaselIT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. I've marked a few minor things

docs/_newsfragments/864.breakingchange.rst Outdated Show resolved Hide resolved
docs/_newsfragments/864.breakingchange.rst Show resolved Hide resolved
docs/ext/rfc.py Outdated Show resolved Hide resolved
falcon/util/mediatypes.py Show resolved Hide resolved
falcon/util/mediatypes.py Outdated Show resolved Hide resolved
falcon/util/mediatypes.py Outdated Show resolved Hide resolved
falcon/util/mediatypes.py Show resolved Hide resolved
falcon/util/mediatypes.py Outdated Show resolved Hide resolved
tests/test_mediatypes.py Show resolved Hide resolved
tests/test_mediatypes.py Show resolved Hide resolved
Co-authored-by: Federico Caselli <cfederico87@gmail.com>
@vytas7 vytas7 requested a review from CaselIT October 4, 2024 22:05
CaselIT
CaselIT previously approved these changes Oct 5, 2024
falcon/util/mediatypes.py Show resolved Hide resolved
@vytas7 vytas7 merged commit 91e90b5 into falconry:master Oct 5, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants