internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: speechbrain/speechbrain

Issue:
[Bug]: Error while running the TransducerLoss module
### Describe the bug

Originally reported by #1867

`ValueError: Found inputs tensors to be on [device(type='cuda', index=0), device(type='cuda', index=0), device(type='cuda', index=0), device(type='cuda', index=0)] while needed to be on a 'cuda' device to use the transducer loss.`

### Expected behaviour

No error should occur.

### To Reproduce

The `TransducerLoss` doctest is sufficient to reproduce the issue.

```python
from speechbrain.nnet.loss.transducer_loss import TransducerLoss
import torch
loss = TransducerLoss(blank=0)
logits = torch.randn((1,2,3,5)).cuda().requires_grad_()
labels = torch.Tensor([[1,2]]).cuda().int()
act_length = torch.Tensor([2]).cuda().int()
label_length = torch.Tensor([2]).cuda().int()
l = loss(logits, labels, act_length, label_length)
```

### Versions

The offending line exists as of current `develop`.

### Relevant log output

_No response_

### Additional context

The offending line of code is the following: https://github.com/speechbrain/speechbrain/blob/develop/speechbrain/nnet/loss/transducer_loss.py#L343 (as of issue making time)

`git blame` points to https://github.com/speechbrain/speechbrain/commit/2c491a4662b1d7bb03f71c38a8f82d9faa766f33 cc @Adel-Moumen. I can look into it and make a PR.

The check is incorrect because `device` is not a `str` but some PyTorch object.


Discussion:
The fix is easy so I will be making a PR.

Resolving patch:
diff --git a/speechbrain/nnet/loss/transducer_loss.py b/speechbrain/nnet/loss/transducer_loss.py
--- a/speechbrain/nnet/loss/transducer_loss.py
+++ b/speechbrain/nnet/loss/transducer_loss.py
@@ -340,7 +340,7 @@ def __init__(self, blank=0, reduction="mean"):
     def forward(self, logits, labels, T, U):
         """Computes the transducer loss."""
         # Transducer.apply function take log_probs tensor.
