Releases: MiniZinc/minizinc-python
Releases · MiniZinc/minizinc-python
MiniZinc Python 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.
MiniZinc Python 0.8.0
This release concerned mostly some of the internals of the Python package, and its dependency management. The little external changes are listed below.
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.
MiniZinc Python 0.7.0
Added
- Add additional
Driver.executable
property to safely access the location
of the executable used by theDriver
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 simplifications in methods of
relocated fromCLIDriver
andCLIInstance
, and the move offind_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+
MiniZinc Python 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
MiniZinc Python 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 undernp.generic
). - Add
available_solvers
method to theDriver
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 extrarefresh
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 whenoptimisation_level
is set
to zero. - Set type of MiniZinc annotation output type
ann
tostr
in Python in
accordance with the JSON output format.
MiniZinc Python 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)
MiniZinc Python 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
inCLIInstance
. - Experimental support for verbose compiler and solver output (using the
-v
flag) inCLIInstance
.
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 anonymousenum.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.
MiniZinc Python 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 newcheck_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 itsparse_data
flag enabled by default.
Fixed
- Catch lark
ImportError
beforeLarkError
duringModel.add_file()
since
LarkError
will not exist if the import failed. - Ensure a DZN file does not get included if its data is parsed.
MiniZinc Python 0.3.3
Added
- Add
requiredFlags
field to theSolver
data class.
Fixed
- Ignore extra (undocumented) fields from MiniZinc's
--solvers-json
output
when initialisingSolver
objects.
MiniZinc Python 0.3.2
Fixed
- Add full support for string input and output. The usage of strings would
previously incorrectly give a warning.