-
Requirements
Affiliation(s)LANL ESMF Versionv8.7.0 (and earlier) IssueI'm trying to build ESMPy 8.7.0 on conda-forge:
The cause of this is that # slice at will
if not isinstance(slc_ls, slice):
ret = super(LocStream, self).__getitem__(slc_ls)
else:
# as of Python 3.12, slice objects are hashable so don't
# raise a TypeError
ret = self.copy()
... This at least seems to have allowed all tests to pass. Autotag |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
In general, it seems like you all should probably either be testing with python 3.12 and 3.13 or should explicitly constrain python to be below these versions. |
Beta Was this translation helpful? Give feedback.
-
Thank you for reporting this @xylar . I'll take a look soon, and will also review the python versions that we're testing with. |
Beta Was this translation helpful? Give feedback.
-
@xylar - sorry it took me a while to get to this, but I have now brought in your suggested change: 338cd06. I looked this over pretty carefully and agree with the change you proposed. As noted in that commit, I think there are a number of possible cases where the new code will behave differently from the old code, but as far as I can tell, all of those cases would have raised exceptions in the old code, and now will just raise different exceptions, so I'm not too concerned. Part of what held me up was that I ran into different errors while testing with python 3.12 on my Mac: I was getting Segmentation Faults in two places. I also fixed this issue today: 6d5fdfe. I will now add nightly testing with python3.12 and python3.13. Thank you again for reporting this and for providing the fix! |
Beta Was this translation helpful? Give feedback.
-
@xylar - also FYI just in case you run into this: In updating our ESMPy test environments to test more recent versions of python as well as other packages, I ran into an issue with recent versions of numpy: #329. I'll work on a fix for that as well, so that we can hopefully have support for the latest python & numpy versions in the upcoming 8.8 release. |
Beta Was this translation helpful? Give feedback.
@xylar - sorry it took me a while to get to this, but I have now brought in your suggested change: 338cd06. I looked this over pretty carefully and agree with the change you proposed. As noted in that commit, I think there are a number of possible cases where the new code will behave differently from the old code, but as far as I can tell, all of those cases would have raised exceptions in the old code, and now will just raise different exceptions, so I'm not too concerned.
Part of what held me up was that I ran into different errors while testing with python 3.12 on my Mac: I was getting Segmentation Faults in two places. I also fixed this issue today: 6d5fdfe.
I will now add nightly tes…