diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py index a8ca6538f..638048fb6 100644 --- a/git/refs/symbolic.py +++ b/git/refs/symbolic.py @@ -90,7 +90,7 @@ def _iter_packed_refs(cls, repo): """Returns an iterator yielding pairs of sha1/path pairs (as bytes) for the corresponding refs. :note: The packed refs file will be kept open as long as we iterate""" try: - with open(cls._get_packed_refs_path(repo), 'rt') as fp: + with open(cls._get_packed_refs_path(repo), 'rt', encoding='utf-8') as fp: for line in fp: line = line.strip() if not line: diff --git a/git/remote.py b/git/remote.py index 0965c1f60..0bab3be90 100644 --- a/git/remote.py +++ b/git/remote.py @@ -786,8 +786,7 @@ def fetch(self, refspec=None, progress=None, **kwargs): else: args = [refspec] - proc = self.repo.git.fetch(self, *args, as_process=True, with_stdout=False, - universal_newlines=True, v=True, **kwargs) + proc = self.repo.git.fetch(self, *args, as_process=True, with_stdout=False, v=True, **kwargs) res = self._get_fetch_info_from_stderr(proc, progress) if hasattr(self.repo.odb, 'update_cache'): self.repo.odb.update_cache() @@ -805,8 +804,7 @@ def pull(self, refspec=None, progress=None, **kwargs): # No argument refspec, then ensure the repo's config has a fetch refspec. self._assert_refspec() kwargs = add_progress(kwargs, self.repo.git, progress) - proc = self.repo.git.pull(self, refspec, with_stdout=False, as_process=True, - universal_newlines=True, v=True, **kwargs) + proc = self.repo.git.pull(self, refspec, with_stdout=False, as_process=True, v=True, **kwargs) res = self._get_fetch_info_from_stderr(proc, progress) if hasattr(self.repo.odb, 'update_cache'): self.repo.odb.update_cache() @@ -840,8 +838,7 @@ def push(self, refspec=None, progress=None, **kwargs): If the operation fails completely, the length of the returned IterableList will be null.""" kwargs = add_progress(kwargs, self.repo.git, progress) - proc = self.repo.git.push(self, refspec, porcelain=True, as_process=True, - universal_newlines=True, **kwargs) + proc = self.repo.git.push(self, refspec, porcelain=True, as_process=True, **kwargs) return self._get_push_info(proc, progress) @property