Skip to content

Commit d88206c

Browse files
committed
Merge branch 'master' into ExprLike
2 parents 483528a + 6ff3381 commit d88206c

13 files changed

Lines changed: 417 additions & 142 deletions

File tree

.github/workflows/stubs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ jobs:
7878
- name: Install Ruff
7979
uses: astral-sh/ruff-action@v3
8080
with:
81+
version: "0.14.11"
8182
args: "--version"
8283

8384
- name: Lint type stubs

CHANGELOG.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,29 @@
66
### Changed
77
### Removed
88

9-
## 6.2.0 - 2026.04.23
9+
## 6.2.1 - 2026.05.16
10+
### Fixed
11+
- Fixed `AttributeError` when comparing NumPy scalars (e.g. `np.float64`) or 0-dim NumPy arrays against `Expr`/`Variable` on NumPy 2.x (#1218)
12+
13+
## 6.2.0 - 2026.05.11
1014
### Added
15+
- Added `solveProbingLPWithPricing()` and test
1116
- `Expr` and `GenExpr` support NumPy unary functions (`np.sin`, `np.cos`, `np.sqrt`, `np.exp`, `np.log`, `np.absolute`, `np.negative`)
1217
- `Expr` and `GenExpr` support NumPy binary functions (`np.add`, `np.subtract`, `np.multiply`, `np.divide`, `np.true_divide`, `np.power`, `np.less_equal`, `np.greater_equal`, `np.equal`)
1318
- Added `getBase()` and `setBase()` methods to `LP` class for getting/setting basis status
1419
- Added `getMemUsed()`, `getMemTotal()`, and `getMemExternEstim()` methods
1520
- Added `isReoptEnabled()` and raising error if not enabled upon calling `reoptSolve()`
21+
- SOS1/SOS2 constraints are now realease after addition similar to the other constraint types
1622
### Fixed
1723
- Removed `Py_INCREF`/`Py_DECREF` on `Model` in `catchEvent`/`dropEvent` that caused memory leak for imbalanced usage
1824
- Used `getIndex()` instead of `ptr()` for sorting nonlinear expression terms to avoid nondeterministic behavior
1925
- Fixed stubtest failures with mypy 1.20 by marking dunder method parameters as positional-only
2026
- Return `MatrixGenExpr` in `buildGenExprObj` instead of `MatrixExpr`
21-
- Plugins now hold strong references to their `Model` instead of `weakref.proxy`, fixing `ReferenceError` during cleanup callbacks (#1193)
27+
- Plugins now hold strong references to their `Model` instead of `weakref.proxy`, fixing `ReferenceError` during cleanup callbacks
28+
- Made `test_tree` robust to SCIP solver improvements by asserting visited node depths instead of node count
29+
- Lower macOS wheel `MACOSX_DEPLOYMENT_TARGET` to 11.0 and patch bundled SCIP/SoPlex/GCG and GCC runtime dylibs to match
2230
### Changed
31+
- Return NotImplemented for `Expr` and `GenExpr` operators if they can't handle input types in the calculation
2332
- Speed up `constant * Expr` via C-level API
2433
- Speed up `Term.__eq__` via the C-level API
2534
- Move magic methods (`__radd__`, `__sub__`, `__rsub__`, `__rmul__`, `__richcmp__`, `__neg__`, and `__rtruediv__`) to `ExprLike` base class

RELEASE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,23 @@ Deletes the release-candidate branch and resets the local release commit. test-p
7070
gh release create vX.Y.Z --repo scipopt/PySCIPOpt --title vX.Y.Z --generate-notes
7171
```
7272
- [ ] Update readthedocs: Builds -> Build version (latest and stable)
73+
74+
## Manual release (fallback)
75+
The following are the steps to follow to make a new PySCIPOpt release. They should mostly be done in order.
76+
- [ ] Check if [scipoptsuite-deploy](https://github.com/scipopt/scipoptsuite-deploy) needs a new release, if a new SCIP version is released for example, or new dependencies (change symmetry dependency, add support for papilo/ parallelization.. etc). And Update release links in `pyproject.toml`
77+
- [ ] Check if the table in the [documentation](https://pyscipopt.readthedocs.io/en/latest/build.html#building-from-source) needs to be updated.
78+
- [ ] Update version number according to semantic versioning [rules](https://semver.org/) in `src/pyscipopt/_version.py` and `setup.py`
79+
- [ ] Update `CHANGELOG.md`; Change the `Unreleased` to the new version number and add an empty unreleased section.
80+
- [ ] Create a release candidate on test-pypi by running the workflow “Build wheels” in Actions->build wheels, with these parameters `upload:true, test-pypi:true` 
81+
- [ ] If the pipeline passes, test the released pip package on test-pypi by running and checking that it works
82+
```bash
83+
pip install -i https://test.pypi.org/simple/ PySCIPOpt
84+
```
85+
- [ ] If it works, release on pypi.org with running the same workflow but with `test-pypi:false`.
86+
- [ ] Then create a tag with the new version (from the master branch)
87+
```bash
88+
git tag vX.X.X
89+
git push origin vX.X.X
90+
```
91+
- [ ] Then make a github [release](https://github.com/scipopt/PySCIPOpt/releases/new) from this new tag.
92+
- [ ] Update the documentation: from readthedocs.io -> Builds -> Build version (latest and stable)

pyproject.toml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,28 +64,36 @@ skip="pp* cp36* cp37*"
6464
before-all = '''
6565
#!/bin/bash
6666
brew install wget zlib gcc
67+
export MACOSX_DEPLOYMENT_TARGET=11.0
6768
if [[ $CIBW_ARCHS == *"arm"* ]]; then
6869
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.12.0/libscip-macos-arm.zip -O scip.zip
69-
export MACOSX_DEPLOYMENT_TARGET=14.0
7070
else
7171
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.12.0/libscip-macos-intel.zip -O scip.zip
72-
export MACOSX_DEPLOYMENT_TARGET=14.0
7372
fi
7473
unzip scip.zip
7574
mv scip_install src/scip
75+
# The bundled SCIP/SoPlex/GCG dylibs are stamped with LC_BUILD_VERSION 14.0 and
76+
# Homebrew gcc runtime libs on macos-15 runners with 15.0. delocate refuses to
77+
# bundle libs whose minos exceeds the wheel's deployment target. Rewrite the
78+
# load command to MACOSX_DEPLOYMENT_TARGET; these libs do not use OS-version-
79+
# gated APIs, so the rewrite is safe in practice.
80+
find src/scip/lib -type f -name "*.dylib" 2>/dev/null | while read lib; do
81+
vtool -set-build-version macos "$MACOSX_DEPLOYMENT_TARGET" "$MACOSX_DEPLOYMENT_TARGET" -replace -output "$lib" "$lib" 2>/dev/null || true
82+
codesign --force --sign - "$lib" 2>/dev/null || true
83+
done
84+
for prefix in /usr/local /opt/homebrew; do
85+
find "$prefix/Cellar" -type f \( -name "libgfortran.*.dylib" -o -name "libquadmath.*.dylib" -o -name "libstdc++.*.dylib" -o -name "libgcc_s.*.dylib" \) 2>/dev/null | while read lib; do
86+
vtool -set-build-version macos "$MACOSX_DEPLOYMENT_TARGET" "$MACOSX_DEPLOYMENT_TARGET" -replace -output "$lib" "$lib" 2>/dev/null || true
87+
codesign --force --sign - "$lib" 2>/dev/null || true
88+
done
89+
done
7690
'''
77-
environment = {SCIPOPTDIR="$(pwd)/src/scip", LD_LIBRARY_PATH="$(pwd)/src/scip/lib:LD_LIBRARY_PATH", DYLD_LIBRARY_PATH="$(pwd)/src/scip/lib:$DYLD_LIBRARY_PATH", PATH="$(pwd)/src/scip/bin:$PATH", PKG_CONFIG_PATH="$(pwd)/src/scip/lib/pkgconfig:$PKG_CONFIG_PATH", RELEASE="true"}
91+
environment = {SCIPOPTDIR="$(pwd)/src/scip", LD_LIBRARY_PATH="$(pwd)/src/scip/lib:LD_LIBRARY_PATH", DYLD_LIBRARY_PATH="$(pwd)/src/scip/lib:$DYLD_LIBRARY_PATH", PATH="$(pwd)/src/scip/bin:$PATH", PKG_CONFIG_PATH="$(pwd)/src/scip/lib/pkgconfig:$PKG_CONFIG_PATH", MACOSX_DEPLOYMENT_TARGET="11.0", RELEASE="true"}
7892
repair-wheel-command = '''
7993
bash -c '
80-
if [[ $CIBW_ARCHS == *"arm"* ]]; then
81-
export MACOSX_DEPLOYMENT_TARGET=14.0
82-
delocate-listdeps {wheel}
83-
delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
84-
else
85-
export MACOSX_DEPLOYMENT_TARGET=14.0
86-
delocate-listdeps {wheel}
87-
delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
88-
fi
94+
export MACOSX_DEPLOYMENT_TARGET=11.0
95+
delocate-listdeps {wheel}
96+
delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
8997
'
9098
'''
9199

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133

134134
setup(
135135
name="PySCIPOpt",
136-
version="6.2.0",
136+
version="6.2.1",
137137
description="Python interface and modeling environment for SCIP",
138138
long_description=long_description,
139139
long_description_content_type="text/markdown",

src/pyscipopt/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__: str = '6.2.0'
1+
__version__: str = '6.2.1'

0 commit comments

Comments
 (0)