Minizinc

Latest version: v0.10.0

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

Scan your dependencies

Page 1 of 3

0.10.0

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

Added
^^^^^

- Add the ``Instance.diverse_solutions`` method to use the MiniZinc
experimental feature to model diversity and try and find a set of diverse
solutions for the given problem.

Removed
^^^^^^^

- **BREAKING:** The project no longer supports Python 3.7. This change will make
it easier to manage MiniZinc Python's build system.

Changed
^^^^^^^

- Minimum supported version of MiniZinc has increased from 2.5.4 to 2.6.0.
- ``Instance.solutions`` is now able to use the ``intermediate_solutions`` flag
correctly and will only yield a single solution when it is set to ``False``.
- ``helpers.check_solution`` now includes an optional time limit flag. If the
time limit is exceeded, then a ``TimeoutError`` exception will be raised.
- ``helpers.check_solution`` will no longer capture MiniZinc exceptions.
Capturing these exceptions sometimes hid problems.
- The ``timeout`` parameter has been renamed to ``time_limit`` in
``Instance.solve``, ``Instance.solve_async``, and ``Instance.solutions``. The
``timeout`` parameter is still accepted, but will add a
``DeprecationWarning`` and will be removed in future versions.
- The ``intermediate_solutions`` parameter can now be explicitly set to
``False`` to avoid the ``-i`` flag to be passed to MiniZinc, which is
generally added to ensure that a final solution is available.

Fixed
^^^^^

- Fix problem where some exceptions when creating processes where hidden and
would then cause errors where the ``proc`` variable did not exist.
- Fix issue where MiniZinc would not correctly be terminated on Windows when
the Python process was interrupted.

0.9.0

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

Added
^^^^^

- Add support for MiniZinc tuple and record types.

Changed
^^^^^^^

- Minimum supported version of MiniZinc has increased from 2.5.0 to 2.5.4.

Fixed
^^^^^

- Ensure time events send using the JSON stream are parsed as ``timedelta``
objects.
- Pass JSON definitions in using JSON instead of generated DZN files..

0.8.0

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

Removed
^^^^^^^

- **BREAKING:** The project no longer supports Python 3.6. This change will make
it easier to manage MiniZinc Python's build system.

Fixed
^^^^^

- Fix the conversion when using a Python enumerated type in MiniZinc that uses
non-ascii identifiers.

0.7.0

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

Added
^^^^^

- Add additional ``Driver.executable`` property to safely access the location
of the executable used by the ``Driver`` object.
- Support for input and output of complex MiniZinc enumerated types, such as
anonymous enumerated types or enumerated types using constructor functions.

Removed
^^^^^^^

- **BREAKING:** The project no longer contains the (uncompleted) direct library
connection to libminizinc. With this change come some simplications in methods of
relocated from ``CLIDriver`` and ``CLIInstance``, and the move of ``find_driver`` to
``Driver.find``.

Fixed
^^^^^

- Store statistics as a string when incorrectly reported by the solver.
- Fix the conversion of statistics when using MiniZinc 2.6+

0.6.0

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

Added
^^^^^

- Add support for the usage of JSON Stream output when using MiniZinc 2.6+

Fixed
^^^^^

- Do not raise error about unsupported solver flags when MiniZinc driver would
not raise an error.
- Fix warnings caused by unterminated coroutines when using the asynchronous
iterators

0.5.0

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

Added
^^^^^

- Add (generated) ``__version__`` field to the package to abide by the PEP
recommendations.
- Add support for using NumPy types to instantiate Models. (``np.array`` and
any type that falls under ``np.generic``).
- Add ``available_solvers`` method to the ``Driver`` objects to explicitly
report the available solvers according to the current environment.
- Add support for Python 3.10.

Changed
^^^^^^^

- **BREAKING:** Update minimal supported MiniZinc version to 2.5.0 to ensure
full functionality.
- Remove the (additional) hard time-out in from the CLI driver. MiniZinc should
correctly enforce set time limit.
- ``Solver.lookup`` now has an extra ``refresh`` argument to signal whether
the driver should refresh the found solver configurations.

Fixed
^^^^^

- Always close temporary files before removing them, so that if an exception is
raised while a file is still open, it gets removed correctly on Windows.
- Set the required process creation flags on Windows to allow MiniZinc to
terminate its subprocesses correctly.
- Pass ``--intermediate-solutions`` flag when ``-i`` or ``-a`` is supported by
the solver.
- Pygments parser generated by Iro did not contain the correct ``pop`` rules.
The parser was manually edited to work correctly, but we can no longer
generate is automatically unless the bug in upstream Iro is resolved.
- Resolve a syntax error (a missing semicolon) in the meta-heuristics example in
the documentation.
- Correctly pass the ``-O0`` flag to the CLI when ``optimisation_level`` is set
to zero.
- Set type of MiniZinc annotation output type `ann` to `str` in Python in
accordance with the JSON output format.

Page 1 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.