Summary: | AttributeError: 'tuple' object has no attribute 'major' | ||
---|---|---|---|
Product: | Mesa | Reporter: | Vinson Lee <vlee> |
Component: | Mesa core | Assignee: | mesa-dev |
Status: | RESOLVED WONTFIX | QA Contact: | mesa-dev |
Severity: | normal | ||
Priority: | medium | CC: | baker.dylan.c, bochecha, tomeu |
Version: | git | Keywords: | bisected, regression |
Hardware: | x86-64 (AMD64) | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Vinson Lee
2018-08-14 07:11:40 UTC
Workaround: diff --git a/src/util/xmlpool/gen_xmlpool.py b/src/util/xmlpool/gen_xmlpool.py index 327709c7f8dd..0d97fbcfcf3f 100644 --- a/src/util/xmlpool/gen_xmlpool.py +++ b/src/util/xmlpool/gen_xmlpool.py @@ -140,8 +142,8 @@ def expandMatches (matches, translations, end=None): # In Python 2, stdout expects encoded byte strings, or else it will # encode them with the ascii 'codec' - if sys.version_info.major == 2: - text = text.encode('utf-8') + #if sys.version_info.major == 2: + text = text.encode('utf-8') print(text) (In reply to Tomeu Vizoso from comment #1) > Workaround: > > diff --git a/src/util/xmlpool/gen_xmlpool.py > b/src/util/xmlpool/gen_xmlpool.py > index 327709c7f8dd..0d97fbcfcf3f 100644 > --- a/src/util/xmlpool/gen_xmlpool.py > +++ b/src/util/xmlpool/gen_xmlpool.py > @@ -140,8 +142,8 @@ def expandMatches (matches, translations, end=None): > > # In Python 2, stdout expects encoded byte strings, or else it will > # encode them with the ascii 'codec' > - if sys.version_info.major == 2: > - text = text.encode('utf-8') > + #if sys.version_info.major == 2: > + text = text.encode('utf-8') > > print(text) Not really, it's better to just revert "2ee1c86d71be meson: Build with Python 3" Python 2.6 went EOL in 2013, and we have required python 2.7 since 2015, the fact that python 2.6 continued to work is just happenstance. We need to support python 3.x for the future, python 2 will reach EOL in 2 years, and distros are starting to look to a python 3 by default future. We will continue to support python 2.7 as long as the autotools build remains and as long as the scons build remains (unless someone ports it to 2.7), but python 2.6 is not supported. Please install or update to python 2.7 for scons and autotools builds. |
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.