Fedora Account System
Red Hat Associate
Red Hat Customer
python-gast fails to build with Python 3.15.0b1. There's 34 similar, but not the same test failures regarding different ast objects: _____________________ UnparserTestCase.test_TypeParameter ______________________ self = <tests.test_unparser.UnparserTestCase testMethod=test_TypeParameter> def test_TypeParameter(self): > self.assertUnparse('type x[T] = list[T]') tests/test_unparser.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_unparser.py:17: in assertUnparse compile(gast.gast_to_ast(tree), '<test>', 'exec') ^^^^^^^^^^^^^^^^^^^^^^ gast/ast3.py:514: in gast_to_ast return GAstToAst3().visit(node) ^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/ast.py:542: in visit return visitor(node) ^^^^^^^^^^^^^ gast/astn.py:26: in generic_visit setattr(new_node, field, self._visit(getattr(node, field))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ gast/astn.py:13: in _visit return [self._visit(n) for n in node] ^^^^^^^^^^^^^^ gast/astn.py:11: in _visit return self.visit(node) ^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/ast.py:542: in visit return visitor(node) ^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <gast.ast3.GAstToAst3 object at 0x7fab844eba70> node = TypeAlias(name=Name(id='x', ctx=Store(), annotation=None, type_comment=None), type_params=[TypeVar(name='T', bound=Non...nnotation=None, type_comment=None), slice=Name(id='T', ctx=Load(...), annotation=None, type_comment=None), ctx=Load())) def generic_visit(self, node): cls = type(node).__name__ try: > new_node = getattr(to, cls)() ^^^^^^^^^^^^^^^^^^ E TypeError: ast.TypeAlias.__init__ missing 2 required positional arguments: 'name' and 'value' https://docs.python.org/3.15/whatsnew/3.15.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.15-b1/fedora-rawhide-x86_64/10477937-python-gast/ For all our attempts to build python-gast with Python 3.15, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.15-b1/package/python-gast/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.15: https://copr.fedorainfracloud.org/coprs/g/python/python3.15-b1/ Let us know here if you have any questions. Python 3.15 is planned to be included in Fedora 45. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
PR: https://src.fedoraproject.org/rpms/python-gast/pull-request/9#