Current main branch of resdata will eventually become version 7.0.0.
Major overarching changes:
- Removed all code that is giving a deprecation warning.
- Passing incorrect types will now raise
TypeError (would sometimes raise ValueError before).
- Passing integers that are too large for int32/int64, will raise TypeError rather than wrap.
- bool is not longer automatically converted. This applies to any method that eventually called cwrap.
__repr__ results no longer contain address.
Invalid:
grid = Grid(f"{case}.EGRID", apply_mapaxes="yes") # Any object would be converted to bool in version 6
Valid:
grid = Grid(f"{case}.EGRID", apply_mapaxes=True) # Version 7 only accepts bool
Changes to individual components:
-
Removed the WellSegment.__len__ function as it broke the expectation that len() would return an int.
-
__repr__ of WellInfo no longer uses "[no name]" when name is "".
-
FortIO now requires that the members FortIO.READ_MODE, FortIO.WRITE_MODE, FortIO.APPEND_MODE, FortIO.READ_AND_WRITE_MODE is used instead:
invalid:
fort_io = FortIO(summary_path, mode=2)
valid:
fort_io = FortIO(summary_path, mode=FortIO.WRITE_MODE)
- All dropped
WellConnections now write a message stderr
Bug fixes:
- The
WellSegment.__hash__ function is now compatible with its __eq__ function. Before, WellSegment could not be used in a set() reliably because the hash function was not correct.
openFortIO no longer suppresses exceptions
Other visible changes, not really part of the public API:
- repr and str may format numbers as 0 instead of 0.0 and use different scientific formatting for large numbers.
- Often, classes/enums are no longer subclasses of BaseCClass/BaseCEnum, in which case they do not have the functions Classes
free(), createPythonObject(), and createCReference() and do not declare TYPE_NAME.
KeyError in WellState __getitem__ and TypeError in addWellFile have slightly changed messages.
Current main branch of resdata will eventually become version 7.0.0.
Major overarching changes:
TypeError(would sometimes raiseValueErrorbefore).__repr__results no longer contain address.Invalid:
Valid:
Changes to individual components:
Removed the
WellSegment.__len__function as it broke the expectation that len() would return an int.__repr__of WellInfo no longer uses "[no name]" when name is "".FortIO now requires that the members
FortIO.READ_MODE,FortIO.WRITE_MODE,FortIO.APPEND_MODE,FortIO.READ_AND_WRITE_MODEis used instead:invalid:
valid:
WellConnectionsnow write a message stderrBug fixes:
WellSegment.__hash__function is now compatible with its__eq__function. Before,WellSegmentcould not be used in aset()reliably because the hash function was not correct.openFortIOno longer suppresses exceptionsOther visible changes, not really part of the public API:
free(),createPythonObject(), andcreateCReference()and do not declareTYPE_NAME.KeyErrorinWellState __getitem__andTypeErrorinaddWellFilehave slightly changed messages.