-        if logits.device == labels.device == T.device == U.device == "cuda":
+        if all(t.is_cuda for t in (logits, labels, T, U)):
             log_probs = logits.log_softmax(-1)
             return self.loss(
                 log_probs, labels, T, U, self.blank, self.reduction


Test patch:
Repository: speechbrain/speechbrain

Issue:
DAC cannot be imported
### Describe the bug

DAC is not installed along the current version of SpeechBrain.

`__init__.py` is missing in `speechbrain/lobes/models/discrete`, therefore `setuptools.find_packages()` cannot find it as a subpackage.

Related: https://github.com/speechbrain/speechbrain/pull/2246#issuecomment-1832405898

### Expected behaviour

DAC imported correctly.

### To Reproduce

`pip install git+https://github.com/speechbrain/speechbrain@develop`

```python
from speechbrain.lobes.models.discrete.dac import DAC
>>> ModuleNotFoundError: No module named 'speechbrain.lobes.models.discrete'
```

### Environment Details

_No response_

### Relevant Log Output

_No response_

### Additional Context

_No response_


Discussion:

Resolving patch:
diff --git a/speechbrain/lobes/models/discrete/__init__.py b/speechbrain/lobes/models/discrete/__init__.py
new file mode 100644
--- /dev/null
+++ b/speechbrain/lobes/models/discrete/__init__.py
@@ -0,0 +1,2 @@
+""" Package defining discrete models.
+"""


Test patch:
Repository: speechbrain/speechbrain

Issue:
Fix obsolete uses of `speechbrain.pretrained` in documentation
### Describe the bug

As described in #2472 the README (and many other `.md`) mention `speechbrain.pretrained`, which was replaced by the inference module in 1.0. The docs are outdated.

### Expected behaviour

Replace and retest all references to `speechbrain.pretrained` in documentation.

### To Reproduce

_No response_

### Environment Details

_No response_

### Relevant Log Output

_No response_

### Additional Context

_No response_


Discussion:

Resolving patch:
diff --git a/speechbrain/inference/interfaces.py b/speechbrain/inference/interfaces.py
--- a/speechbrain/inference/interfaces.py
+++ b/speechbrain/inference/interfaces.py
@@ -69,7 +69,7 @@ def foreign_class(
     ---------
     source : str or Path or FetchSource
         The location to use for finding the model. See
-        ``speechbrain.pretrained.fetching.fetch`` for details.
+        ``speechbrain.utils.fetching.fetch`` for details.
     hparams_file : str
         The name of the hyperparameters file to use for constructing
         the modules necessary for inference. Must contain two keys:
@@ -412,7 +412,7 @@ def from_hparams(
         ---------
         source : str
             The location to use for finding the model. See
-            ``speechbrain.pretrained.fetching.fetch`` for details.
+            ``speechbrain.utils.fetching.fetch`` for details.
         hparams_file : str
             The name of the hyperparameters file to use for constructing
             the modules necessary for inference. Must contain two keys:


Test patch:
diff --git a/tests/utils/README.md b/tests/utils/README.md
--- a/tests/utils/README.md
+++ b/tests/utils/README.md
@@ -29,7 +29,7 @@ Depending on the testing need, `test.yaml` grows - some examples
 1. [ssl-wav2vec2-base-librispeech/test.yaml](https://github.com/speechbrain/speechbrain/blob/hf-interface-testing/updates_pretrained_models/ssl-wav2vec2-base-librispeech/test.yaml) - the play between test sample, interface class, and batch function is handled via HF testing in `tests/utils`
    ```yaml
    sample: example.wav # test audio provided via HF repo
-   cls: WaveformEncoder # existing speechbrain.pretrained.interfaces class
+   cls: WaveformEncoder # existing speechbrain.inference class
    fnx: encode_batch # it's batch-wise function after audio loading
    ```
 2. [asr-wav2vec2-librispeech/test.yaml](https://github.com/speechbrain/speechbrain/blob/hf-interface-testing/updates_pretrained_models/asr-wav2vec2-librispeech/test.yaml) - testing single example & against a dataset test partition
Repository: speechbrain/speechbrain

Issue:
PyPI install incorrectly ships a `tests` package
### Describe the bug

If you check the `.whl` file of SB 1.0, for instance, you will notice that there is an empty `tests/` (with only the `__init__.py`). This is not a huge deal, but it has the unintended consequence that the user now has a `tests` package at their root level.

### Expected behaviour

That package should not exist on normal or editable installs.

### To Reproduce

```python
import tests
```

```bash
$ cat env/lib/python3.xx/speechbrain-xxx.dist-info/top_level.txt 
speechbrain
tests
```

### Environment Details

_No response_

### Relevant Log Output

_No response_

### Additional Context

This is probably due to the way packages are specified in the `setup.py`.

Does not seem like it would be linked to #2484 but it's worth investigating anyway.


Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -28,7 +28,9 @@
         "Programming Language :: Python :: 3",
         "License :: OSI Approved :: Apache Software License",
     ],
-    packages=setuptools.find_packages(),
+    # we don't want to ship the tests package. for future proofing, also
+    # exclude any tests subpackage (if we ever define __init__.py there)
+    packages=setuptools.find_packages(exclude=["tests", "tests.*"]),
     package_data={"speechbrain": ["version.txt", "log-config.yaml"]},
     install_requires=[
         "hyperpyyaml",


Test patch:
Repository: numpy/numpy

Issue:
Build with NPY_SEPARATE_COMPILATION=1 fails
Building with 

```
export NPY_SEPARATE_COMPILATION=1
python setup.py build
```

fails after recent changes (works still in 651ef74c4ebe7d):

```
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -g build/temp.linux-x86_64-2.7/numpy/core/src/umath/umathmodule.o build/temp.linux-x86_64-2.7/numpy/core/src/umath/reduction.o build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/numpy/core/src/umath/loops.o build/temp.linux-x86_64-2.7/numpy/core/src/umath/ufunc_object.o build/temp.linux-x86_64-2.7/numpy/core/src/umath/ufunc_type_resolution.o -Lbuild/temp.linux-x86_64-2.7 -lnpymath -lm -o build/lib.linux-x86_64-2.7/numpy/core/umath.so
build/temp.linux-x86_64-2.7/numpy/core/src/umath/reduction.o: In function `allocate_reduce_result':
/home/pauli/prj/scipy/numpy/numpy/core/src/umath/reduction.c:48: undefined reference to `PyArray_CreateSortedStridePerm'
/home/pauli/prj/scipy/numpy/numpy/core/src/umath/reduction.c:67: undefined reference to `PyArray_Type'
/usr/bin/ld.bfd.real: build/temp.linux-x86_64-2.7/numpy/core/src/umath/reduction.o: relocation R_X86_64_PC32 against undefined hidden symbol `PyArray_Type' can not be used when making a shared object
/usr/bin/ld.bfd.real: final link failed: Bad value
collect2: ld returned 1 exit status
build/temp.linux-x86_64-2.7/numpy/core/src/umath/reduction.o: In function `allocate_reduce_result':
/home/pauli/prj/scipy/numpy/numpy/core/src/umath/reduction.c:48: undefined reference to `PyArray_CreateSortedStridePerm'
/home/pauli/prj/scipy/numpy/numpy/core/src/umath/reduction.c:67: undefined reference to `PyArray_Type'
/usr/bin/ld.bfd.real: build/temp.linux-x86_64-2.7/numpy/core/src/umath/reduction.o: relocation R_X86_64_PC32 against undefined hidden symbol `PyArray_Type' can not be used when making a shared object
/usr/bin/ld.bfd.real: final link failed: Bad value
collect2: ld returned 1 exit status
```

Time to scrap the one-file build?



Discussion:
I'm +1 on making separate compilation the default, if I get a vote.

I would be ok making +1 the default iif we have a buildbot on unix for the one file build. Some platforms may not have the necessary features for the one file build, and it would be a shame to drop support just for this.

OTOH, I think supporting the one file mode should be quite easy if separate mode is the default than the opposite.


Resolving patch:
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -13,8 +13,8 @@
 
 # Set to True to enable multiple file compilations (experimental)
 try:
-    os.environ['NPY_SEPARATE_COMPILATION']
-    ENABLE_SEPARATE_COMPILATION = True
+    val = os.environ['NPY_SEPARATE_COMPILATION']
+    ENABLE_SEPARATE_COMPILATION = (val != "0")
 except KeyError:
     ENABLE_SEPARATE_COMPILATION = False
 


Test patch:
Repository: numpy/numpy

Issue:
cannot access masked array rows with np.object dtype (Trac #1839)
_Original ticket http://projects.scipy.org/numpy/ticket/1839 on 2011-05-24 by trac user risa2000, assigned to @pierregm._

Using masked array with np.object type makes the rows with that type, which also contain masked values raise an exception.

Slightly modified sample from documentation follows:

```
In [22]: from numpy import ma

In [23]: y = ma.masked_array([(1,'2'), (3, '4')], mask=[(0, 0), (0, 1)], dtype=[('a', int), ('b', np.object)])

In [24]: y[0]
Out[24]: (1, '2')

In [25]: y[1]
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)

f:\Work\python\apps\icao\icao_results.py in <module>()
----> 1
      2
      3
      4
      5

C:\Python27\lib\site-packages\numpy\ma\core.pyc in __getitem__(self, indx)
   2946 #                return mvoid(dout, mask=mask)

   2947                 if flatten_mask(mask).any():
-> 2948                     dout = mvoid(dout, mask=mask)
   2949                 else:
   2950                     return dout

C:\Python27\lib\site-packages\numpy\ma\core.pyc in __new__(self, data, mask, dtype, fill_value)
   5506         dtype = dtype or data.dtype
   5507         _data = ndarray((), dtype=dtype)
-> 5508         _data[()] = data
   5509         _data = _data.view(self)
   5510         if mask is not nomask:

ValueError: Setting void-array with object members using buffer.

In [26]: y
Out[26]:
masked_array(data = [(1, '2') (3, --)],
             mask = [(False, False) (False, True)],
       fill_value = (999999, '?'),
            dtype = [('a', '<i4'), ('b', '|O4')])
```



Discussion:

Resolving patch:
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -5509,8 +5509,7 @@ class mvoid(MaskedArray):
     #
     def __new__(self, data, mask=nomask, dtype=None, fill_value=None):
         dtype = dtype or data.dtype
-        _data = ndarray((), dtype=dtype)
-        _data[()] = data
+        _data = np.array(data, dtype=dtype)
         _data = _data.view(self)
         if mask is not nomask:
             if isinstance(mask, np.void):


Test patch:
diff --git a/numpy/ma/tests/test_mrecords.py b/numpy/ma/tests/test_mrecords.py
--- a/numpy/ma/tests/test_mrecords.py
+++ b/numpy/ma/tests/test_mrecords.py
@@ -502,6 +502,18 @@ def test_addfield(self):
         assert_equal(mrec.f3, d)
         assert_equal(mrec.f3._mask, m)
 
+
+def test_record_array_with_object_field():
+    """
+    Trac #1839
+    """
+    y = ma.masked_array(
+        [(1,'2'), (3, '4')],
+        mask=[(0, 0), (0, 1)],
+        dtype=[('a', int), ('b', np.object)])
+    x = y[1]
+
+
 ###############################################################################
 #------------------------------------------------------------------------------
 if __name__ == "__main__":
Repository: numpy/numpy

Issue:
distutils should support Debian multi-arch fully (Trac #2150)
_Original ticket http://projects.scipy.org/numpy/ticket/2150 on 2012-06-04 by @rgommers, assigned to @cournape._

See http://thread.gmane.org/gmane.comp.python.numeric.general/49957

Patch is available in link [2] of the first message of the linked thread.



Discussion:
_trac user ocertik wrote on 2012-08-31_

Clarification is needed for this ticket (what exactly has to be done). See my email:

http://article.gmane.org/gmane.comp.python.numeric.general/51373

_@rgommers wrote on 2012-09-07_

Answered on the thread linked above.


Resolving patch:
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
--- a/numpy/distutils/system_info.py
+++ b/numpy/distutils/system_info.py
@@ -214,6 +214,19 @@ def libpaths(paths, bits):
             default_x11_include_dirs.extend(['/usr/lib/X11/include',
                                              '/usr/include/X11'])
 
+    import subprocess as sp
+    try:
+        p = sp.Popen(["gcc", "-print-multiarch"], stdout=sp.PIPE,
+                stderr=open(os.devnull, 'w'))
+    except OSError:
+        pass # gcc is not installed
+    else:
+        triplet = str(p.communicate()[0].decode().strip())
+        if p.returncode == 0:
+            # gcc supports the "-print-multiarch" option
+            default_x11_lib_dirs += [os.path.join("/usr/lib/", triplet)]
+            default_lib_dirs += [os.path.join("/usr/lib/", triplet)]
+
 if os.path.join(sys.prefix, 'lib') not in default_lib_dirs:
     default_lib_dirs.insert(0, os.path.join(sys.prefix, 'lib'))
     default_include_dirs.append(os.path.join(sys.prefix, 'include'))


Test patch:
Repository: numpy/numpy

Issue:
2to3 run `execfile` fixer



Discussion:

Resolving patch:
diff --git a/setupegg.py b/setupegg.py
--- a/setupegg.py
+++ b/setupegg.py
@@ -21,4 +21,4 @@
     setupfile = imp.load_source('setupfile', 'setup.py')
     setupfile.setup_package()
 else:
-    execfile('setup.py')
+    exec(compile(open('setup.py').read(), 'setup.py', 'exec'))


Test patch:
Repository: numpy/numpy

Issue:
2to3 run `sys_exc` fixer



Discussion:

Resolving patch:
diff --git a/numpy/distutils/cpuinfo.py b/numpy/distutils/cpuinfo.py
--- a/numpy/distutils/cpuinfo.py
+++ b/numpy/distutils/cpuinfo.py
@@ -516,7 +516,7 @@ def __init__(self):
                                     info[-1]["Model"]=int(srch.group("MDL"))
                                     info[-1]["Stepping"]=int(srch.group("STP"))
         except:
-            print(sys.exc_value,'(ignoring)')
+            print(sys.exc_info()[1],'(ignoring)')
         self.__class__.info = info
 
     def _not_impl(self): pass
diff --git a/numpy/f2py/diagnose.py b/numpy/f2py/diagnose.py
--- a/numpy/f2py/diagnose.py
+++ b/numpy/f2py/diagnose.py
@@ -29,14 +29,14 @@ def run():
         import numpy
         has_newnumpy = 1
     except ImportError:
-        print 'Failed to import new numpy:', sys.exc_value
+        print 'Failed to import new numpy:', sys.exc_info()[1]
         has_newnumpy = 0
 
     try:
         from numpy.f2py import f2py2e
         has_f2py2e = 1
     except ImportError:
-        print 'Failed to import f2py2e:',sys.exc_value
+        print 'Failed to import f2py2e:',sys.exc_info()[1]
         has_f2py2e = 0
 
     try:
@@ -47,7 +47,7 @@ def run():
             import numpy_distutils
             has_numpy_distutils = 1
         except ImportError:
-            print 'Failed to import numpy_distutils:',sys.exc_value
+            print 'Failed to import numpy_distutils:',sys.exc_info()[1]
             has_numpy_distutils = 0
 
     if has_newnumpy:


Test patch:
Repository: numpy/numpy

Issue:
Disable unused 2to3 fixers
After applying 2to3 fixers permanently to the source, we should disable them from running during install, so that the need for them doesn't creep back in. IPython's setup.py has an example: https://github.com/ipython/ipython/blob/master/setup.py#L268



Discussion:
We have a bit hackier approach to it currently... https://github.com/numpy/numpy/blob/master/tools/py3tool.py#L202

Agree, I was just thinking about that.


Resolving patch:
diff --git a/tools/py3tool.py b/tools/py3tool.py
--- a/tools/py3tool.py
+++ b/tools/py3tool.py
@@ -55,6 +55,36 @@
     'numpy/oldnumeric/ma.py': '-x reduce',
 }
 
+# Names of fixers to skip when running 2to3
+FIXES_TO_SKIP = [
+    'tuple_params',
+    'throw',
+    'sys_exc',
+    'standarderror',
+    'reduce',
+    'raise',
+    'paren',
+    'operator',
+    'ne',
+    'methodattrs',
+    'metaclass',
+    'intern',
+    'has_key',
+    'getcwdu',
+    'filter',
+    'exitfunc',
+    'execfile',
+    'exec',
+    'callable',
+    'apply'
+]
+
+skip_fixes= []
+for _t in FIXES_TO_SKIP:
+    skip_fixes.append('-x')
+    skip_fixes.append(_t)
+
+
 def main():
     p = OptionParser(usage=__doc__.strip())
     p.add_option("--clean", "-c", action="store_true",
@@ -270,7 +300,12 @@ def sync_2to3(src, dst, patchfile=None, clean=False):
         _old_stdout = sys.stdout
         try:
             sys.stdout = StringIO()
-            lib2to3.main.main("lib2to3.fixes", ['-w', '-n'] + flags.split()+filenames)
+            opt = []
+            opt.extend(['-w', '-n'])
+            opt.extend(skip_fixes)
+            opt.extend(flags.split())
+            opt.extend(filenames)
+            lib2to3.main.main("lib2to3.fixes", opt)
         finally:
             sys.stdout = _old_stdout
 


Test patch:
Repository: numpy/numpy

Issue:
Backport gh-365
Please backport gh-365 to the 1.7.x branch.  It's a one-liner and trivially correct.



Discussion:

Resolving patch:
diff --git a/numpy/f2py/cfuncs.py b/numpy/f2py/cfuncs.py
--- a/numpy/f2py/cfuncs.py
+++ b/numpy/f2py/cfuncs.py
@@ -260,7 +260,7 @@
 """
 needs['f2py_size']=['stdarg.h']
 cfuncs['f2py_size']="""\
-int f2py_size(PyArrayObject* var, ...)
+static int f2py_size(PyArrayObject* var, ...)
 {
   npy_int sz = 0;
   npy_int dim;


Test patch:
Repository: numpy/numpy

Issue:
Typo fix in FFT docs
This commit fixes a typo in the numpy.fft docs [1], where an index in the formula for the inverse DFT was wrong (should be 'm' instead of 'n').

[1] http://docs.scipy.org/doc/numpy/reference/routines.fft.html



Discussion:

Resolving patch:
diff --git a/numpy/fft/info.py b/numpy/fft/info.py
--- a/numpy/fft/info.py
+++ b/numpy/fft/info.py
@@ -112,7 +112,7 @@
 
 .. math::
    a_m = \\frac{1}{n}\\sum_{k=0}^{n-1}A_k\\exp\\left\\{2\\pi i{mk\\over n}\\right\\}
-   \\qquad n = 0,\\ldots,n-1.
+   \\qquad m = 0,\\ldots,n-1.
 
 It differs from the forward transform by the sign of the exponential
 argument and the normalization by :math:`1/n`.


Test patch:
Repository: numpy/numpy

Issue:
OSError dropped silently in ctypeslib loadlibrary for defective .so
When calling
   numpy.ctypeslib.load_library('mylib', '.')
load_library looks for both mylib.so and mylib.pyd files. If mylib.so exists but raises an OSError, and mylib.pyd does not exist the returned error is:

OSError: mylib.pyd: cannot open shared object file: No such file or directory

when it should be (for example):

OSError: mylib.so: undefined symbol: QJacobianN_

See e.g.: http://www.jmodelica.org/4688#comment-2154



Discussion:

Resolving patch:
diff --git a/numpy/ctypeslib.py b/numpy/ctypeslib.py
--- a/numpy/ctypeslib.py
+++ b/numpy/ctypeslib.py
@@ -122,15 +122,16 @@ def load_library(libname, loader_path):
         else:
             libdir = loader_path
 
-        # Need to save exception when using Python 3k, see PEP 3110.
-        exc = None
         for ln in libname_ext:
-            try:
-                libpath = os.path.join(libdir, ln)
-                return ctypes.cdll[libpath]
-            except OSError as e:
-                exc = e
-        raise exc
+            libpath = os.path.join(libdir, ln)
+            if os.path.exists(libpath):
+                try:
+                    return ctypes.cdll[libpath]
+                except OSError:
+                    ## defective lib file
+                    raise
+        ## if no successful return in the libname_ext loop:
+        raise OSError("no file with expected extension")
 
     ctypes_load_library = deprecate(load_library, 'ctypes_load_library',
                                     'load_library')


Test patch:
Repository: numpy/numpy

Issue:
2to3 run `imports2` fixer



Discussion:

Resolving patch:
diff --git a/tools/py3tool.py b/tools/py3tool.py
--- a/tools/py3tool.py
+++ b/tools/py3tool.py
@@ -78,7 +78,8 @@
     'xreadlines',
     'xrange',
     'import',
-    'imports'
+    'imports',
+    'imports2',
 ]
 
 skip_fixes= []


Test patch:
Repository: numpy/numpy

Issue:
2to3: run `buffer` fixer



Discussion:
In python 3 `buffer` is replaced with `memoryview`. While `memoryview` has been backported to 2.7, it is absent from 2.6. We probably need some sort of compatibility function. Note that there only a couple of places where `buffer` is used, we could maybe find a workaround.

Suggested fix

```
>>> import sys
>>> if sys.version > '3':
...     buffer = memoryview
>>> b = buffer('yay!'.encode())
>>> len(b)
```

It also seems `buffer` is still supported in python 3, but that may change.


Resolving patch:
diff --git a/tools/py3tool.py b/tools/py3tool.py
--- a/tools/py3tool.py
+++ b/tools/py3tool.py
@@ -47,7 +47,7 @@
 FIXES_TO_SKIP = [
     'apply',
 #    'basestring',
-#    'buffer',
+    'buffer',
     'callable',
     'dict',
     'exec',


Test patch:
Repository: numpy/numpy

Issue:
2to3 run `funcattrs` fixer



Discussion:

Resolving patch:
diff --git a/tools/py3tool.py b/tools/py3tool.py
--- a/tools/py3tool.py
+++ b/tools/py3tool.py
@@ -54,7 +54,7 @@
     'execfile',
     'exitfunc',
     'filter',
-#    'funcattrs',
+    'funcattrs',
     'future',
     'getcwdu',
     'has_key',


Test patch:
Repository: numpy/numpy

Issue:
2to3 run `itertools_imports` fixer



Discussion:

Resolving patch:
diff --git a/tools/py3tool.py b/tools/py3tool.py
--- a/tools/py3tool.py
+++ b/tools/py3tool.py
@@ -66,7 +66,7 @@
     'intern',
 #    'isinstance',
 #    'itertools',
-#    'itertools_imports',
+    'itertools_imports',
 #    'long',
     'map',
     'metaclass',


Test patch: