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

Further Improvements to Recursion Preventions #120

Merged
merged 2 commits into from
Jul 25, 2020

Conversation

seandstewart
Copy link
Owner

The Resolver now maintains an internal stack of seen annotations while resolving a given annotation. This costs considerably less memory and CPU than the guard_recursion() function and is more deterministic.

Additionally - this PR fixes an issue where child classes with ForwardRefs failed to report annotations from their parent classes.

@codecov
Copy link

codecov bot commented Jul 25, 2020

Codecov Report

Merging #120 into master will increase coverage by 0.22%.
The diff coverage is 81.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #120      +/-   ##
==========================================
+ Coverage   96.46%   96.68%   +0.22%     
==========================================
  Files          36       36              
  Lines        3842     3827      -15     
==========================================
- Hits         3706     3700       -6     
+ Misses        136      127       -9     
Flag Coverage Δ
#3.7 96.68% <81.81%> (+0.27%) ⬆️
#3.8 ?
#unittests 96.68% <81.81%> (+0.22%) ⬆️

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

Impacted Files Coverage Δ
typic/util.py 91.28% <63.63%> (-2.81%) ⬇️
typic/serde/resolver.py 95.70% <100.00%> (+3.60%) ⬆️
typic/serde/ser.py 98.11% <100.00%> (+<0.01%) ⬆️
typic/klass.py 95.12% <0.00%> (-4.88%) ⬇️
typic/gen.py 97.93% <0.00%> (-0.07%) ⬇️
typic/api.py 96.85% <0.00%> (-0.04%) ⬇️
typic/types/url.py 98.48% <0.00%> (-0.03%) ⬇️
typic/serde/binder.py 98.37% <0.00%> (-0.02%) ⬇️
typic/constraints/mapping.py 98.85% <0.00%> (-0.02%) ⬇️
... and 5 more

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 02f0cc1...ff57ed2. Read the comment docs.

@seandstewart seandstewart merged commit 17efbff into master Jul 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant