nephila / django-meta

Pluggable app to allow Django developers to quickly add meta tags and OpenGraph, Twitter, and Google Plus properties to their HTML responses.
https://django-meta.readthedocs.io
Other
484 stars 68 forks source link

Switch request handling to thread locals #125

Closed yakky closed 3 years ago

yakky commented 3 years ago

Description

Use thread locals to store request to build absolute url

This is safer in general, and especially in ASGI environment. If ASGI (which ships its own version) is not available, we use threading local

Move to pytest runner to run async tests (though not on ASGI)

References

Fix #115

Checklist

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.03%) to 98.592% when pulling f133b689d958837e07ac3334edb663198a9a0b1d on bugfix/issue-115-request-thread-locals into 1c3cffde9c813f29c522beb2a77571d53147e44e on develop.

codecov[bot] commented 3 years ago

Codecov Report

Merging #125 (f133b68) into develop (1c3cffd) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           develop      #125   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         5    +1     
  Lines          148       160   +12     
  Branches        15        15           
=========================================
+ Hits           148       160   +12     
Flag Coverage Δ
unittests 99.37% <100.00%> (+0.05%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
meta/utils.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1c3cffd...f133b68. Read the comment docs.