Changeset 13466


Ignore:
Timestamp:
Sep 13, 2019 12:06:16 PM (3 months ago)
Author:
randersson
Message:

#5819 Fixed issues with metaclasses from 2to3 changes

Location:
branches/dev-5819/Python/src/pyjmi/optimization
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-5819/Python/src/pyjmi/optimization/greybox.py

    r13461 r13466  
    22# -*- coding: utf-8 -*-
    33
    4 #    Copyright (C) 2015 Modelon AB
    5 #
    6 #    This program is free software: you can redistribute it and/or modify
    7 #    it under the terms of the GNU General Public License as published by
    8 #    the Free Software Foundation, version 3 of the License.
    9 #
    10 #    This program is distributed in the hope that it will be useful,
    11 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13 #    GNU General Public License for more details.
    14 #
    15 #    You should have received a copy of the GNU General Public License
    16 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
     4# Copyright (C) 2015 Modelon AB, all rights reserved.
    175from pyjmi.optimization.casadi_collocation import ExternalData
    186
  • branches/dev-5819/Python/src/pyjmi/optimization/polynomial.py

    r13461 r13466  
    2525import numpy.linalg
    2626import scipy.special as SP
     27from six import with_metaclass
    2728try:
    2829    import casadi
     
    3132        'Could not find CasADi package, aborting.')
    3233
    33 class LocalPol(object, metaclass=abc.ABCMeta):
     34class LocalPol(object, with_metaclass(abc.ABCMeta)):
    3435   
    3536    """
  • branches/dev-5819/Python/src/pyjmi/optimization/realtimecontrol.py

    r13461 r13466  
    1616from pymodelica import compile_fmu
    1717from pyfmi import load_fmu
    18 
     18from six import with_metaclass
    1919
    2020class ParameterChanges(object):
     
    8282     
    8383     
    84 class RealTimeBase(object, metaclass=ABCMeta):
     84class RealTimeBase(object, with_metaclass(metaclass=ABCMeta)):
    8585   
    8686    def __init__(self, dt, t_final, start_values, output_names,
Note: See TracChangeset for help on using the changeset viewer.