Hi

I noticed that with version 23.3.x Mesa no longer can be built with python
2.6. It still worked with Mesa 23.2.1.

It fails with

[   95s] Traceback (most recent call last):
[   95s]   File "../src/intel/genxml/gen_bits_header.py", line 23, in <module>
[   95s]     import intel_genxml
[   95s]   File "/home/abuild/rpmbuild/BUILD/mesa-23.3.3/src/intel/genxml/intel_
genxml.py", line 5
[   95s]     from __future__ import annotations
[   95s]     ^
[   95s] SyntaxError: future feature annotations is not defined

When removing __future__ line like this

--- mesa-23.3.3/src/intel/genxml/intel_genxml.py.orig   2024-01-12 
10:26:26.314070540 +0100
+++ mesa-23.3.3/src/intel/genxml/intel_genxml.py        2024-01-12 
10:26:38.682317490 +0100
@@ -2,7 +2,6 @@
 # Copyright © 2019, 2022 Intel Corporation
 # SPDX-License-Identifier: MIT
 
-from __future__ import annotations
 from collections import OrderedDict
 import copy
 import io

this results in the following failure.

[  113s] Traceback (most recent call last):
[  113s]   File "../src/intel/genxml/gen_bits_header.py", line 23, in <module>
[  113s]     import intel_genxml
[  113s]   File "/home/abuild/rpmbuild/BUILD/mesa-23.3.3/src/intel/genxml/intel_
genxml.py", line 51, in <module>
[  113s]     def add_struct_refs(items: typing.OrderedDict[str, bool], node: et.
Element) -> None:
[  113s] AttributeError: module 'typing' has no attribute 'OrderedDict'

I'm wondering if Mesa developers are interested in still supporting python
3.6?

Unfortunately currently it's not an option for SUSE's enterprise product to
update to a newer python (would be probably 3.12) (due to many customers still
relying on python 3.6 and we lack the ressources of adding and maintaining a
(full!) second python development stack). :-(

If the answer to the question above is a no. :-( How hard would it be to
adjust the code to python 3.6? Any suggestions to how it could be done? Or is
there any other workaround available?

I had a quick look between 23.2.1 and 23.3.3 and I've seen that

  from __future__ import annotations

and

  typing.OrderedDict

have already been used in 23.2.1 (although it was in gen_sort_tags.py and
now has been moved to new intel_genxml.py). So not sure why this fails now
or was working before ...

Any help here would be appreciated. SUSE is definitely interested in shipping
the latest Mesa with our latest enterprise product.

Thanks,
Stefan

Public Key available
------------------------------------------------------
Stefan Dirsch (Res. & Dev.)   SUSE Software Solutions Germany GmbH
Tel: 0911-740 53 0            Frankenstraße 146
FAX: 0911-740 53 479          D-90461 Nürnberg
http://www.suse.de            Germany 
----------------------------------------------------------------
Geschäftsführer: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
(HRB 36809, AG Nürnberg)
----------------------------------------------------------------

Reply via email to