René's URL Explorer Experiment


Title: fix(step): support attribute access in step title placeholders by golikovichev · Pull Request #910 · allure-framework/allure-python · GitHub

Open Graph Title: fix(step): support attribute access in step title placeholders by golikovichev · Pull Request #910 · allure-framework/allure-python

X Title: fix(step): support attribute access in step title placeholders by golikovichev · Pull Request #910 · allure-framework/allure-python

Description: Closes #896. Problem @allure.step("Process: {data.name}") raises AttributeError when data is an object with a name attribute (for example a dataclass), because func_parameters() converts every parameter value to its string representation before str.format() runs. By the time the title is being formatted, the values are already strings, so attribute access on {data.name} fails. Root cause In allure-python-commons/src/allure_commons/utils.py, func_parameters() applies represent() to every value at the moment it builds the parameter mapping: sorted_items = sorted( map( lambda kv: (kv[0], represent(kv[1])), # values become strings here items ), ... ) In _allure.py, the step decorator passed that already-stringified mapping to self.title.format(*args, **params), so {data.name} tried to access .name on a string and raised. Fix Introduce _StepTitleFormatter, a subclass of string.Formatter, that defers represent() to format_field, applied after attribute traversal. The decorator now hands the formatter the raw arguments (with defaults filled in from the function signature), so attribute traversal operates on the original objects. Leaf values are still wrapped via represent(), which preserves the existing repr-style display for plain positional and keyword placeholders. Behaviour Existing positional and keyword placeholders unchanged. Object attribute placeholders work: {data.name} traverses to the attribute and then applies represent() on the leaf value. Nested attribute access works: {user.address.city}. Method calls (self and cls first arg) continue to work. Default values for arguments are honoured, matching func_parameters(). Tests Added a new regression test file tests/allure_pytest/acceptance/step/step_attribute_placeholder_test.py covering: Dataclass attribute access in a step title. Plain object (non-dataclass) attribute access. Nested attribute access (user.address.city). All existing step tests continue to pass: tests/allure_pytest/acceptance/step/ ... 14 passed tests/allure_pytest/ (excluding pre-existing externals failures) ... 265 passed The 6 failures in tests/allure_pytest/externals/ reproduce on master without my changes (missing optional plugins such as pytest-check in the dev environment) and are unrelated to this PR.

Open Graph Description: Closes #896. Problem @allure.step("Process: {data.name}") raises AttributeError when data is an object with a name attribute (for example a dataclass), because func_parameters() converts ...

X Description: Closes #896. Problem @allure.step("Process: {data.name}") raises AttributeError when data is an object with a name attribute (for example a dataclass), because func_parameters() c...

