Openfisca-core

Latest version: v41.4.5

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

Scan your dependencies

Page 14 of 60

35.0.0

Breaking changes

- Update NumPy version's upper bound to 1.18
- NumPy 1.18 [expires a list of old deprecations](https://numpy.org/devdocs/release/1.18.0-notes.html#expired-deprecations) that might be used in openfisca country models.

Migration details

You might need to change your code if any of the [NumPy expired deprecations](https://numpy.org/devdocs/release/1.18.0-notes.html#expired-deprecations) is used in your model formulas.

Here is a subset of the deprecations that you might find in your model with some checks and migration steps (where `np` stands for `numpy`):

* `Removed deprecated support for boolean and empty condition lists in numpy.select.`
* Before `numpy.select([], [])` result was `0` (for a `default` argument value set to `0`).
* Now, we have to check for empty conditions and, return `0` or the defined default argument value when we want to keep the same behavior.
* Before, integer conditions where transformed to booleans.
* For example, `numpy.select([0, 1, 0], ['a', 'b', 'c'])` result was `array('b', dtype='<U21')`. Now, we have to update such code to: `numpy.select(numpy.array([0, 1, 0]).astype(bool), ['a', 'b', 'c'])`.
* `numpy.linspace parameter num must be an integer.`
* No surprise here, update the `num` parameter in [numpy.linspace](https://numpy.org/doc/1.18/reference/generated/numpy.linspace.html) in order to get an integer.
* `Array order only accepts ‘C’, ‘F’, ‘A’, and ‘K’.`
* Check that [numpy.array](https://numpy.org/doc/1.18/reference/generated/numpy.array.html) `order` argument gets one of the allowed values listed above.
* `UFuncs with multiple outputs must use a tuple for the out kwarg.`
* Update the output type of any used [universal function](https://numpy.org/doc/1.18/reference/ufuncs.html) to get a tuple.

34.7.7

Technical changes

- Avoid Web API failure with _dynamic_ variable generation
- Using reforms to create _dynamic_ variables can lead to a failure to start the API because introspection is failing to get a `source code` section

34.7.6

Technical changes

- Update dependencies: `sortedcontainers`

34.7.5

Technical changes

- Fix `PytestDeprecationWarning` on `openfisca test` command

34.7.4

Technical changes

- Update dependencies: flake8 (style consistency enforcement)

34.7.3

Technical changes

- Update dependencies: flask

Page 14 of 60

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.