Minizinc

Latest version: v0.9.0

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

Scan your dependencies

Page 2 of 3

0.4.1

-------------------

Added
^^^^^
- Support for Python 3.9. (MiniZinc Python will aim to support all versions of
Python that are not deprecated)
- Experimental support for capturing the error output of the MiniZinc process
in ``CLIInstance``.
- Experimental support for verbose compiler and solver output (using the ``-v``
flag) in ``CLIInstance``.

Changed
^^^^^^^
- The MiniZinc Python repository moved from GitLab to GitHub, replacing GitLab
CI for GitHub Actions for the continuous testing.
- Values of an enumerated type defined in MiniZinc will now appear in solutions
as a member of a singular anonymous ``enum.Enum`` class.

Fixed
^^^^^
- Handle the cancellation of asynchronous solving and correctly dispose of the
process
- Correct the JSON representation of sets of with ``IntEnum`` members. (Lists
are still not correctly represented).
- ``check_solution`` will now correctly handle solution values of an enumerated
type defined in MiniZinc.

0.4.0

-------------------

Changed
^^^^^^^
- The ``check_solution`` has been split into two separate functions. The
``check_result`` function allows the user to check the correctness of a
``Result`` object and the new ``check_solution`` function can check the
correctness of an individual solution in the form of a data class object or a
dictionary.
- ``Model.add_file`` no longer has its ``parse_data`` flag enabled by default.

Fixed
^^^^^
- Catch lark ``ImportError`` before ``LarkError`` during ``Model.add_file()`` since
``LarkError`` will not exist if the import failed.
- Ensure a DZN file does not get included if its data is parsed.

0.3.3

-------------------

Added
^^^^^
- Add ``requiredFlags`` field to the ``Solver`` data class.

Fixed
^^^^^
- Ignore extra (undocumented) fields from MiniZinc's ``--solvers-json`` output
when initialising ``Solver`` objects.

0.3.2

-------------------

Fixed
^^^^^
- Add full support for string input and output. The usage of strings would
previously incorrectly give a warning.

0.3.1

-------------------

Changed
^^^^^^^
- Store path of loaded solver configuration paths so that no configuration file
has to be generated if no changes are made to the solver.

Fixed
^^^^^
- Ensure generated solver configurations exists during the full existence of
the created asynchronous process.

0.3.0

-------------------

Added
^^^^^
- Add support for different MiniZinc compiler optimisation levels. All methods that
compile an instance now have an additional `optimisation_level` argument.

Changed
^^^^^^^
- The DZN parser functionality has been moved into the ``dzn`` extra. If your
application requires parsed ``dzn`` information, then you have to ensure your
MiniZinc Python is installed with this extra enabled:
``pip install minizinc[dzn]``.
- ``Solver`` has been turned into a ``dataclass`` and has been updated with all
attributes used in the compiler.

Fixed
^^^^^
- Resolve relative paths when directly loading a solver configuration. This
ensures that when a temporary solver configuration is created, the paths are
correct.

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.