Patchwork D7759: ui: delete local variables instead of setting to `None`

login
register
mail settings
Submitter phabricator
Date Dec. 30, 2019, 1:33 p.m.
Message ID <f27c83a6af5dc33e30126d76301a0993@localhost.localdomain>
Download mbox | patch
Permalink /patch/44130/
State Not Applicable
Headers show

Comments

phabricator - Dec. 30, 2019, 1:33 p.m.
Closed by commit rHGe3ce3731d621: ui: delete local variables instead of setting to `None` (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7759?vs=18990&id=19019

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7759/new/

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

AFFECTED FILES
  mercurial/ui.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -2032,7 +2032,10 @@ 
             self.log(
                 b'develwarn', b'%s at: %s:%d (%s)\n', msg, fname, lineno, fmsg
             )
-            curframe = calframe = None  # avoid cycles
+
+            # avoid cycles
+            del curframe
+            del calframe
 
     def deprecwarn(self, msg, version, stacklevel=2):
         """issue a deprecation warning