1
# Copyright (C) 2017 Bazaar hackers
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 2 of the License, or
6
# (at your option) any later version.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
Module to aid writing a Python dialect compatible with 2.7 and 3.4+.
20
Initially pretty much just a subset of six while things get worked out.
23
from __future__ import absolute_import
41
# The io module exists in Python 2.7 but lacks optimisation. Most uses are not
42
# performance critical, but want to measure before switching from cStringIO.
46
StringIO = _io.StringIO
47
from builtins import range, map, zip
49
from cStringIO import StringIO as BytesIO # noqa: F401
50
from StringIO import StringIO # noqa: F401
51
from future_builtins import zip, map # noqa: F401
52
range = xrange # noqa: F821
55
# GZ 2017-06-10: Work out if interning bits of inventory is behaviour we want
56
# to retain outside of StaticTuple, if so need to implement for Python 3.
59
"""Dummy intern() function."""