René's URL Explorer Experiment


Title: [BUG] Latest pytest release (8.1.0) breaks allure_listener plugin · Issue #794 · allure-framework/allure-python · GitHub

Open Graph Title: [BUG] Latest pytest release (8.1.0) breaks allure_listener plugin · Issue #794 · allure-framework/allure-python

X Title: [BUG] Latest pytest release (8.1.0) breaks allure_listener plugin · Issue #794 · allure-framework/allure-python

Description: I'm submitting a ... [*] bug report What is the current behavior? After pytest released its latest version 8.1.0 it suddenly started to break allure_listener plugin on fixtures initilization/teardown thus preventing from running any test...

Open Graph Description: I'm submitting a ... [*] bug report What is the current behavior? After pytest released its latest version 8.1.0 it suddenly started to break allure_listener plugin on fixtures initilization/teardo...

X Description: I'm submitting a ... [*] bug report What is the current behavior? After pytest released its latest version 8.1.0 it suddenly started to break allure_listener plugin on fixtures initilization/te...

Opengraph URL: https://github.com/allure-framework/allure-python/issues/794

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] Latest pytest release (8.1.0) breaks allure_listener plugin","articleBody":"[//]: # (\r\n. Note: for support questions, please use Stackoverflow or Gitter**. \r\n. This repository's issues are reserved for feature requests and bug reports.\r\n.\r\n. In case of any problems with Allure Jenkins plugin** please use the following repository \r\n. to create an issue: https://github.com/jenkinsci/allure-plugin/issues\r\n.\r\n. Make sure you have a clear name for your issue. The name should start with a capital \r\n. letter and no dot is required in the end of the sentence. An example of good issue names:\r\n.\r\n. - The report is broken in IE11\r\n. - Add an ability to disable default plugins\r\n. - Support emoji in test descriptions\r\n)\r\n\r\n#### I'm submitting a ... \r\n  - [*] bug report\r\n\r\n#### What is the current behavior?\r\nAfter `pytest` released its latest version `8.1.0` it suddenly started to break `allure_listener` plugin on fixtures initilization/teardown thus preventing from running any tests with `pytest` and `allure-pytest` installed.\r\n\r\n#### If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem\r\n1. Have `pytest=8.1.0` installed\r\n2. Have `allure-pytest` installed (as of the moment of writing it is `2.13.0`)\r\n3. Have simple project with `pytest` configured\r\n4. Have fixtures defined with `@pytest.fixture` decorator\r\n\r\nThe following is a minimal example the I could reproduce from our tests that caught this issue:\r\n\r\n```python\r\n# conftest.py\r\nimport pytest\r\n\r\nclass MyBaseTestClass:\r\n   def __init__(self, val):\r\n       self.val = val\r\n\r\n@pytest.fixture\r\ndef my_fixture():\r\n    yield MyBaseTestClass(\"some value\")\r\n```\r\n\r\n```python\r\n# test_example.py\r\ndef test_my_fixture(my_fixture):\r\n    assert my_fixture.val == \"some value\"\r\n```\r\n\r\n#### What is the expected behavior?\r\nIt is expected for `allure-pytest` not to break whole project when updating to `pytest==8.1.0`\r\n\r\n#### What is the motivation / use case for changing the behavior?\r\nNot to break tests\r\n\r\n#### Please tell us about your environment:\r\n\r\n- Allure version:         2.26.0\r\n- Test framework:      pytest@8.1.0\r\n- Allure adaptor:        allure-pytest@2.13.0\r\n\r\n#### Other information \r\n\r\nWhen running the test the stack trace gives the following error:\r\n\r\n```python\r\nself = \u003callure_pytest.listener.AllureListener object at 0x1378f7250\u003e, item = \u003cFunction test_create_enum_metadata[options_bounds0]\u003e\r\n\r\n    @pytest.hookimpl(hookwrapper=True)\r\n    def pytest_runtest_setup(self, item):\r\n        if not self._cache.get(item.nodeid):\r\n            uuid = self._cache.push(item.nodeid)\r\n            test_result = TestResult(name=item.name, uuid=uuid, start=now(), stop=now())\r\n            self.allure_logger.schedule_test(uuid, test_result)\r\n        yield\r\n\u003e       self._update_fixtures_children(item)\r\n\r\n.nox/tests-3-10/lib/python3.10/site-packages/allure_pytest/listener.py:102: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \r\n.nox/tests-3-10/lib/python3.10/site-packages/allure_pytest/listener.py:71: in _update_fixtures_children\r\n    for fixturedef in _test_fixtures(item):\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \r\n\r\nitem = \u003cFunction test_create_enum_metadata[options_bounds0]\u003e\r\n\r\n    def _test_fixtures(item):\r\n        fixturemanager = item.session._fixturemanager\r\n        fixturedefs = []\r\n    \r\n        if hasattr(item, \"_request\") and hasattr(item._request, \"fixturenames\"):\r\n            for name in item._request.fixturenames:\r\n\u003e               fixturedefs_pytest = fixturemanager.getfixturedefs(name, item.nodeid)\r\nE               AttributeError: 'str' object has no attribute 'iter_parents'\r\n\r\n.nox/tests-3-10/lib/python3.10/site-packages/allure_pytest/listener.py:345: AttributeError\r\n```\r\n\r\nAs it can be seen from the error message the following line is causing the issue: https://github.com/allure-framework/allure-python/blob/058a6afb0601f790162f058b3c1d3e7300d420ab/allure-pytest/src/listener.py#L102\r\n\r\nI believe this can be due to following change recently introduced in the `pytest` framework, because right after that, we upgraded to the latest `pytest` and our tests started to fail without even running (the error thrown during the initialization of the fixtures I believe). And downgrading to `pytest==8.0.0` fixed this issues. However, I think, it would be nice to fix this to make sure further compatability between `allure-pytest` and `pytest` framework. \r\n\r\nCommit from the `pytest`: https://github.com/pytest-dev/pytest/commit/434282e17f5f1f4fcc1464a0a0921cf19804bdd7\r\n\r\nP.S I am not exactly sure who should be responsible for handling this issue whether `allure` team or `pytest` team.\r\n\r\n[//]: # (\r\n. e.g. detailed explanation, stacktraces, related issues, suggestions \r\n. how to fix, links for us to have more context, eg. Stackoverflow, Gitter etc\r\n)\r\n","author":{"url":"https://github.com/mihhail-m","@type":"Person","name":"mihhail-m"},"datePublished":"2024-03-04T08:57:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/794/allure-python/issues/794"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d365c007-d3c4-b9f6-52ce-ea2eb22cbd44
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAE28:24B8AF:11BBB9:167BBC:69741EF4
html-safe-nonce86a16af04fba88f900cd51effbd6d255603e36463cc79fc1ed4865982661f2e9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTI4OjI0QjhBRjoxMUJCQjk6MTY3QkJDOjY5NzQxRUY0IiwidmlzaXRvcl9pZCI6IjMyMzgxNjY5MjkzMTg2MTY4MjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc945493e6dd83300b55942f59c9a68baf7ae80fb610e8e0f345d5dfbd1234c73
hovercard-subject-tagissue:2166303106
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/allure-framework/allure-python/794/issue_layout
twitter:imagehttps://opengraph.githubassets.com/39e23b828582597d683000e75e15f034651d011a5e87b5e491f0e3791224b29d/allure-framework/allure-python/issues/794
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/39e23b828582597d683000e75e15f034651d011a5e87b5e491f0e3791224b29d/allure-framework/allure-python/issues/794
og:image:altI'm submitting a ... [*] bug report What is the current behavior? After pytest released its latest version 8.1.0 it suddenly started to break allure_listener plugin on fixtures initilization/teardo...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemihhail-m
hostnamegithub.com
expected-hostnamegithub.com
None447dc9917c3d68d647a01abfdefe55ec7ee1785922136c1d8395dbb3ab6d57b9
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8dad7bdfecbe3eaa97ac4e632d6b47e2b23e81d9
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/allure-framework/allure-python/issues/794#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fallure-framework%2Fallure-python%2Fissues%2F794
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%2Fallure-framework%2Fallure-python%2Fissues%2F794
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=allure-framework%2Fallure-python
Reloadhttps://github.com/allure-framework/allure-python/issues/794
Reloadhttps://github.com/allure-framework/allure-python/issues/794
Reloadhttps://github.com/allure-framework/allure-python/issues/794
allure-framework https://github.com/allure-framework
allure-pythonhttps://github.com/allure-framework/allure-python
Notifications https://github.com/login?return_to=%2Fallure-framework%2Fallure-python
Fork 256 https://github.com/login?return_to=%2Fallure-framework%2Fallure-python
Star 791 https://github.com/login?return_to=%2Fallure-framework%2Fallure-python
Code https://github.com/allure-framework/allure-python
Issues 95 https://github.com/allure-framework/allure-python/issues
Pull requests 20 https://github.com/allure-framework/allure-python/pulls
Actions https://github.com/allure-framework/allure-python/actions
Security 0 https://github.com/allure-framework/allure-python/security
Insights https://github.com/allure-framework/allure-python/pulse
Code https://github.com/allure-framework/allure-python
Issues https://github.com/allure-framework/allure-python/issues
Pull requests https://github.com/allure-framework/allure-python/pulls
Actions https://github.com/allure-framework/allure-python/actions
Security https://github.com/allure-framework/allure-python/security
Insights https://github.com/allure-framework/allure-python/pulse
New issuehttps://github.com/login?return_to=https://github.com/allure-framework/allure-python/issues/794
New issuehttps://github.com/login?return_to=https://github.com/allure-framework/allure-python/issues/794
#795https://github.com/allure-framework/allure-python/pull/795
[BUG] Latest pytest release (8.1.0) breaks allure_listener pluginhttps://github.com/allure-framework/allure-python/issues/794#top
#795https://github.com/allure-framework/allure-python/pull/795
https://github.com/delatrie
bugSomething isn't workinghttps://github.com/allure-framework/allure-python/issues?q=state%3Aopen%20label%3A%22bug%22
theme:pytesthttps://github.com/allure-framework/allure-python/issues?q=state%3Aopen%20label%3A%22theme%3Apytest%22
https://github.com/mihhail-m
https://github.com/mihhail-m
mihhail-mhttps://github.com/mihhail-m
on Mar 4, 2024https://github.com/allure-framework/allure-python/issues/794#issue-2166303106
allure-python/allure-pytest/src/listener.pyhttps://github.com/allure-framework/allure-python/blob/058a6afb0601f790162f058b3c1d3e7300d420ab/allure-pytest/src/listener.py#L102
058a6afhttps://github.com/allure-framework/allure-python/commit/058a6afb0601f790162f058b3c1d3e7300d420ab
pytest-dev/pytest@434282ehttps://github.com/pytest-dev/pytest/commit/434282e17f5f1f4fcc1464a0a0921cf19804bdd7
delatriehttps://github.com/delatrie
bugSomething isn't workinghttps://github.com/allure-framework/allure-python/issues?q=state%3Aopen%20label%3A%22bug%22
theme:pytesthttps://github.com/allure-framework/allure-python/issues?q=state%3Aopen%20label%3A%22theme%3Apytest%22
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.