Patchwork D6046: global: use raw strings for __slots__

login
register
mail settings
Submitter phabricator
Date March 3, 2019, 9:34 a.m.
Message ID <fe8dad15eba7c844d90586eaa1bd2553@localhost.localdomain>
Download mbox | patch
Permalink /patch/39017/
State Not Applicable
Headers show

Comments

phabricator - March 3, 2019, 9:34 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGae189674bdad: global: use raw strings for __slots__ (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6046?vs=14295&id=14311

REVISION DETAIL
  https://phab.mercurial-scm.org/D6046

AFFECTED FILES
  mercurial/changelog.py
  mercurial/statprof.py
  mercurial/util.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -1216,7 +1216,7 @@ 
     Holds a reference to nodes on either side as well as a key-value
     pair for the dictionary entry.
     """
-    __slots__ = (u'next', u'prev', u'key', u'value', u'cost')
+    __slots__ = (r'next', r'prev', r'key', r'value', r'cost')
 
     def __init__(self):
         self.next = None
diff --git a/mercurial/statprof.py b/mercurial/statprof.py
--- a/mercurial/statprof.py
+++ b/mercurial/statprof.py
@@ -203,7 +203,7 @@ 
 class CodeSite(object):
     cache = {}
 
-    __slots__ = (u'path', u'lineno', u'function', u'source')
+    __slots__ = (r'path', r'lineno', r'function', r'source')
 
     def __init__(self, path, lineno, function):
         assert isinstance(path, bytes)
@@ -263,7 +263,7 @@ 
         return r'%s:%s' % (self.filename(), self.function)
 
 class Sample(object):
-    __slots__ = (u'stack', u'time')
+    __slots__ = (r'stack', r'time')
 
     def __init__(self, stack, time):
         self.stack = stack
diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -183,8 +183,8 @@ 
     """
 
     __slots__ = (
-        u'_offsets',
-        u'_text',
+        r'_offsets',
+        r'_text',
     )
 
     def __new__(cls, text):