Closed arturponinski closed 2 years ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
petl/io/json.py | 40 | 42 | 95.24% | ||
<!-- | Total: | 87 | 89 | 97.75% | --> |
Totals | |
---|---|
Change from base Build 2458237953: | 0.03% |
Covered Lines: | 12693 |
Relevant Lines: | 13936 |
As we are not bumping releases, should this be handled transparently in fromdicts() as it currently is, so as not to break API?
As we are not bumping releases, should this be handled transparently in fromdicts() as it currently is, so as not to break API?
Feedback from production deployments always looks like an excellent way to improve.
@arturponinski,
As you have explored this issue closer:
v1.7.5
was an undetected regression?
@bmaggard @juarezr the more I think about it, the more I lean to your suggestion to keep the support in the fromdicts
.
Due to above, I've created another PR which keeps the BC and uses the file cache: https://github.com/petl-developers/petl/pull/625
Superseded by https://github.com/petl-developers/petl/pull/625
This PR has the objective of improving the support of generators in
fromdicts
. THe current implementation usesitertools.tee
which according to docs and production deployments uses large amounts of memory, leading to out of memory kills of processes. This PR aims to revert the functionality and introduce a dedicatedfromdictsgenerator
function, which uses filecache, similar to sorting.Changes
fromdictsgenerator
topetl.io.json
fromdicts
introduced in 1.7.5 and added a warning about passing the generator tofromdicts
_iterchunk
from sorts topetl.util.base
. Imported to sorts as_iterchunk
for BCChecklist
Use this checklist for assuring the quality of pull requests that include new code and or make changes to existing code.
tox
/pytest