Skip to content

Commit

Permalink
gunittest: remove deprecated 'U'-mode for open() (OSGeo#2673)
Browse files Browse the repository at this point in the history
'U'-mode was deprecated since Python 3.4, it is removed in Python 3.11.
  • Loading branch information
nilason authored and neteler committed Nov 7, 2023
1 parent ce3575e commit 976e898
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions python/grass/gunittest/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -1239,9 +1239,8 @@ def assertVectorAsciiEqualsVectorAscii(
"""
import difflib

# 'U' taken from difflib documentation
fromlines = open(actual, "U").readlines()
tolines = open(reference, "U").readlines()
fromlines = open(actual).readlines()
tolines = open(reference).readlines()
context_lines = 3 # number of context lines
# TODO: filenames are set to "actual" and "reference", isn't it too general?
# it is even more useful if map names or file names are some generated
Expand Down

0 comments on commit 976e898

Please sign in to comment.