Title: 3.14.0a2 rebuild needed for 0x03070000 limited api c extension · Issue #127191 · python/cpython · GitHub
Open Graph Title: 3.14.0a2 rebuild needed for 0x03070000 limited api c extension · Issue #127191 · python/cpython
X Title: 3.14.0a2 rebuild needed for 0x03070000 limited api c extension · Issue #127191 · python/cpython
Description: Bug report Bug description: An existing C api extension compiled with Python 3.7-3.11 behaves differently when run in Python 3.14.0a2. Causing a reference count change where none is expected. The python test code looks like this from sys...
Open Graph Description: Bug report Bug description: An existing C api extension compiled with Python 3.7-3.11 behaves differently when run in Python 3.14.0a2. Causing a reference count change where none is expected. The p...
X Description: Bug report Bug description: An existing C api extension compiled with Python 3.7-3.11 behaves differently when run in Python 3.14.0a2. Causing a reference count change where none is expected. The p...
Opengraph URL: https://github.com/python/cpython/issues/127191
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"3.14.0a2 rebuild needed for 0x03070000 limited api c extension","articleBody":"# Bug report\r\n\r\n### Bug description:\r\n\r\nAn existing C api extension compiled with Python 3.7-3.11 behaves differently when run in Python 3.14.0a2. Causing a reference count change where none is expected. The python test code looks like this\r\n\r\n```python\r\nfrom sys import getrefcount\r\nfrom _rl_accel import unicode2T1\r\n\r\nutext = 'This is the end of the world'\r\n\r\nclass Font:\r\n def __init__(self,name):\r\n self.fontName = name\r\n self.substitutionFonts = []\r\n self.encName = 'utf8'\r\n\r\nfont = Font('Helvetica')\r\n\r\ndefns = 'utext font font.encName font.fontName font.substitutionFonts'.split()\r\nrc0 = [getrefcount(eval(x,globals())) for x in defns]\r\nprint(rc0)\r\nunicode2T1(utext,[font]+font.substitutionFonts)\r\nrc1 = [getrefcount(eval(x,globals())) for x in defns]\r\nprint(rc1)\r\nif rc1!=rc0:\r\n print('!!!!! reference counts changed !!!!!')\r\n```\r\n\r\nThe C function unicode2T1 is not expected to change any of the refcounts checked, but if built with python 3.7-3.11\r\nwe see a decrease in the refcount for font.encName when running in python 3.14.0a2. \r\n\r\nIf built with python 3.14.0a2 the reference count decrease is not seen in the test. It seems that my code is broken in terms of the abi3 guarantee.\r\n\r\nTo ease checking I built a bash script to checkout and build the test environments; this can be found [here](https://github.com/MrBitBucket/rl-accel-mirror/blob/master/tests/runner.sh).\r\n\r\nI run this like \r\n```sh\r\nEARLYPYTHON=~/bin/python311 LATEPYTHON=~/bin/python314 tests/runner.sh\r\n```\r\n\r\nSorry this example is so large, but at least reportlab is not required. We do have a python version of this code [rl_accel.py](https://hg.reportlab.com/hg-public/reportlab/file/c299e65db01b/src/reportlab/lib/rl_accel.py)\r\n\r\n\r\n\r\n\r\n\r\n### CPython versions tested on:\r\n\r\n3.9, 3.10, 3.11, 3.12, 3.13, 3.14\r\n\r\n### Operating systems tested on:\r\n\r\nLinux\r\n\r\n### Related\r\n\r\n[discuss.python.org/t/3-14-0a2-rebuild-needed-for-0x03070000-limited-api-c-extension/72006](https://discuss.python.org/t/3-14-0a2-rebuild-needed-for-0x03070000-limited-api-c-extension/72006)","author":{"url":"https://github.com/MrBitBucket","@type":"Person","name":"MrBitBucket"},"datePublished":"2024-11-23T11:40:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/127191/cpython/issues/127191"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:73113c47-2d60-9958-b24f-534ec0d0444e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D3D2:2AA429:635C4D:89B121:696A2633 |
| html-safe-nonce | 0e0a27cc53e4c2e061b26d3b3a881a01db18822e9605b1603de3d9e139cb0f1a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEM0QyOjJBQTQyOTo2MzVDNEQ6ODlCMTIxOjY5NkEyNjMzIiwidmlzaXRvcl9pZCI6IjM5Mzc2NTM1MDY1MzIwNTg2NzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5fce81481c737a56b79aa625d00f1501f23a9dbed4561d8520bf10d947a4f828 |
| hovercard-subject-tag | issue:2685910248 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/127191/issue_layout |
| twitter:image | https://opengraph.githubassets.com/14ecc4bda0bc181da8e60186ff3a821588b856f94ca798a9143908f2117800c9/python/cpython/issues/127191 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/14ecc4bda0bc181da8e60186ff3a821588b856f94ca798a9143908f2117800c9/python/cpython/issues/127191 |
| og:image:alt | Bug report Bug description: An existing C api extension compiled with Python 3.7-3.11 behaves differently when run in Python 3.14.0a2. Causing a reference count change where none is expected. The p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | MrBitBucket |
| hostname | github.com |
| expected-hostname | github.com |
| None | a1022f03e4f0d91ea173e4e5dac892c982e0588c62f1ce56121d755a320a3569 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f472b8e6c7b3fdd5d0354972a3f4c516289bf0be |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width