Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced pkg_resources version parser with packager version parser. #5511

Merged
merged 4 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 marked this conversation as resolved.
Show resolved Hide resolved

#. `@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