Repository navigation
Closed
Labels
3.8 (EOL)end of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement
Description
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = <Date 2019-07-05.14:03:23.218>
created_at = <Date 2019-05-20.18:01:27.116>
labels = ['interpreter-core', 'type-feature', '3.8']
title = 'Implement PEP 590'
updated_at = <Date 2020-01-16.13:47:47.654>
user = 'https://github.com/jdemeyer'bugs.python.org fields:
activity = <Date 2020-01-16.13:47:47.654>
actor = 'vstinner'
assignee = 'none'
closed = True
closed_date = <Date 2019-07-05.14:03:23.218>
closer = 'petr.viktorin'
components = ['Interpreter Core']
creation = <Date 2019-05-20.18:01:27.116>
creator = 'jdemeyer'
dependencies = []
files = []
hgrepos = []
issue_num = 36974
keywords = ['patch']
message_count = 28.0
messages = ['343908', '343922', '343929', '343930', '343932', '343934', '343935', '343967', '343968', '343975', '344016', '344077', '344328', '344333', '344339', '344340', '346366', '346492', '347338', '347340', '347347', '348327', '348804', '349046', '349469', '356453', '359507', '360121']
nosy_count = 8.0
nosy_names = ['vstinner', 'benjamin.peterson', 'petr.viktorin', 'lukasz.langa', 'Mark.Shannon', 'jdemeyer', 'pablogsal', 'miss-islington']
pr_nums = ['13450', '13185', '13460', '13464', '13498', '13653', '13665', '13682', '13699', '13758', '13781', '13844', '13858', '14342', '14782']
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue36974'
versions = ['Python 3.8']Metadata
Metadata
Assignees
Labels
3.8 (EOL)end of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement
Activity
encukou commentedon May 29, 2019
New changeset aacc77f by Petr Viktorin (Jeroen Demeyer) in branch 'master':
bpo-36974: implement PEP-590 (GH-13185)
aacc77f
encukou commentedon May 29, 2019
New changeset fecb75c by Petr Viktorin in branch 'master':
bpo-36974: Fix GDB integration (GH-13665)
fecb75c
pablogsal commentedon May 29, 2019
BUILDBOT FAILURE REPORT
=======================
Builder name: AMD64 Ubuntu Shared 3.x
Builder url: https://buildbot.python.org/all/#/builders/141/
Build url: https://buildbot.python.org/all/#/builders/141/builds/1866
Failed tests
------------
Test leaking resources
----------------------
Build summary
-------------
== Tests result: FAILURE then FAILURE ==
405 tests OK.
10 slowest tests:
1 test failed:
test_gdb
17 tests skipped:
test_devpoll test_idle test_ioctl test_kqueue test_msilib
test_ossaudiodev test_startfile test_tcl test_tix test_tk
test_ttk_guionly test_ttk_textonly test_turtle test_winconsoleio
test_winreg test_winsound test_zipfile64
1 re-run test:
test_gdb
Total duration: 42 min 45 sec
Tracebacks
----------
Current builder status
----------------------
The builder is failing currently
Commits
-------
0c2f930
aacc77f
Other builds with similar failures
----------------------------------
Common commits for all builds:
pablogsal commentedon May 29, 2019
@petr is https://bugs.python.org/issue37090 and #13668 also addressing the buildbot failures?
encukou commentedon May 29, 2019
No, just #13665 is addressing the failures. And it seems that it's successful -- only the slowest of the failed ones (AMD64 Ubuntu Shared 3.x) is still red.
bpo-37090 extends the test so it can catch more bugs in the future (but there's no rush to get it in...)
pablogsal commentedon May 29, 2019
Great! Thank you very much for the quick fix for the problem.
For AMD64 Ubuntu Shared 3.x, the last build was successful:
https://buildbot.python.org/all/#/builders/141/builds/1870/steps/5/logs/stdio
encukou commentedon May 29, 2019
All stable buildbots are back to green.
encukou commentedon May 30, 2019
New changeset 735e8af by Petr Viktorin (Jeroen Demeyer) in branch 'master':
bpo-36974: inherit the vectorcall protocol (GH-13498)
735e8af
encukou commentedon May 30, 2019
New changeset c145f3b by Petr Viktorin (Jeroen Demeyer) in branch 'master':
bpo-36974: remove _PyObject_HasFastCall (GH-13460)
c145f3b
encukou commentedon May 30, 2019
New changeset 37788bc by Petr Viktorin (Jeroen Demeyer) in branch 'master':
bpo-36974: rename _FastCallKeywords -> _Vectorcall (GH-13653)
37788bc
benjaminp commentedon May 31, 2019
New changeset 530f506 by Benjamin Peterson (Jeroen Demeyer) in branch 'master':
bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async (GH-13464)
530f506
encukou commentedon May 31, 2019
I found an issue in PEP-590:
When inheriting a heap subclass from a vectorcall class that sets .tp_call=PyVectorcall_Call (as recommended), the subclass does not inherit _Py_TPFLAGS_HAVE_VECTORCALL, and thus PyVectorcall_Call does not work for it.
Possible solutions come to mind:
I'll send a PR for the latter.
3 remaining items
encukou commentedon Jun 2, 2019
New changeset be718c3 by Petr Viktorin (Jeroen Demeyer) in branch 'master':
bpo-36974: add some assertions for PEP-590 (GH-13682)
be718c3
encukou commentedon Jun 24, 2019
New changeset a8b27e6 by Petr Viktorin (Jeroen Demeyer) in branch 'master':
bpo-36974: inherit tp_vectorcall_offset unconditionally (GH-13858)
a8b27e6
encukou commentedon Jun 25, 2019
New changeset 26fe6c3 by Petr Viktorin (Miss Islington (bot)) in branch '3.8':
bpo-36974: inherit tp_vectorcall_offset unconditionally (GH-13858) (GH-14342)
26fe6c3
encukou commentedon Jul 5, 2019
New changeset 0d722f3 by Petr Viktorin (Jeroen Demeyer) in branch 'master':
bpo-36974: separate vectorcall functions for each calling convention (GH-13781)
0d722f3
jdemeyer commentedon Jul 5, 2019
Any objections to closing this?
encukou commentedon Jul 5, 2019
Buildbots are green, closing.
Thank you for the implementation!
ambv commentedon Jul 23, 2019
New changeset bf8e82f by Łukasz Langa (Jeroen Demeyer) in branch '3.8':
[3.8] bpo-36974: separate vectorcall functions for each calling convention (GH-13781) (bpo-14782)
bf8e82f
vstinner commentedon Jul 31, 2019
FYI this change caused a regression in libcomps with Python 3.8 beta3, whereas it works well with Python 3.8 beta2.
It's not a bug in Python, but it was a bug in libcomps (already fixed upstream). I just fixed libcomps:
rpm-software-management/libcomps#50
This project used the following method descriptors (for module functions):
{"categories_match", (PyCFunction)PyCOMPS_categories_match, METH_KEYWORDS,
PyCOMPS_validate__doc__},
{"environments_match", (PyCFunction)PyCOMPS_envs_match, METH_KEYWORDS,
PyCOMPS_validate__doc__},
In Python 3.7, importing the module was just fine: descriptor flags are only checked at the first call to the method.
In Python 3.8, descriptor flags are checked when the module is imported.
Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=1734777
The fix is to use the right flags: "METH_VARARGS | METH_KEYWORDS" instead of "METH_KEYWORDS".
Should we add a note like "if you get a 'SystemError: bad call flags' on import, check the descriptor flags of your functions" in What's New in Python 3.8? Maybe with a link to this issue.
https://docs.python.org/dev/whatsnew/3.8.html#changes-in-the-c-api
jdemeyer commentedon Aug 5, 2019
A better solution would be to change the error message. We could change it to something like SystemError("bad flags 0x2 for PyCOMPS_categories_match")
But maybe it's not worth it. Are there many projects that define functions/methods but never call them?
vstinner commentedon Aug 12, 2019
'SystemError: bad call flags' error message LGTM, I don't think that it should be changed.
I have no idea.
miss-islington commentedon Nov 12, 2019
New changeset 9a13a38 by Miss Islington (bot) (Jeroen Demeyer) in branch 'master':
bpo-36974: expand call protocol documentation (GH-13844)
9a13a38
encukou commentedon Jan 7, 2020
bpo-39245 tracks making the API public in Python 3.9.
vstinner commentedon Jan 16, 2020
I created bpo-39361: [C API] Document PyTypeObject.tp_print removal in What's New In Python 3.9.