Openfisca-core

Latest version: v43.3.5

Safety actively analyzes 723177 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 49 of 66

21.3.1

- Fix bug on API `/variable/{id}`
- Encode API `/variable/{id}` output to `utf-8`
- Add tests for `/variable/{id}` and `/parameter/{id}` encoding

21.3.0

Add `--only-variables` and `--ignore-variables` options to `openfisca-run-test` to filter out tested output variables if needed.

21.2.2

- When a variable file is loaded twice in the same python interpreter, make sure the second loading doesn't corrupt the first one.
- This fixes a bug introduced in 21.0.2, which could lead to a corruption of the tax and benefit in rare edge cases

21.2.1

- Fix two bugs that appeared with 21.2.0:
- Properly encode the result of a formula returning an Enum value
- Enable storing an Enum value on disk

21.2.0

New features

- Improve [`holder.get_memory_usage`]((https://openfisca.org/doc/openfisca-python-api/holder.html#openfisca_core.holders.Holder.get_memory_usage)):
- Add `nb_requests` and `nb_requests_by_array` fields in the memory usage stats for traced simulations.

- Enable intermediate data storage on disk to avoid memory overflow
- Introduce `memory_config` option in `Simulation` constructor
- This allows fine tuning of memory management in OpenFisca

For instance:


from openfisca_core.experimental import MemoryConfig

simulation = ... create a Simulation object

config = MemoryConfig(
max_memory_occupation = 0.95, When 95% of the virtual memory is full, switch to disk storage
priority_variables = ['salary', 'age'], Always store these variables in memory
variables_to_drop = ['age_elder_for_family_benefit'] Do not store the value of these variables
)

simulation.memory_config = config

21.1.0

New features

- Improve `Tracer`:

- Introduce an `aggregate` option in [`tracer.print_computation_log`](https://openfisca.org/doc/openfisca-python-api/tracer.html#openfisca_core.tracers.Tracer.print_computation_log) to handle large population simulations.
- Introduce [`tracer.usage_stats`](https://openfisca.org/doc/openfisca-python-api/tracer.html#openfisca_core.tracers.Tracer.usage_stats) to keep track of the number of times a variable is computed.

- Introduce methods to keep track of memory usage:

- Introduce [`holder.get_memory_usage`](https://openfisca.org/doc/openfisca-python-api/holder.html#openfisca_core.holders.Holder.get_memory_usage)
- Introduce `entity.get_memory_usage`
- Introduce `simulation.get_memory_usage`

- Improve `Holder` public interface:

- Enhance [`holder.delete_arrays`](https://openfisca.org/doc/openfisca-python-api/holder.html#openfisca_core.holders.Holder.get_memory_usage) to be able to remove known values only for a specific period
- Introduce [`holder.get_known_periods`](https://openfisca.org/doc/openfisca-python-api/holder.html#openfisca_core.holders.Holder.get_known_periods)

- Introduce [`variable.get_formula`](https://openfisca.org/doc/openfisca-python-api/variables.html#openfisca_core.variables.Variable.get_formula)

- Re-introduce `taxscales.combine_tax_scales` to combine several tax scales.

Deprecations

- Deprecate `requested_period_added_value` base function, as it had no effect.

Page 49 of 66

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.