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

gh-105107: Remove PyEval_CallFunction() function #105108

Merged
merged 3 commits into from
May 31, 2023

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented May 30, 2023

Remove 4 functions from the C API, deprecated in Python 3.9:

  • PyEval_CallObjectWithKeywords()
  • PyEval_CallObject()
  • PyEval_CallFunction()
  • PyEval_CallMethod()

Keep 3 functions in the stable ABI:

  • PyEval_CallObjectWithKeywords()
  • PyEval_CallFunction()
  • PyEval_CallMethod()

📚 Documentation preview 📚: https://cpython-previews--105108.org.readthedocs.build/

@vstinner
Copy link
Member Author

cc @methane

@vstinner
Copy link
Member Author

The "Tests / Check for source changes (pull_request)" CI job failed because the added NEWS entry filename contains a space in C API/ sub-directory name.

@hugovk
Copy link
Member

hugovk commented May 30, 2023

I've merged #105110 to workaround the CI error, let's update this branch.

Remove 4 functions from the C API, deprecated in Python 3.9:

* PyEval_CallObjectWithKeywords()
* PyEval_CallObject()
* PyEval_CallFunction()
* PyEval_CallMethod()

Keep 3 functions in the stable ABI:

* PyEval_CallObjectWithKeywords()
* PyEval_CallFunction()
* PyEval_CallMethod()
@vstinner vstinner force-pushed the remove_pyeval_call branch from 69669e4 to a394bbc Compare May 31, 2023 10:40
@vstinner
Copy link
Member Author

I completed the documentation how to port existing code after reading comments of the long issue #73734.

@vstinner
Copy link
Member Author

I've merged #105110 to workaround the CI error, let's update this branch.

Thanks. To complete the doc, I rebased my PR on the main branch.

@vstinner vstinner enabled auto-merge (squash) May 31, 2023 11:16
@vstinner vstinner merged commit 579c41c into python:main May 31, 2023
@vstinner vstinner deleted the remove_pyeval_call branch May 31, 2023 11:18
@vstinner
Copy link
Member Author

Thanks for the review @methane.

@bedevere-bot
Copy link

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

Hi! The buildbot ARM Raspbian 3.x has failed when building commit 579c41c.

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/424/builds/4108) and take a look at the build logs.
  4. Check if the failure is related to this commit (579c41c) 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/424/builds/4108

Failed tests:

  • test_sqlite3

Failed subtests:

  • test_interact_on_disk_file - test.test_sqlite3.test_cli.InteractiveSession.test_interact_on_disk_file

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

== Tests result: FAILURE then ENV CHANGED ==

427 tests OK.

10 slowest tests:

  • test_venv: 10 min 28 sec
  • test_tarfile: 9 min 43 sec
  • test_largefile: 8 min 17 sec
  • test_cmd_line_script: 5 min 29 sec
  • test_math: 4 min 22 sec
  • test_multiprocessing_spawn: 4 min 14 sec
  • test_sqlite3: 3 min 30 sec
  • test_exceptions: 3 min 23 sec
  • test_concurrent_futures: 3 min 7 sec
  • test_hashlib: 2 min 12 sec

1 test altered the execution environment:
test_concurrent_futures

19 tests skipped:
test.test_asyncio.test_windows_events
test.test_asyncio.test_windows_utils test_devpoll test_idle
test_ioctl test_kqueue test_launcher test_perf_profiler
test_startfile test_tcl test_tkinter test_ttk test_ttk_textonly
test_turtle test_winconsoleio test_winreg test_winsound test_wmi
test_zipfile64

1 re-run test:
test_sqlite3

Total duration: 41 min 25 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/var/lib/buildbot/workers/3.x.gps-raspbian.nondebug/build/Lib/test/test_sqlite3/test_cli.py", line 142, in test_interact_on_disk_file
    out, err = proc.communicate(input="create table t(t);",
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/buildbot/workers/3.x.gps-raspbian.nondebug/build/Lib/subprocess.py", line 1209, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/buildbot/workers/3.x.gps-raspbian.nondebug/build/Lib/subprocess.py", line 2109, in _communicate
    self._check_timeout(endtime, orig_timeout, stdout, stderr)
  File "/var/lib/buildbot/workers/3.x.gps-raspbian.nondebug/build/Lib/subprocess.py", line 1253, in _check_timeout
    raise TimeoutExpired(
subprocess.TimeoutExpired: Command '['/var/lib/buildbot/workers/3.x.gps-raspbian.nondebug/build/python', '-Xutf8', '-m', 'sqlite3', '@test_21594_tmpæ']' timed out after 5.25 seconds

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.

4 participants