python-constraint2 2.2.2__tar.gz → 2.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/PKG-INFO +33 -20
  2. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/README.rst +27 -19
  3. python_constraint2-2.3.0/constraint/constraints.c +54093 -0
  4. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/constraint/constraints.py +751 -109
  5. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/constraint/domain.c +3740 -3264
  6. python_constraint2-2.3.0/constraint/parser.c +23450 -0
  7. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/constraint/parser.py +127 -30
  8. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/constraint/problem.c +6522 -6493
  9. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/constraint/solvers.c +9857 -11090
  10. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/pyproject.toml +8 -3
  11. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/tests/test_parser.py +63 -9
  12. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/tests/test_solvers.py +43 -0
  13. python_constraint2-2.2.2/constraint/constraints.c +0 -30433
  14. python_constraint2-2.2.2/constraint/parser.c +0 -19108
  15. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/LICENSE +0 -0
  16. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/constraint/__init__.py +0 -0
  17. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/constraint/domain.py +0 -0
  18. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/constraint/problem.py +0 -0
  19. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/constraint/solvers.py +0 -0
  20. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/cythonize_build.py +0 -0
  21. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/tests/__init__.py +0 -0
  22. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/tests/benchmarks.py +0 -0
  23. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/tests/setup_teardown.py +0 -0
  24. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/tests/test_compilation.py +0 -0
  25. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/tests/test_constraint.py +0 -0
  26. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/tests/test_doctests.py +0 -0
  27. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/tests/test_problem.py +0 -0
  28. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/tests/test_some_not_in_set.py +0 -0
  29. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/tests/test_toml_file.py +0 -0
  30. {python_constraint2-2.2.2 → python_constraint2-2.3.0}/tests/test_util_benchmark.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: python-constraint2
3
- Version: 2.2.2
3
+ Version: 2.3.0
4
4
  Summary: python-constraint is a module for efficiently solving CSPs (Constraint Solving Problems) over finite domains.
5
5
  License: BSD-2-Clause
6
6
  Keywords: CSP,constraint solving problems,problem solver,SMT,satisfiability modulo theory,SAT
@@ -24,6 +24,11 @@ Classifier: Programming Language :: Python :: 3.10
24
24
  Classifier: Programming Language :: Python :: 3.11
25
25
  Classifier: Programming Language :: Python :: 3.12
26
26
  Classifier: Programming Language :: Python :: 3.13
27
+ Project-URL: Changelog, https://github.com/python-constraint/python-constraint/blob/main/CHANGELOG.md
28
+ Project-URL: Documentation, http://python-constraint.github.io/python-constraint/
29
+ Project-URL: Homepage, http://python-constraint.github.io/python-constraint/
30
+ Project-URL: Issues, https://github.com/python-constraint/python-constraint/issues
31
+ Project-URL: Repository, https://github.com/python-constraint/python-constraint
27
32
  Description-Content-Type: text/x-rst
28
33
 
29
34
  |License| |Build Status| |Docs| |Python Versions| |Downloads| |Status| |Code Coverage|
@@ -43,6 +48,7 @@ python-constraint
43
48
  | New: writing constraints in the new string format is preferable over functions and lambdas.
44
49
  | These strings, even as compound statements, are automatically parsed to faster built-in constraints, are more concise, and do not require constraint solving familiarity by the user to be efficient.
45
50
  | For example, :code:`problem.addConstraint(["50 <= x * y < 100"])` is parsed to :code:`[MinProdConstraint(50, ["x", "y"]), MaxProdConstraint(100, ["x", "y"])]`.
51
+ | Similarly, :code:`problem.addConstraint(["x / y == z"])` is parsed to :code:`[ExactProdConstraint("x", ["z", "y"])]`.
46
52
  | This feature is in beta and subject to possible change, please provide feedback.
47
53
 
48
54
  .. contents::
@@ -142,29 +148,36 @@ Features
142
148
 
143
149
  The following solvers are available:
144
150
 
145
- - Backtracking solver
146
- - Optimized backtracking solver
147
- - Recursive backtracking solver
148
- - Minimum conflicts solver
149
- - Parallel solver
151
+ - :code:`OptimizedBacktrackingSolver` (default)
152
+ - :code:`BacktrackingSolver`
153
+ - :code:`RecursiveBacktrackingSolver`
154
+ - :code:`MinConflictsSolver`
155
+ - :code:`ParallelSolver`
150
156
 
151
157
  .. role:: python(code)
152
158
  :language: python
153
159
 
