Bug 1788892

Summary: python3-typed_ast fails to build with Python 3.9
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python3-typed_astAssignee: Miro Hrončok <mhroncok>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, gwync, mhroncok, philip.wyett
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-08 10:29:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1785415    

Description Miro Hrončok 2020-01-08 10:18:12 UTC
python3-typed_ast fails to build with Python 3.9.0a2.

gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -Iast3/Include -I/usr/include/python3.9 -c ast3/Python/ast.c -o build/temp.linux-x86_64-3.9/ast3/Python/ast.o
ast3/Python/ast.c: In function ‘decode_bytes_with_escapes’:
ast3/Python/ast.c:4534:24: error: too many arguments to function ‘_PyBytes_DecodeEscape’
 4534 |     PyObject *result = _PyBytes_DecodeEscape(s, len, NULL, 0, NULL,
      |                        ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/python3.9/Python.h:96,
                 from ast3/Python/ast.c:6:
/usr/include/python3.9/bytesobject.h:79:24: note: declared here
   79 | PyAPI_FUNC(PyObject *) _PyBytes_DecodeEscape(const char *, Py_ssize_t,
      |                        ^~~~~~~~~~~~~~~~~~~~~
error: command 'gcc' failed with exit status 1

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01141013-python3-typed_ast/

For all our attempts to build python3-typed_ast with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/python3-typed_ast/

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.9:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33, but the initial bootstrapping has already started.
A build failure this early in the bootstrap sequence blocks us very much.

Comment 1 Miro Hrončok 2020-01-08 10:18:52 UTC
Fixed upstream in https://github.com/python/typed_ast/pull/128

Comment 2 Miro Hrončok 2020-01-08 10:29:23 UTC
Verified it builds with the patch on 3.8 s well as 3.9. Pushed.