# HG changeset patch # User RĂ©mi Cardona # Date 1442322433 -7200 # Node ID 7fc548d9dd8e23a80cecee56cf10d6b7d9d37782 # Parent 6519ae8cca0c714d235e8b121850ccb984da08f8 [py3k] import queue using six.moves diff -r 6519ae8cca0c -r 7fc548d9dd8e devtools/qunit.py --- a/devtools/qunit.py Tue Sep 15 14:59:06 2015 +0200 +++ b/devtools/qunit.py Tue Sep 15 15:07:13 2015 +0200 @@ -19,11 +19,12 @@ import os, os.path as osp from tempfile import mkdtemp, NamedTemporaryFile, TemporaryFile import tempfile -from Queue import Queue, Empty from subprocess import Popen, check_call, CalledProcessError from shutil import rmtree, copy as copyfile from uuid import uuid4 +from six.moves.queue import Queue, Empty + # imported by default to simplify further import statements from logilab.common.testlib import unittest_main, with_tempdir, InnerTest, Tags from logilab.common.shellutils import getlogin diff -r 6519ae8cca0c -r 7fc548d9dd8e server/repository.py --- a/server/repository.py Tue Sep 15 14:59:06 2015 +0200 +++ b/server/repository.py Tue Sep 15 15:07:13 2015 +0200 @@ -30,12 +30,13 @@ __docformat__ = "restructuredtext en" import threading -import Queue from warnings import warn from itertools import chain from time import time, localtime, strftime from contextlib import contextmanager +from six.moves import queue + from logilab.common.decorators import cached, clear_cache from logilab.common.deprecation import deprecated @@ -199,7 +200,7 @@ def init_cnxset_pool(self): """should be called bootstrap_repository, as this is what it does""" config = self.config - self._cnxsets_pool = Queue.Queue() + self._cnxsets_pool = queue.Queue() # 0. init a cnxset that will be used to fetch bootstrap information from # the database self._cnxsets_pool.put_nowait(self.system_source.wrapped_connection()) @@ -379,7 +380,7 @@ def _get_cnxset(self): try: return self._cnxsets_pool.get(True, timeout=5) - except Queue.Empty: + except queue.Empty: raise Exception('no connections set available after 5 secs, probably either a ' 'bug in code (too many uncommited/rolled back ' 'connections) or too much load on the server (in '