Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-43244: Remove pyarena.h header #25007

Merged
merged 1 commit into from
Mar 24, 2021
Merged

bpo-43244: Remove pyarena.h header #25007

merged 1 commit into from
Mar 24, 2021

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Mar 24, 2021

Remove the pyarena.h header file with functions:

  • PyArena_New()
  • PyArena_Free()
  • PyArena_Malloc()
  • PyArena_AddPyObject()

These functions were undocumented, excluded from the limited C API,
and were only used internally by the compiler.

Add pycore_pyarena.h header. Rename functions:

  • PyArena_New() => _PyArena_New()
  • PyArena_Free() => _PyArena_Free()
  • PyArena_Malloc() => _PyArena_Malloc()
  • PyArena_AddPyObject() => _PyArena_AddPyObject()

https://bugs.python.org/issue43244

Remove the pyarena.h header file with functions:

* PyArena_New()
* PyArena_Free()
* PyArena_Malloc()
* PyArena_AddPyObject()

These functions were undocumented, excluded from the limited C API,
and were only used internally by the compiler.

Add pycore_pyarena.h header. Rename functions:

* PyArena_New() => _PyArena_New()
* PyArena_Free() => _PyArena_Free()
* PyArena_Malloc() => _PyArena_Malloc()
* PyArena_AddPyObject() => _PyArena_AddPyObject()
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 RHEL7 LTO 3.x has failed when building commit 8370e07.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/507/builds/880) and take a look at the build logs.
  4. Check if the failure is related to this commit (8370e07) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/507/builds/880

Failed tests:

  • test_asyncio

Summary of the results of the build (if available):

==

Click to see traceback logs
Reset branch 'master'

Python/ceval.c: In function ‘PyEval_EvalCodeEx’:
Python/ceval.c:5206:19: warning: ‘newargs’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         PyMem_Free(newargs);
                   ^
/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/./setup.py:33: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils import log
/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Modules/socketmodule.c: In function ‘sock_connect’:
/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Modules/socketmodule.c:3209:18: warning: ‘addrlen’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     res = connect(s->sock_fd, addr, addrlen);
                  ^
/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Modules/socketmodule.c:3274:9: note: ‘addrlen’ was declared here
     int addrlen;
         ^
/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Modules/socketmodule.c: In function ‘sock_bind’:
/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Modules/socketmodule.c:3116:15: warning: ‘addrlen’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     res = bind(s->sock_fd, SAS2SA(&addrbuf), addrlen);
               ^

/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/./setup.py:33: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils import log

/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/./setup.py:33: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils import log
test_flock (__main__.FNTLEINTRTest) ... ok
test_lockf (__main__.FNTLEINTRTest) ... ok
test_read (__main__.OSEINTRTest) ... ok
test_wait (__main__.OSEINTRTest) ... ok
test_wait3 (__main__.OSEINTRTest) ... ok
test_wait4 (__main__.OSEINTRTest) ... ok
test_waitpid (__main__.OSEINTRTest) ... ok
test_write (__main__.OSEINTRTest) ... ok
test_devpoll (__main__.SelectEINTRTest) ... skipped 'need select.devpoll'
test_epoll (__main__.SelectEINTRTest) ... ok
test_kqueue (__main__.SelectEINTRTest) ... skipped 'need select.kqueue'
test_poll (__main__.SelectEINTRTest) ... ok
test_select (__main__.SelectEINTRTest) ... ok
test_sigtimedwait (__main__.SignalEINTRTest) ... ok
test_sigwaitinfo (__main__.SignalEINTRTest) ... ok
test_accept (__main__.SocketEINTRTest) ... ok
test_open (__main__.SocketEINTRTest) ... ok
test_os_open (__main__.SocketEINTRTest) ... ok
test_recv (__main__.SocketEINTRTest) ... ok
test_recvmsg (__main__.SocketEINTRTest) ... ok
test_send (__main__.SocketEINTRTest) ... ok
test_sendall (__main__.SocketEINTRTest) ... ok
test_sendmsg (__main__.SocketEINTRTest) ... ok
test_sleep (__main__.TimeEINTRTest) ... ok

----------------------------------------------------------------------
Ran 24 tests in 7.434s

OK (skipped=2)
test_zipfile64 skipped -- test requires loads of disk-space bytes and a long time to run
test_kqueue skipped -- test works only on BSD
test_gdb skipped -- Couldn't find gdb on the path
test_badargs (__main__.GeneralTest) ... ok
test_bound_methods (__main__.GeneralTest) ... ok
test_clear (__main__.GeneralTest) ... ok
test_exit (__main__.GeneralTest) ... ok
test_order (__main__.GeneralTest) ... ok
test_raise (__main__.GeneralTest) ... ok
test_raise_unnormalized (__main__.GeneralTest) ... ok
test_stress (__main__.GeneralTest) ... ok
test_unregister (__main__.GeneralTest) ... ok

----------------------------------------------------------------------
Ran 9 tests in 0.002s

