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: patch-diff.githubusercontent.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:61b535f5-1be7-50b0-f4b3-98faeeacf913
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9932:1B1EBD:190AD5F:2177666:697041AE
html-safe-nonce0e7b869daa3a891eba8fab45e9e682c481c793ecce2c5a0ff3a306d0db076c4b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTMyOjFCMUVCRDoxOTBBRDVGOjIxNzc2NjY6Njk3MDQxQUUiLCJ2aXNpdG9yX2lkIjoiNDkyMDY2MzcyNTQ5NzY2MzkxOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac0143f8d01990b88c4a799b42ef99f8ac1f1b1a53cdb281267abe34a443bd5c6e
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
None9920a62ba22d06470388e2904804fb7e5ec51c9e35f81784e9191394c74b2bd2
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
releasef643964067a552f02067066d6a910b2f90a5721f
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/boostorg/python/issues/479#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.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://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fboostorg%2Fpython%2Fissues%2F479
Sign up https://patch-diff.githubusercontent.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://patch-diff.githubusercontent.com/boostorg/python/issues/479
Reloadhttps://patch-diff.githubusercontent.com/boostorg/python/issues/479
Reloadhttps://patch-diff.githubusercontent.com/boostorg/python/issues/479
boostorg https://patch-diff.githubusercontent.com/boostorg
pythonhttps://patch-diff.githubusercontent.com/boostorg/python
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fboostorg%2Fpython
Fork 221 https://patch-diff.githubusercontent.com/login?return_to=%2Fboostorg%2Fpython
Star 518 https://patch-diff.githubusercontent.com/login?return_to=%2Fboostorg%2Fpython
Code https://patch-diff.githubusercontent.com/boostorg/python
Issues 169 https://patch-diff.githubusercontent.com/boostorg/python/issues
Pull requests 36 https://patch-diff.githubusercontent.com/boostorg/python/pulls
Actions https://patch-diff.githubusercontent.com/boostorg/python/actions
Projects 0 https://patch-diff.githubusercontent.com/boostorg/python/projects
Wiki https://patch-diff.githubusercontent.com/boostorg/python/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/boostorg/python/security
Please reload this pagehttps://patch-diff.githubusercontent.com/boostorg/python/issues/479
Insights https://patch-diff.githubusercontent.com/boostorg/python/pulse
Code https://patch-diff.githubusercontent.com/boostorg/python
Issues https://patch-diff.githubusercontent.com/boostorg/python/issues
Pull requests https://patch-diff.githubusercontent.com/boostorg/python/pulls
Actions https://patch-diff.githubusercontent.com/boostorg/python/actions
Projects https://patch-diff.githubusercontent.com/boostorg/python/projects
Wiki https://patch-diff.githubusercontent.com/boostorg/python/wiki
Security https://patch-diff.githubusercontent.com/boostorg/python/security
Insights https://patch-diff.githubusercontent.com/boostorg/python/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/boostorg/python/issues/479
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/boostorg/python/issues/479
test/upcast.cpp does not compile since python 3.10https://patch-diff.githubusercontent.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://patch-diff.githubusercontent.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.