aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-06-29 20:52:55 +0300
committerGitHub <noreply@github.com>2021-06-29 20:52:55 +0300
commit4bfee181c5a166e3d429bd265e06d299dce50f30 (patch)
tree8918a0e09f668ed55748ec254c51b4d92b5403a9 /docs
parent81ca0ec7ae975723b8b399b9f142286895a45dab (diff)
parentc0a2025d038a08092212bfc45e7bbb46ff1e8e52 (diff)
downloadmeson-4bfee181c5a166e3d429bd265e06d299dce50f30.zip
meson-4bfee181c5a166e3d429bd265e06d299dce50f30.tar.gz
meson-4bfee181c5a166e3d429bd265e06d299dce50f30.tar.bz2
Merge pull request #8918 from mensinda/pathlibFixes
pathlib: Patch pathlib to work around some bugs (fixes #8263 #7295)
Diffstat (limited to 'docs')
-rwxr-xr-xdocs/genrelnotes.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/genrelnotes.py b/docs/genrelnotes.py
index 5dad924..082ab45 100755
--- a/docs/genrelnotes.py
+++ b/docs/genrelnotes.py
@@ -36,10 +36,10 @@ def add_to_sitemap(from_version, to_version):
Adds release note entry to sitemap.txt.
'''
sitemapfile = '../sitemap.txt'
- s_f = open(sitemapfile)
+ s_f = open(sitemapfile, encoding='utf-8')
lines = s_f.readlines()
s_f.close()
- with open(sitemapfile, 'w') as s_f:
+ with open(sitemapfile, 'w', encoding='utf-8') as s_f:
for line in lines:
if 'Release-notes' in line and from_version in line:
new_line = line.replace(from_version, to_version)
@@ -51,10 +51,10 @@ def generate(from_version, to_version):
Generate notes for Meson build next release.
'''
ofilename = f'Release-notes-for-{to_version}.md'
- with open(ofilename, 'w') as ofile:
+ with open(ofilename, 'w', encoding='utf-8') as ofile:
ofile.write(RELNOTE_TEMPLATE.format(to_version, to_version))
for snippetfile in glob('snippets/*.md'):
- snippet = open(snippetfile).read()
+ snippet = open(snippetfile, encoding='utf-8').read()
ofile.write(snippet)
if not snippet.endswith('\n'):
ofile.write('\n')