Skip to content

Commit cb5863c

Browse files
committed
fixed some warnings
1 parent 0908e00 commit cb5863c

5 files changed

Lines changed: 3 additions & 16 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- Generalized getLhs() and getRhs() to additionally support any linear type constraint
1414
### Fixed
1515
- Raised an error when an expression is used when a variable is required
16+
- Fixed some compile warnings
1617
### Changed
1718
- MatrixExpr.sum() now supports axis arguments and can return either a scalar or MatrixExpr depending on the result dimensions
1819
### Removed

src/pyscipopt/event.pxi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ cdef class Eventhdlr:
3939

4040

4141
# local helper functions for the interface
42-
cdef Eventhdlr getPyEventhdlr(SCIP_EVENTHDLR* eventhdlr) noexcept with gil:
42+
cdef Eventhdlr getPyEventhdlr(SCIP_EVENTHDLR* eventhdlr):
4343
cdef SCIP_EVENTHDLRDATA* eventhdlrdata
4444
eventhdlrdata = SCIPeventhdlrGetData(eventhdlr)
4545
return <Eventhdlr>eventhdlrdata

src/pyscipopt/expr.pxi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ cdef class ExprCons:
358358
def __repr__(self):
359359
return 'ExprCons(%s, %s, %s)' % (self.expr, self._lhs, self._rhs)
360360

361-
def __nonzero__(self):
361+
def __bool__(self):
362362
'''Make sure that equality of expressions is not asserted with =='''
363363

364364
msg = """Can't evaluate constraints as booleans.

src/pyscipopt/scip.pxd

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -408,12 +408,6 @@ cdef extern from "scip/scip.h":
408408
ctypedef struct SCIP_PROPDATA:
409409
pass
410410

411-
ctypedef struct SCIP_PROPTIMING:
412-
pass
413-
414-
ctypedef struct SCIP_PRESOLTIMING:
415-
pass
416-
417411
ctypedef struct SCIP_PRESOL:
418412
pass
419413

@@ -456,9 +450,6 @@ cdef extern from "scip/scip.h":
456450
ctypedef struct SCIP_PRESOL:
457451
pass
458452

459-
ctypedef struct SCIP_HEURTIMING:
460-
pass
461-
462453
ctypedef struct SCIP_SEPA:
463454
pass
464455

@@ -510,9 +501,6 @@ cdef extern from "scip/scip.h":
510501
ctypedef struct BMS_BLKMEM:
511502
pass
512503

513-
ctypedef struct SCIP_EXPR:
514-
pass
515-
516504
ctypedef struct SCIP_EXPRHDLR:
517505
pass
518506

@@ -707,7 +695,6 @@ cdef extern from "scip/scip.h":
707695
SCIP_Real SCIPgetLocalTransEstimate(SCIP* scip)
708696

709697
# Solve Methods
710-
SCIP_RETCODE SCIPsolve(SCIP* scip)
711698
SCIP_RETCODE SCIPsolve(SCIP* scip) noexcept nogil
712699
SCIP_RETCODE SCIPsolveConcurrent(SCIP* scip)
713700
SCIP_RETCODE SCIPfreeTransform(SCIP* scip)

src/pyscipopt/scip.pxi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7974,7 +7974,6 @@ cdef class Model:
79747974
79757975
"""
79767976
raise Warning("model.getDualMultiplier(cons) is deprecated: please use model.getDualsolLinear(cons)")
7977-
return self.getDualsolLinear(cons)
79787977

79797978
def getDualfarkasLinear(self, Constraint cons):
79807979
"""

0 commit comments

Comments
 (0)