Bug 107564 - AttributeError: 'module' object has no attribute 'combinations_with_replacement'
Summary: AttributeError: 'module' object has no attribute 'combinations_with_replacement'
Status: RESOLVED WONTFIX
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords: bisected, regression
Depends on:
Blocks:
 
Reported: 2018-08-14 06:54 UTC by Vinson Lee
Modified: 2018-08-14 15:49 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

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.