@@ -521,7 +521,7 @@ def load(self, filename, *, metadata=None):
521521
522522Broadly equivalent to blurb.parse(open(filename).read()).
523523 """
524- with open (filename , "rt" , encoding = "utf-8" ) as file :
524+ with open (filename , encoding = "utf-8" ) as file :
525525 text = file .read ()
526526 self .parse (text , metadata = metadata , filename = filename )
527527
@@ -683,7 +683,7 @@ def filename_test(self, filename):
683683
684684
685685def run (s ):
686- process = subprocess .run (s .split (), stdout = subprocess . PIPE , stderr = subprocess . PIPE )
686+ process = subprocess .run (s .split (), capture_output = True )
687687 process .check_returncode ()
688688 return process .stdout .decode ('ascii' )
689689
@@ -711,7 +711,7 @@ def chdir_to_repo_root():
711711 def test_first_line (filename , test ):
712712 if not os .path .exists (filename ):
713713 return False
714- with open (filename , "rt" ) as file :
714+ with open (filename ) as file :
715715 lines = file .read ().split ('\n ' )
716716 if not (lines and test (lines [0 ])):
717717 return False
@@ -1335,7 +1335,7 @@ def flush_version():
13351335 blurbs .clear ()
13361336 version_count += 1
13371337
1338- with open ("NEWS" , "rt" , encoding = "utf-8" ) as file :
1338+ with open ("NEWS" , encoding = "utf-8" ) as file :
13391339 for line_number , line in enumerate (file ):
13401340 line = line .rstrip ()
13411341
0 commit comments