Minizinc

Latest version: v0.10.0

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

Scan your dependencies

Page 2 of 3

0.4.2

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

Fixed
^^^^^

- Terminate the MiniZinc process when stopping early (instead of killing it).
This allows MiniZinc to correctly stop any solver processes.

Changed
^^^^^^^

- Revert change from 0.4.1 where enumerated types unknown to Python would be
made stored as anonymous enumerations. Interoperability between the MiniZinc
driver and the MiniZinc Python has instead changed to allow JSON strings as
valid input for enumerated types. (required MiniZinc 2.5.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.

Page 2 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.