154
- Predefined constraint types currently available:
155
-
156
- - :python:`FunctionConstraint`
157
- - :python:`AllDifferentConstraint`
158
- - :python:`AllEqualConstraint`
159
- - :python:`MaxSumConstraint`
160
- - :python:`ExactSumConstraint`
161
- - :python:`MinSumConstraint`
162
- - :python:`MaxProdConstraint`
163
- - :python:`MinProdConstraint`
164
- - :python:`InSetConstraint`
165
- - :python:`NotInSetConstraint`
166
- - :python:`SomeInSetConstraint`
167
- - :python:`SomeNotInSetConstraint`
160
+ Predefined constraint types currently available (use the parsing for automatic conversion to these types):
161
+
162
+ - :code:`FunctionConstraint`
163
+ - :code:`AllDifferentConstraint`
164
+ - :code:`AllEqualConstraint`
165
+ - :code:`ExactSumConstraint`
166
+ - :code:`MinSumConstraint`
167
+ - :code:`MaxSumConstraint`
168
+ - :code:`MinProdConstraint`
169
+ - :code:`ExactProdConstraint`
170
+ - :code:`MaxProdConstraint`
171
+ - :code:`VariableExactSumConstraint`
172
+ - :code:`VariableMinSumConstraint`
173
+ - :code:`VariableMaxSumConstraint`
174
+ - :code:`VariableMinProdConstraint`
175
+ - :code:`VariableExactProdConstraint`
176
+ - :code:`VariableMaxProdConstraint`
177
+ - :code:`InSetConstraint`
178
+ - :code:`NotInSetConstraint`
179
+ - :code:`SomeInSetConstraint`
180
+ - :code:`SomeNotInSetConstraint`
168
181
 
169
182
  API documentation
170
183
  -----------------
@@ -15,6 +15,7 @@ python-constraint
15
15
  | New: writing constraints in the new string format is preferable over functions and lambdas.
16
16
  | These strings, even as compound statements, are automatically parsed to faster built-in constraints, are more concise, and do not require constraint solving familiarity by the user to be efficient.
17
17
  | For example, :code:`problem.addConstraint(["50 <= x * y < 100"])` is parsed to :code:`[MinProdConstraint(50, ["x", "y"]), MaxProdConstraint(100, ["x", "y"])]`.
18
+ | Similarly, :code:`problem.addConstraint(["x / y == z"])` is parsed to :code:`[ExactProdConstraint("x", ["z", "y"])]`.
18
19
  | This feature is in beta and subject to possible change, please provide feedback.
19
20
 
20
21
  .. contents::
@@ -114,29 +115,36 @@ Features
114
115
 
115
116
  The following solvers are available:
116
117
 
117
- - Backtracking solver
118
- - Optimized backtracking solver
119
- - Recursive backtracking solver
120
- - Minimum conflicts solver
121
- - Parallel solver
118
+ - :code:`OptimizedBacktrackingSolver` (default)
119
+ - :code:`BacktrackingSolver`
120
+ - :code:`RecursiveBacktrackingSolver`
121
+ - :code:`MinConflictsSolver`
122
+ - :code:`ParallelSolver`
122
123
 
123
124
  .. role:: python(code)
124
125
  :language: python
125
126
 
126
- Predefined constraint types currently available:
127
-
128
- - :python:`FunctionConstraint`
129
- - :python:`AllDifferentConstraint`
130
- - :python:`AllEqualConstraint`
131
- - :python:`MaxSumConstraint`
132
- - :python:`ExactSumConstraint`
133
- - :python:`MinSumConstraint`
134
- - :python:`MaxProdConstraint`
135
- - :python:`MinProdConstraint`
136
- - :python:`InSetConstraint`
137
- - :python:`NotInSetConstraint`
138
- - :python:`SomeInSetConstraint`
139
- - :python:`SomeNotInSetConstraint`
127
+ Predefined constraint types currently available (use the parsing for automatic conversion to these types):
128
+
129
+ - :code:`FunctionConstraint`
130
+ - :code:`AllDifferentConstraint`
131
+ - :code:`AllEqualConstraint`
132
+ - :code:`ExactSumConstraint`
133
+ - :code:`MinSumConstraint`
134
+ - :code:`MaxSumConstraint`
135
+ - :code:`MinProdConstraint`
136
+ - :code:`ExactProdConstraint`
137
+ - :code:`MaxProdConstraint`
138
+ - :code:`VariableExactSumConstraint`
139
+ - :code:`VariableMinSumConstraint`
140
+ - :code:`VariableMaxSumConstraint`
141
+ - :code:`VariableMinProdConstraint`
142
+ - :code:`VariableExactProdConstraint`
143
+ - :code:`VariableMaxProdConstraint`
144
+ - :code:`InSetConstraint`
145
+ - :code:`NotInSetConstraint`
146
+ - :code:`SomeInSetConstraint`
147
+ - :code:`SomeNotInSetConstraint`
140
148
 
141
149
  API documentation
142
150
  -----------------