plone / guillotina

Python AsyncIO data API to manage billions of resources
https://guillotina.readthedocs.io/en/latest/
Other
187 stars 51 forks source link

Fix Behavior.__getattr__() returns a new instance of default value each time is called #1105

Closed masipcat closed 3 years ago

masipcat commented 3 years ago

This is a continuation of https://github.com/plone/guillotina/pull/395 (https://github.com/plone/guillotina/issues/393)

codecov-io commented 3 years ago

Codecov Report

Merging #1105 (a6a09c1) into master (620a468) will decrease coverage by 5.3%. The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #1105     +/-   ##
========================================
- Coverage    94.6%   89.3%   -5.2%     
========================================
  Files         348     367     +19     
  Lines       29798   31231   +1433     
========================================
- Hits        28172   27874    -298     
- Misses       1626    3357   +1731     
Impacted Files Coverage Δ
guillotina/behaviors/instance.py 96.3% <100.0%> (ø)
guillotina/behaviors/properties.py 90.0% <100.0%> (+0.4%) :arrow_up:
guillotina/test_package.py 97.1% <100.0%> (-0.1%) :arrow_down:
guillotina/tests/test_content.py 100.0% <100.0%> (ø)
guillotina/tests/test_postgres.py 10.3% <0.0%> (-89.7%) :arrow_down:
guillotina/tests/test_cockroach.py 17.7% <0.0%> (-77.9%) :arrow_down:
guillotina/api/aggregation.py 24.2% <0.0%> (-69.1%) :arrow_down:
guillotina/db/storages/pg.py 34.9% <0.0%> (-53.6%) :arrow_down:
guillotina/db/storages/vacuum.py 47.0% <0.0%> (-53.0%) :arrow_down:
guillotina/db/storages/cockroach.py 28.5% <0.0%> (-52.0%) :arrow_down:
... and 158 more
masipcat commented 3 years ago

-> https://github.com/plone/guillotina/pull/1108