Patchwork [9,of,9] pycompat: move the queue related definitions below queue import

login
register
mail settings
Submitter Pulkit Goyal
Date June 15, 2017, 9:34 p.m.
Message ID <22a84b6947f5b1f69152.1497562491@workspace>
Download mbox | patch
Permalink /patch/21412/
State Accepted
Headers show

Comments

Pulkit Goyal - June 15, 2017, 9:34 p.m.
# HG changeset patch
# User Pulkit Goyal <7895pulkit@gmail.com>
# Date 1497562282 -19800
#      Fri Jun 16 03:01:22 2017 +0530
# Node ID 22a84b6947f5b1f69152315f4757512cb3e04ad9
# Parent  c95d3227e37cfbbb2c687dad98bc978d063c624f
pycompat: move the queue related definitions below queue import

This helps in understanding why empty and queue are there.

Patch

diff --git a/mercurial/pycompat.py b/mercurial/pycompat.py
--- a/mercurial/pycompat.py
+++ b/mercurial/pycompat.py
@@ -32,6 +32,9 @@ 
     import socketserver
     import xmlrpc.client as xmlrpclib
 
+empty = _queue.Empty
+queue = _queue.Queue
+
 def identity(a):
     return a
 
@@ -307,9 +310,6 @@ 
     if getattr(sys, 'argv', None) is not None:
         sysargv = sys.argv
 
-empty = _queue.Empty
-queue = _queue.Queue
-
 class _pycompatstub(object):
     def __init__(self):
         self._aliases = {}