René's URL Explorer Experiment


Title: test/upcast.cpp does not compile since python 3.10 · Issue #479 · boostorg/python · GitHub

Open Graph Title: test/upcast.cpp does not compile since python 3.10 · Issue #479 · boostorg/python

X Title: test/upcast.cpp does not compile since python 3.10 · Issue #479 · boostorg/python

Description: revision: 3e7be69 Since Python 3.10, compilation of test/upcast.cpp fails. python/test/upcast.cpp Lines 16 to 17 in 3e7be69 BOOST_TEST(&Py_REFCNT(boost::python::upcast(&o)) == &Py_REFCNT(&o)); BOOST_TEST(&Py_REFCNT(boost::pytho...

Open Graph Description: revision: 3e7be69 Since Python 3.10, compilation of test/upcast.cpp fails. python/test/upcast.cpp Lines 16 to 17 in 3e7be69 BOOST_TEST(&Py_REFCNT(boost::python::upcast(&o)) == &Py_REFCNT(...

X Description: revision: 3e7be69 Since Python 3.10, compilation of test/upcast.cpp fails. python/test/upcast.cpp Lines 16 to 17 in 3e7be69 BOOST_TEST(&Py_REFCNT(boost::python::upcast<PyObject>(&o)) ...

Opengraph URL: https://github.com/boostorg/python/issues/479

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"test/upcast.cpp does not compile since python 3.10","articleBody":"revision: 3e7be69e1e405e1d5ddd232c69c024ee441592c5\n\nSince Python 3.10, compilation of test/upcast.cpp fails.\n\nhttps://github.com/boostorg/python/blob/3e7be69e1e405e1d5ddd232c69c024ee441592c5/test/upcast.cpp#L16-L17\n\n```console\n$ g++ -Iinclude -I/opt/miniconda3/envs/py310/include/python3.10 test/upcast.cpp\nIn file included from /usr/include/boost/detail/lightweight_test.hpp:15,\n                 from ./test/upcast.cpp:7:\n./test/upcast.cpp: In function 'int main()':\n/opt/miniconda3/envs/py310/include/python3.10/object.h:133:33: error: lvalue required as unary '\u0026' operand\n  133 | #define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST_CONST(ob))\n      |                       ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~\n./test/upcast.cpp:16:17: note: in expansion of macro 'Py_REFCNT'\n   16 |     BOOST_TEST(\u0026Py_REFCNT(boost::python::upcast\u003cPyObject\u003e(\u0026o)) == \u0026Py_REFCNT(\u0026o));\n      |                 ^~~~~~~~~\n/opt/miniconda3/envs/py310/include/python3.10/object.h:133:33: error: lvalue required as unary '\u0026' operand\n  133 | #define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST_CONST(ob))\n      |                       ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~\n./test/upcast.cpp:16:68: note: in expansion of macro 'Py_REFCNT'\n   16 |     BOOST_TEST(\u0026Py_REFCNT(boost::python::upcast\u003cPyObject\u003e(\u0026o)) == \u0026Py_REFCNT(\u0026o));\n      |                                                                    ^~~~~~~~~\n/opt/miniconda3/envs/py310/include/python3.10/object.h:133:33: error: lvalue required as unary '\u0026' operand\n  133 | #define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST_CONST(ob))\n      |                       ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~\n./test/upcast.cpp:17:17: note: in expansion of macro 'Py_REFCNT'\n   17 |     BOOST_TEST(\u0026Py_REFCNT(boost::python::upcast\u003cPyObject\u003e(\u0026y)) == \u0026Py_REFCNT(\u0026y));\n      |                 ^~~~~~~~~\n/opt/miniconda3/envs/py310/include/python3.10/object.h:133:33: error: lvalue required as unary '\u0026' operand\n  133 | #define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST_CONST(ob))\n      |                       ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~\n./test/upcast.cpp:17:68: note: in expansion of macro 'Py_REFCNT'\n   17 |     BOOST_TEST(\u0026Py_REFCNT(boost::python::upcast\u003cPyObject\u003e(\u0026y)) == \u0026Py_REFCNT(\u0026y));\n      |                                                                    ^~~~~~~~~\n```\n\n```console\n$ g++ -Iinclude -I/usr/include/python3.13 test/upcast.cpp\nIn file included from /usr/include/boost/detail/lightweight_test.hpp:15,\n                 from test/upcast.cpp:7:\ntest/upcast.cpp: In function 'int main()':\n/usr/include/python3.13/object.h:330:34: error: lvalue required as unary '\u0026' operand\n  330 | #  define Py_REFCNT(ob) Py_REFCNT(_PyObject_CAST(ob))\n      |                         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~\ntest/upcast.cpp:16:17: note: in expansion of macro 'Py_REFCNT'\n   16 |     BOOST_TEST(\u0026Py_REFCNT(boost::python::upcast\u003cPyObject\u003e(\u0026o)) == \u0026Py_REFCNT(\u0026o));\n      |                 ^~~~~~~~~\n/usr/include/python3.13/object.h:330:34: error: lvalue required as unary '\u0026' operand\n  330 | #  define Py_REFCNT(ob) Py_REFCNT(_PyObject_CAST(ob))\n      |                         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~\ntest/upcast.cpp:16:68: note: in expansion of macro 'Py_REFCNT'\n   16 |     BOOST_TEST(\u0026Py_REFCNT(boost::python::upcast\u003cPyObject\u003e(\u0026o)) == \u0026Py_REFCNT(\u0026o));\n      |                                                                    ^~~~~~~~~\n/usr/include/python3.13/object.h:330:34: error: lvalue required as unary '\u0026' operand\n  330 | #  define Py_REFCNT(ob) Py_REFCNT(_PyObject_CAST(ob))\n      |                         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~\ntest/upcast.cpp:17:17: note: in expansion of macro 'Py_REFCNT'\n   17 |     BOOST_TEST(\u0026Py_REFCNT(boost::python::upcast\u003cPyObject\u003e(\u0026y)) == \u0026Py_REFCNT(\u0026y));\n      |                 ^~~~~~~~~\n/usr/include/python3.13/object.h:330:34: error: lvalue required as unary '\u0026' operand\n  330 | #  define Py_REFCNT(ob) Py_REFCNT(_PyObject_CAST(ob))\n      |                         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~\ntest/upcast.cpp:17:68: note: in expansion of macro 'Py_REFCNT'\n   17 |     BOOST_TEST(\u0026Py_REFCNT(boost::python::upcast\u003cPyObject\u003e(\u0026y)) == \u0026Py_REFCNT(\u0026y));\n      |                                                                    ^~~~~~~~~\n```\n\nThis is because [`Py_REFCNT()` is changed to the inline static function](https://docs.python.org/3.10/c-api/structures.html#c.Py_REFCNT).\n\nUnfortunately, the CI images use python upto 3.8, so the issue has not been found.","author":{"url":"https://github.com/e-kwsm","@type":"Person","name":"e-kwsm"},"datePublished":"2025-03-28T19:38:13.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/479/python/issues/479"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:65a7844a-70ff-da86-af62-6b3ebfb25793
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA5F6:3B25A:161F701:1DE880E:6964A71A
html-safe-nonce1caf642f7fd4c1a476d1e4bee5e4238415dc66539ee5fb86cba06df173da8abf
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNUY2OjNCMjVBOjE2MUY3MDE6MURFODgwRTo2OTY0QTcxQSIsInZpc2l0b3JfaWQiOiIxNjYzMjUzODYyNjk3NzA3MjkwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac6ed3709f8aa45813bee604edaad97a489e7d5e0cf56e4db488263edeab6a8575
hovercard-subject-tagissue:2957029510
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/boostorg/python/479/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b9ae6709cc176de09b7e75995f1d58a4c79cd8a90b117da703d7527af7fa0eb3/boostorg/python/issues/479
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b9ae6709cc176de09b7e75995f1d58a4c79cd8a90b117da703d7527af7fa0eb3/boostorg/python/issues/479
og:image:altrevision: 3e7be69 Since Python 3.10, compilation of test/upcast.cpp fails. python/test/upcast.cpp Lines 16 to 17 in 3e7be69 BOOST_TEST(&Py_REFCNT(boost::python::upcast(&o)) == &Py_REFCNT(...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamee-kwsm
hostnamegithub.com
expected-hostnamegithub.com
None15579c46431b7fd25941c3b09010f74fd1890c7a35226839bbbf40ce70fb3057
turbo-cache-controlno-preview
go-importgithub.com/boostorg/python git https://github.com/boostorg/python.git
octolytics-dimension-user_id3170529
octolytics-dimension-user_loginboostorg
octolytics-dimension-repository_id7589968
octolytics-dimension-repository_nwoboostorg/python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id7589968
octolytics-dimension-repository_network_root_nwoboostorg/python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release499abb347cb197601d399c346cfeb4b3fa135d5c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/boostorg/python/issues/479#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fboostorg%2Fpython%2Fissues%2F479
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fboostorg%2Fpython%2Fissues%2F479
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=boostorg%2Fpython
Reloadhttps://github.com/boostorg/python/issues/479
Reloadhttps://github.com/boostorg/python/issues/479
Reloadhttps://github.com/boostorg/python/issues/479
boostorg https://github.com/boostorg
pythonhttps://github.com/boostorg/python
Notifications https://github.com/login?return_to=%2Fboostorg%2Fpython
Fork 222 https://github.com/login?return_to=%2Fboostorg%2Fpython
Star 519 https://github.com/login?return_to=%2Fboostorg%2Fpython
Code https://github.com/boostorg/python
Issues 169 https://github.com/boostorg/python/issues
Pull requests 36 https://github.com/boostorg/python/pulls
Actions https://github.com/boostorg/python/actions
Projects 0 https://github.com/boostorg/python/projects
Wiki https://github.com/boostorg/python/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/boostorg/python/security
Please reload this pagehttps://github.com/boostorg/python/issues/479
Insights https://github.com/boostorg/python/pulse
Code https://github.com/boostorg/python
Issues https://github.com/boostorg/python/issues
Pull requests https://github.com/boostorg/python/pulls
Actions https://github.com/boostorg/python/actions
Projects https://github.com/boostorg/python/projects
Wiki https://github.com/boostorg/python/wiki
Security https://github.com/boostorg/python/security
Insights https://github.com/boostorg/python/pulse
New issuehttps://github.com/login?return_to=https://github.com/boostorg/python/issues/479
New issuehttps://github.com/login?return_to=https://github.com/boostorg/python/issues/479
test/upcast.cpp does not compile since python 3.10https://github.com/boostorg/python/issues/479#top
https://github.com/e-kwsm
https://github.com/e-kwsm
e-kwsmhttps://github.com/e-kwsm
on Mar 28, 2025https://github.com/boostorg/python/issues/479#issue-2957029510
3e7be69https://github.com/boostorg/python/commit/3e7be69e1e405e1d5ddd232c69c024ee441592c5
python/test/upcast.cpphttps://github.com/boostorg/python/blob/3e7be69e1e405e1d5ddd232c69c024ee441592c5/test/upcast.cpp#L16-L17
3e7be69https://github.com/boostorg/python/commit/3e7be69e1e405e1d5ddd232c69c024ee441592c5
Py_REFCNT() is changed to the inline static functionhttps://docs.python.org/3.10/c-api/structures.html#c.Py_REFCNT
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.