Skip to content

Commit

Permalink
Replaced pkg_resources version parser with packager version parser. (#…
Browse files Browse the repository at this point in the history
…5511)

* removed pkg_resources version parse references

* Corrected pull num

* Fix What's New indentation

* Fix What's New indentation.

---------

Co-authored-by: Martin Yeo <[email protected]>
  • Loading branch information
ESadek-MO and trexfeathers authored Sep 22, 2023
1 parent 4f126a0 commit f054047
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions docs/src/whatsnew/latest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ This document explains the changes made to Iris for this release
working properly. (Main pull request: :pull:`5437`, more detail:
:pull:`5430`, :pull:`5431`, :pull:`5432`, :pull:`5434`, :pull:`5436`)

#. `@acchamber`_ removed several warnings from iris related to Numpy 1.25 deprecations.
(:pull:`5493`)
#. `@acchamber`_ and `@ESadek-MO`_ resolved several deprecation to reduce
number of warnings raised during tests.
(:pull:`5493`, :pull:`5511`)

#. `@trexfeathers`_ replaced all uses of the ``logging.WARNING`` level, in
favour of using Python warnings, following team agreement. (:pull:`5488`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import numpy as np
from numpy import ma
from pkg_resources import parse_version
from packaging import version

from iris._lazy_data import as_lazy_data, is_lazy_data
from iris.experimental.ugrid.mesh import Connectivity
Expand Down Expand Up @@ -63,7 +63,7 @@ def test_indices(self):

def test_read_only(self):
attributes = ("indices", "cf_role", "start_index", "location_axis")
if parse_version(python_version()) >= parse_version("3.11"):
if version.parse(python_version()) >= version.parse("3.11"):
msg = "object has no setter"
else:
msg = "can't set attribute"
Expand Down
4 changes: 2 additions & 2 deletions lib/iris/tests/unit/experimental/ugrid/mesh/test_MeshCoord.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import dask.array as da
import numpy as np
from pkg_resources import parse_version
from packaging import version
import pytest

from iris._lazy_data import as_lazy_data, is_lazy_data
Expand Down Expand Up @@ -79,7 +79,7 @@ def setUp(self):
def test_fixed_metadata(self):
# Check that you cannot set any of these on an existing MeshCoord.
meshcoord = self.meshcoord
if parse_version(python_version()) >= parse_version("3.11"):
if version.parse(python_version()) >= version.parse("3.11"):
msg = "object has no setter"
else:
msg = "can't set attribute"
Expand Down

0 comments on commit f054047

Please sign in to comment.