Mercurial > public > mercurial-scm > hg-stable
changeset 52679:f19a3f1437f3
pyupgrade: drop `coding=UTF-8` comments
PEP-3120[1] (Python 3.0 in 2007) says that UTF-8 is the default encoding. That
should be long enough ago that no reasonable editor would trip over this, and
certainly any supported version of Python won't.
The comments were probably harmless, but as `pyupgrade` has no mechanism to
disable this change, omitting this change makes it unusable as a code checking
tool, and makes it a pain to use occasionally to upgrade the source (since these
changes would need to be manually reverted).
[1] https://peps.python.org/pep-3120/
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 07 Jan 2025 16:46:21 -0500 |
parents | b3e68fd7864b |
children | 5027ae0d89b3 |
files | doc/hgmanpage.py hgext/beautifygraph.py hgext/convert/transport.py i18n/polib.py mercurial/copies.py mercurial/interfaces/repository.py mercurial/localrepo.py mercurial/metadata.py mercurial/revlog.py mercurial/revlogutils/rewrite.py tests/flagprocessorext.py tests/test-url.py tests/testlib/ext-sidedata-2.py tests/testlib/ext-sidedata-3.py tests/testlib/ext-sidedata-4.py tests/testlib/ext-sidedata-5.py |
diffstat | 16 files changed, 0 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/hgmanpage.py Mon Jan 06 01:39:53 2025 -0500 +++ b/doc/hgmanpage.py Tue Jan 07 16:46:21 2025 -0500 @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # $Id: manpage.py 6110 2009-08-31 14:40:33Z grubert $ # Author: Engelbert Gruber <grubert@users.sourceforge.net> # Copyright: This module is put into the public domain.
--- a/hgext/beautifygraph.py Mon Jan 06 01:39:53 2025 -0500 +++ b/hgext/beautifygraph.py Tue Jan 07 16:46:21 2025 -0500 @@ -1,4 +1,3 @@ -# -*- coding: UTF-8 -*- # beautifygraph.py - improve graph output by using Unicode characters # # Copyright 2018 John Stiles <johnstiles@gmail.com>
--- a/hgext/convert/transport.py Mon Jan 06 01:39:53 2025 -0500 +++ b/hgext/convert/transport.py Tue Jan 07 16:46:21 2025 -0500 @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - # Copyright (C) 2007 Daniel Holth <dholth@fastmail.fm> # This is a stripped-down version of the original bzr-svn transport.py, # Copyright (C) 2006 Jelmer Vernooij <jelmer@samba.org>
--- a/i18n/polib.py Mon Jan 06 01:39:53 2025 -0500 +++ b/i18n/polib.py Tue Jan 07 16:46:21 2025 -0500 @@ -1,5 +1,4 @@ # no-check-code -# -* coding: utf-8 -*- # # License: MIT (see LICENSE file provided) # vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4:
--- a/mercurial/copies.py Mon Jan 06 01:39:53 2025 -0500 +++ b/mercurial/copies.py Tue Jan 07 16:46:21 2025 -0500 @@ -1,4 +1,3 @@ -# coding: utf8 # copies.py - copy detection for Mercurial # # Copyright 2008 Olivia Mackall <olivia@selenic.com>
--- a/mercurial/interfaces/repository.py Mon Jan 06 01:39:53 2025 -0500 +++ b/mercurial/interfaces/repository.py Tue Jan 07 16:46:21 2025 -0500 @@ -1,5 +1,4 @@ # repository.py - Interfaces and base classes for repositories and peers. -# coding: utf-8 # # Copyright 2017 Gregory Szorc <gregory.szorc@gmail.com> #
--- a/mercurial/localrepo.py Mon Jan 06 01:39:53 2025 -0500 +++ b/mercurial/localrepo.py Tue Jan 07 16:46:21 2025 -0500 @@ -1,5 +1,4 @@ # localrepo.py - read/write repository class for mercurial -# coding: utf-8 # # Copyright 2005-2007 Olivia Mackall <olivia@selenic.com> #
--- a/mercurial/metadata.py Mon Jan 06 01:39:53 2025 -0500 +++ b/mercurial/metadata.py Tue Jan 07 16:46:21 2025 -0500 @@ -1,4 +1,3 @@ -# coding: utf-8 # metadata.py -- code related to various metadata computation and access. # # Copyright 2019 Google, Inc <martinvonz@google.com>
--- a/mercurial/revlog.py Mon Jan 06 01:39:53 2025 -0500 +++ b/mercurial/revlog.py Tue Jan 07 16:46:21 2025 -0500 @@ -1,5 +1,4 @@ # revlog.py - storage back-end for mercurial -# coding: utf8 # # Copyright 2005-2007 Olivia Mackall <olivia@selenic.com> #
--- a/mercurial/revlogutils/rewrite.py Mon Jan 06 01:39:53 2025 -0500 +++ b/mercurial/revlogutils/rewrite.py Tue Jan 07 16:46:21 2025 -0500 @@ -1,5 +1,4 @@ # censor code related to censoring revision -# coding: utf8 # # Copyright 2021 Pierre-Yves David <pierre-yves.david@octobus.net> # Copyright 2015 Google, Inc <martinvonz@google.com>
--- a/tests/flagprocessorext.py Mon Jan 06 01:39:53 2025 -0500 +++ b/tests/flagprocessorext.py Tue Jan 07 16:46:21 2025 -0500 @@ -1,6 +1,3 @@ -# coding=UTF-8 - - import base64 import zlib
--- a/tests/test-url.py Mon Jan 06 01:39:53 2025 -0500 +++ b/tests/test-url.py Tue Jan 07 16:46:21 2025 -0500 @@ -1,5 +1,3 @@ -# coding=utf-8 - import doctest import os
--- a/tests/testlib/ext-sidedata-2.py Mon Jan 06 01:39:53 2025 -0500 +++ b/tests/testlib/ext-sidedata-2.py Tue Jan 07 16:46:21 2025 -0500 @@ -1,4 +1,3 @@ -# coding: utf8 # ext-sidedata-2.py - small extension to test (differently) the sidedata logic # # Simulates a client for a complex sidedata exchange.
--- a/tests/testlib/ext-sidedata-3.py Mon Jan 06 01:39:53 2025 -0500 +++ b/tests/testlib/ext-sidedata-3.py Tue Jan 07 16:46:21 2025 -0500 @@ -1,4 +1,3 @@ -# coding: utf8 # ext-sidedata-3.py - small extension to test (differently still) the sidedata # logic #