OK
test_ioctl skipped -- Unable to open /dev/tty
test_tix skipped -- Tk unavailable due to TclError: no display name and no $DISPLAY environment variab [...]
test_devpoll skipped -- test works only on Solaris OS family
test_winreg skipped -- No module named 'winreg'
test_tk skipped -- Tk unavailable due to TclError: no display name and no $DISPLAY environment variab [...]
test_ossaudiodev skipped -- [Errno 2] No such file or directory: '/dev/dsp'
test_startfile skipped -- object <module 'os' from '/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/os.py'> has no attribute 'startfile'
test_winconsoleio skipped -- test only relevant on win32
/tmp/tmpyz8zk_0n.py:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.util import byte_compile
/tmp/tmpj73zd2v1.py:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.util import byte_compile
test_winsound skipped -- No module named 'winsound'
test_msilib skipped -- No module named '_msi'
test_ttk_guionly skipped -- Tk unavailable due to TclError: no display name and no $DISPLAY environment variab [...]
Timeout (0:15:00)!
Thread 0x00007f0744243740 (most recent call first):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/selectors.py", line 469 in select
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/asyncio/base_events.py", line 1845 in _run_once
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/asyncio/base_events.py", line 595 in run_forever
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/asyncio/base_events.py", line 628 in run_until_complete
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_asyncio/test_subprocess.py", line 442 in test_cancel_make_subprocess_transport_exec
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/case.py", line 549 in _callTestMethod
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/case.py", line 592 in run
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/case.py", line 652 in __call__
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/runner.py", line 176 in run
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/support/__init__.py", line 959 in _run_suite
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/support/__init__.py", line 1082 in run_unittest
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/libregrtest/runtest.py", line 210 in _test_module
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/libregrtest/runtest.py", line 246 in _runtest_inner2
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/libregrtest/runtest.py", line 282 in _runtest_inner
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/libregrtest/runtest.py", line 141 in _runtest
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/libregrtest/runtest.py", line 194 in runtest
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/libregrtest/runtest_mp.py", line 81 in run_tests_worker
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/libregrtest/main.py", line 661 in _main
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/libregrtest/main.py", line 641 in main
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/libregrtest/main.py", line 719 in main
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/regrtest.py", line 43 in _main
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/regrtest.py", line 47 in <module>
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/runpy.py", line 86 in _run_code
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/runpy.py", line 196 in _run_module_as_main
Timeout (0:15:00)!
Thread 0x00007fade7520740 (most recent call first):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/selectors.py", line 469 in select
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/asyncio/base_events.py", line 1845 in _run_once
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/asyncio/base_events.py", line 595 in run_forever
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/asyncio/base_events.py", line 628 in run_until_complete
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_asyncio/test_subprocess.py", line 442 in test_cancel_make_subprocess_transport_exec
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/case.py", line 549 in _callTestMethod
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/case.py", line 592 in run
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/case.py", line 652 in __call__
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/unittest/runner.py", line 176 in run
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/support/__init__.py", line 959 in _run_suite
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/support/__init__.py", line 1082 in run_unittest
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/libregrtest/runtest.py", line 210 in _test_module
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/libregrtest/runtest.py", line 246 in _runtest_inner2
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/libregrtest/runtest.py", line 282 in _runtest_inner
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/libregrtest/runtest.py", line 154 in _runtest
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/libregrtest/runtest.py", line 194 in runtest
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/libregrtest/main.py", line 321 in rerun_failed_tests
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/libregrtest/main.py", line 698 in _main
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/libregrtest/main.py", line 641 in main
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/libregrtest/main.py", line 719 in main
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/__main__.py", line 2 in <module>
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/runpy.py", line 86 in _run_code
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/runpy.py", line 196 in _run_module_as_main
make: *** [buildbottest] Error 1

Cannot open file '/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/test-results.xml' for upload

freundTech added a commit to freundTech/typed_ast that referenced this pull request Apr 6, 2021
PyArena was removed from the public api in python/cpython#25007
This commit adds two new files:
* pycore_pyarena.h: Taken from the cpython source code with minimal
  changes
* pyarena.h: Maps the new, underscored function named to the old
  function names.
freundTech added a commit to freundTech/typed_ast that referenced this pull request Apr 6, 2021
PyArena was removed from the public api in python/cpython#25007
This commit adds two new files:
* pycore_pyarena.h: Taken from the cpython source code with minimal
  changes
* pyarena.h: Maps the new, underscored function named to the old
  function names.
freundTech added a commit to freundTech/typed_ast that referenced this pull request Apr 6, 2021
PyArena was removed from the public api in python/cpython#25007
This commit adds two new files:
* pycore_pyarena.h: Taken from the cpython source code with minimal
  changes
* pyarena.h: Maps the new, underscored function names to the old
  function names.
freundTech added a commit to freundTech/typed_ast that referenced this pull request Apr 6, 2021
PyArena was removed from the public api in python/cpython#25007
This commit adds two new files:
* pycore_pyarena.h: Taken from the cpython source code with minimal
  changes
* pyarena.h: Maps the new, underscored function names to the old
  function names, allowing the code to work on both python 3.10 and
  older versions
gvanrossum pushed a commit to python/typed_ast that referenced this pull request Apr 6, 2021
PyArena was removed from the public api in python/cpython#25007
This commit adds two new files (a copy of each for ast27 and ast3):
* pycore_pyarena.h: Taken from the cpython source code with minimal
  changes
* pyarena.h: Maps the new, underscored function names to the old
  function names, allowing the code to work on both python 3.10 and
  older versions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants