Files
macports-ports/math/gunits/files/patch-units_cur-deprecated.diff
Saj GoonatillekeandRenee Otten 7482759717 gunits: update to 2.25
codecs.open was deprecated in python 3.14.
2026-02-01 20:26:41 -05:00

12 lines
506 B
Diff

--- units_cur.orig 2026-02-01 14:00:09.000000000 +1100
+++ units_cur 2026-02-01 14:12:55.000000000 +1100
@@ -692,7 +692,7 @@
if currency_file == '-':
codecs.StreamReader(stdout, codecs.getreader('utf8')).write(currency_text)
else:
- with codecs.open(currency_file, 'w', 'utf8') as of:
+ with open(currency_file, 'w', encoding='utf8') as of:
of.write(currency_text)
except IOError as e:
stderr.write('Unable to write to output file:\n{}\n'.format(e))