Opengraph URL: https://github.com/allure-framework/allure-python/pull/910

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:c6d8d897-0f66-82a7-6df4-111003826642
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8E34:15BFB5:12A803:1972EA:6AFD4D12
html-safe-noncea85f4eb33534bcfa0abb857bd8eabfd7dcd7119e91d87ffdb4296f25fea936ec
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTM0OjE1QkZCNToxMkE4MDM6MTk3MkVBOjZBRkQ0RDEyIiwidmlzaXRvcl9pZCI6IjE3OTMzNTg2Nzg1MDIyMzEzMTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac3744750f775a0e824032bfd453b3c94ef35fa66b352a54cca919901b69b8456b
hovercard-subject-tagpull_request:3621125524
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/allure-framework/allure-python/pull/910/files
twitter:imagehttps://avatars.githubusercontent.com/u/271386936?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/271386936?s=400&v=4
og:image:altCloses #896. Problem @allure.step("Process: {data.name}") raises AttributeError when data is an object with a name attribute (for example a dataclass), because func_parameters() converts ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/allure-framework/allure-python git https://github.com/allure-framework/allure-python.git
octolytics-dimension-user_id5879127
octolytics-dimension-user_loginallure-framework
octolytics-dimension-repository_id79346720
octolytics-dimension-repository_nwoallure-framework/allure-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id79346720
octolytics-dimension-repository_network_root_nwoallure-framework/allure-python
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseb6f01f7cb9f35f8c09949773241a3d49dd04b340
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/allure-framework/allure-python/pull/910/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fallure-framework%2Fallure-python%2Fpull%2F910%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fallure-framework%2Fallure-python%2Fpull%2F910%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=allure-framework%2Fallure-python
Reloadhttps://github.com/allure-framework/allure-python/pull/910/files
Reloadhttps://github.com/allure-framework/allure-python/pull/910/files
Reloadhttps://github.com/allure-framework/allure-python/pull/910/files
allure-frameworkhttps://github.com/allure-framework
allure-pythonhttps://github.com/allure-framework/allure-python
Codehttps://github.com/allure-framework/allure-python
Issues101 (101)https://github.com/allure-framework/allure-python/issues
Pull requests33 (33)https://github.com/allure-framework/allure-python/pulls
Actionshttps://github.com/allure-framework/allure-python/actions
Security and qualityhttps://github.com/allure-framework/allure-python/security
Insightshttps://github.com/allure-framework/allure-python/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fallure-framework%2Fallure-python%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fallure-framework%2Fallure-python%2Fissues%2Fnew%2Fchoose
golikovichevhttps://github.com/golikovichev
allure-framework:masterhttps://github.com/allure-framework/allure-python/tree/master
golikovichev:fix-step-placeholder-attribute-accesshttps://github.com/golikovichev/allure-python/tree/fix-step-placeholder-attribute-access
Conversation 2 https://github.com/allure-framework/allure-python/pull/910
Commits 1 https://github.com/allure-framework/allure-python/pull/910/commits
Checks 49 https://github.com/allure-framework/allure-python/pull/910/checks
Files changed https://github.com/allure-framework/allure-python/pull/910/files
Please reload this pagehttps://github.com/allure-framework/allure-python/pull/910/files
fix(step): support attribute access in step title placeholders https://github.com/allure-framework/allure-python/pull/910/files#top
Show all changes 1 commit https://github.com/allure-framework/allure-python/pull/910/files
67a60e9 fix(step): support attribute access in step title placeholders golikovichev May 3, 2026 https://github.com/allure-framework/allure-python/pull/910/commits/67a60e9b95a72e4cee4d9f016a388d323e5a424f
Clear filters https://github.com/allure-framework/allure-python/pull/910/files
Please reload this pagehttps://github.com/allure-framework/allure-python/pull/910/files
Please reload this pagehttps://github.com/allure-framework/allure-python/pull/910/files
_allure.py https://github.com/allure-framework/allure-python/pull/910/files#diff-1fa0370b0290706a6a1e907c38050b8d7c7a5eca7f5d736fa409048cc210bb72
step_attribute_placeholder_test.py https://github.com/allure-framework/allure-python/pull/910/files#diff-0c3e184cd8e04785477aadd3aafeb3a9cc7137d2be156132060b8a966730a7e0
allure-python-commons/src/allure_commons/_allure.pyhttps://github.com/allure-framework/allure-python/pull/910/files#diff-1fa0370b0290706a6a1e907c38050b8d7c7a5eca7f5d736fa409048cc210bb72
View file https://github.com/allure-framework/allure-python/blob/67a60e9b95a72e4cee4d9f016a388d323e5a424f/allure-python-commons/src/allure_commons/_allure.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/allure-framework/allure-python/pull/910/{{ revealButtonHref }}
https://github.com/allure-framework/allure-python/pull/910/files#diff-1fa0370b0290706a6a1e907c38050b8d7c7a5eca7f5d736fa409048cc210bb72
https://github.com/allure-framework/allure-python/pull/910/files#diff-1fa0370b0290706a6a1e907c38050b8d7c7a5eca7f5d736fa409048cc210bb72
https://github.com/allure-framework/allure-python/pull/910/files#diff-1fa0370b0290706a6a1e907c38050b8d7c7a5eca7f5d736fa409048cc210bb72
https://github.com/allure-framework/allure-python/pull/910/files#diff-1fa0370b0290706a6a1e907c38050b8d7c7a5eca7f5d736fa409048cc210bb72
tests/allure_pytest/acceptance/step/step_attribute_placeholder_test.pyhttps://github.com/allure-framework/allure-python/pull/910/files#diff-0c3e184cd8e04785477aadd3aafeb3a9cc7137d2be156132060b8a966730a7e0
View file https://github.com/allure-framework/allure-python/blob/67a60e9b95a72e4cee4d9f016a388d323e5a424f/tests/allure_pytest/acceptance/step/step_attribute_placeholder_test.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/allure-framework/allure-python/pull/910/{{ revealButtonHref }}
Please reload this pagehttps://github.com/allure-framework/allure-python/pull/910/files
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.