Bug 107564

Summary: AttributeError: 'module' object has no attribute 'combinations_with_replacement'
Product: Mesa Reporter: Vinson Lee <vlee>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED WONTFIX QA Contact: mesa-dev
Severity: normal    
Priority: medium CC: baker.dylan.c, bochecha
Version: gitKeywords: bisected, regression
Hardware: x86-64 (AMD64)   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Vinson Lee 2018-08-14 06:54:56 UTC
Build error with Python 2.6.

  GEN    nir/nir_opt_algebraic.c
Traceback (most recent call last):
  File "./nir/nir_opt_algebraic.py", line 726, in <module>
    for left, right in itertools.combinations_with_replacement(invert.keys(), 2):
AttributeError: 'module' object has no attribute 'combinations_with_replacement'


commit d9ca4a172e8e8a42217588ca1b83a7ceb5bf3f76
Author: Mathieu Bridon <bochecha@daitauha.fr>
Date:   Thu Aug 9 10:27:19 2018 +0200

    python: Use the right function for the job
    
    The code was just reimplementing itertools.combinations_with_replacement
    in a less efficient way.
    
    This does change the order of the results slightly, but it should be ok.
    
    Signed-off-by: Mathieu Bridon <bochecha@daitauha.fr>
    Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Comment 1 Dylan Baker 2018-08-14 15:49:32 UTC
Python 2.6 is unsupported and has been for some time. The EOL was in 2013. We will continue to support python 2.7 for the forseeable future, please update to 2.7.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.