René's URL Explorer Experiment


Title: test(django): Remove @pytest.mark.forked dependency from Django integration tests · Issue #6411 · getsentry/sentry-python · GitHub

Open Graph Title: test(django): Remove @pytest.mark.forked dependency from Django integration tests · Issue #6411 · getsentry/sentry-python

X Title: test(django): Remove @pytest.mark.forked dependency from Django integration tests · Issue #6411 · getsentry/sentry-python

Description: Background The Django integration test suite uses @pytest.mark.forked (via pytest-forked) on 52 tests across 5 files to isolate global state. This dates back to #522 ("Less boxed testing") and was a pragmatic substitute for proper teardo...

Open Graph Description: Background The Django integration test suite uses @pytest.mark.forked (via pytest-forked) on 52 tests across 5 files to isolate global state. This dates back to #522 ("Less boxed testing") and was ...

X Description: Background The Django integration test suite uses @pytest.mark.forked (via pytest-forked) on 52 tests across 5 files to isolate global state. This dates back to #522 ("Less boxed testing"...

Opengraph URL: https://github.com/getsentry/sentry-python/issues/6411

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"test(django): Remove @pytest.mark.forked dependency from Django integration tests","articleBody":"## Background\n\nThe Django integration test suite uses `@pytest.mark.forked` (via `pytest-forked`) on 52 tests across 5 files to isolate global state. This dates back to #522 (\"Less boxed testing\") and was a pragmatic substitute for proper teardown.\n\n## Problem\n\n`pytest-forked` is actively harmful in some scenarios:\n\n- **Python 3.12 + asyncio + GitHub Actions:** Forking a multi-threaded process and then running an asyncio loop in the child causes silent hangs (the loop inherits dead threads). This consumed the full 30-minute CI budget on the Django ASGI tests until #6410 dropped `forked` from those 10 tests.\n- **Slow:** Fork-per-test multiplies suite runtime.\n- **Hides real isolation bugs:** Tests pass under fork but would fail under proper sequential execution, masking integration setup that isn't idempotent.\n\n## Goal\n\nRemove `@pytest.mark.forked` from every test under `tests/integrations/django/` and replace it with explicit isolation.\n\n## Proposed approach\n\n1. Extend (or autouse-wrap) the `sentry_init` fixture so the non-forked path also resets:\n   - `sentry_sdk.integrations._processed_integrations`\n   - `sentry_sdk.integrations._installed_integrations`\n2. Add a `reset_django_state` fixture that snapshots and restores:\n   - `settings.MIDDLEWARE`\n   - Django signal receivers (`request_started`, `request_finished`, etc.)\n   - Anything else `DjangoIntegration.setup_once` connects\n3. Audit `DjangoIntegration.setup_once` (and submodule patches under `sentry_sdk/integrations/django/`) for non-idempotent module-level patching.\n4. Migrate test files one at a time: drop the marker, run, fix the resulting leaks, repeat.\n\n## Current state\n\nFiles still using `@pytest.mark.forked` under `tests/integrations/django/` (count via `grep -rc`):\n\n- `test_basic.py` (13)\n- `test_cache_module.py` (14)\n- `test_db_query_data.py` (10)\n- `test_db_transactions.py` (12)\n- `test_data_scrubbing.py` (3)\n\nThe ASGI subset (`tests/integrations/django/asgi/test_asgi.py`) was removed in #6410.","author":{"url":"https://github.com/sl0thentr0py","@type":"Person","name":"sl0thentr0py"},"datePublished":"2026-05-26T13:08:32Z","url":"https://github.com/getsentry/sentry-python/issues/6411"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c1520903-7b14-b3ad-2856-ce8c986afebb
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE464:34D742:40F9A9:57C225:6B008D31
html-safe-nonce21a7a7d228b2f8c4d1e4f30d7e27bc218ba05d1a32abd72849ded4f244e1e312
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDY0OjM0RDc0Mjo0MEY5QTk6NTdDMjI1OjZCMDA4RDMxIiwidmlzaXRvcl9pZCI6IjQxNzI5NDEzMDI2MTYzMjk1MjEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac6f3b00d2bb26bb947f6cb9dc311685b9ca6edf29bcee14d71b8f994c95576cd7
hovercard-subject-tagissue:4524344742
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/getsentry/sentry-python/6411/issue_layout
twitter:imagehttps://opengraph.githubassets.com/6f94e65a143cb76e441956b5b4a7e5346f4fc5a83fcbbfde2bbc09dc72ab56fc/getsentry/sentry-python/issues/6411
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/6f94e65a143cb76e441956b5b4a7e5346f4fc5a83fcbbfde2bbc09dc72ab56fc/getsentry/sentry-python/issues/6411
og:image:altBackground The Django integration test suite uses @pytest.mark.forked (via pytest-forked) on 52 tests across 5 files to isolate global state. This dates back to #522 ("Less boxed testing") and was ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesl0thentr0py
hostnamegithub.com
expected-hostnamegithub.com
Nonec710a5cb5c47be60abfe6e8410436d409906979dbed614ef09f29c60f5535b08
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-python git https://github.com/getsentry/sentry-python.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id137814779
octolytics-dimension-repository_nwogetsentry/sentry-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id137814779
octolytics-dimension-repository_network_root_nwogetsentry/sentry-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
releasebe616a2a6ec1c609d6e002896dff5352d5c5f28b
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-python/issues/6411#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fissues%2F6411
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%2Fgetsentry%2Fsentry-python%2Fissues%2F6411
Sign uphttps://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=getsentry%2Fsentry-python
Reloadhttps://github.com/getsentry/sentry-python/issues/6411
Reloadhttps://github.com/getsentry/sentry-python/issues/6411
Reloadhttps://github.com/getsentry/sentry-python/issues/6411
getsentryhttps://github.com/getsentry
sentry-pythonhttps://github.com/getsentry/sentry-python
Codehttps://github.com/getsentry/sentry-python
Issues345 (345)https://github.com/getsentry/sentry-python/issues
Pull requests41 (41)https://github.com/getsentry/sentry-python/pulls
Discussionshttps://github.com/getsentry/sentry-python/discussions
Actionshttps://github.com/getsentry/sentry-python/actions
Security and quality2 (2)https://github.com/getsentry/sentry-python/security
Insightshttps://github.com/getsentry/sentry-python/insights
https://github.com/getsentry/sentry-python
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-python/issues/6411
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-python/issues/6411
test(django): Remove @pytest.mark.forked dependency from Django integration testshttps://github.com/getsentry/sentry-python/issues/6411#top
PythonSDKhttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Python%22
Testshttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Tests%22
https://github.com/sl0thentr0py
sl0thentr0pyhttps://github.com/sl0thentr0py
on May 26, 2026https://github.com/getsentry/sentry-python/issues/6411#issue-4524344742
#522https://github.com/getsentry/sentry-python/pull/522
test(django): Remove forking in ASGI tests #6410https://github.com/getsentry/sentry-python/pull/6410
#6410https://github.com/getsentry/sentry-python/pull/6410
https://github.com/apps/linear-code
linear-codehttps://github.com/apps/linear-code
on May 26, 2026https://github.com/getsentry/sentry-python/issues/6411#issuecomment-4544282393
Linear Codehttps://linear.app
PY-2493https://linear.app/getsentry/issue/PY-2493
sl0thentr0pyhttps://github.com/sl0thentr0py
on May 26, 2026https://github.com/getsentry/sentry-python/issues/6411#event-25967825933
Remove as many forked tests as possible #4538https://github.com/getsentry/sentry-python/issues/4538
dingsdaxhttps://github.com/dingsdax
PythonSDKhttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Python%22
Testshttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Tests%22
on Jun 1, 2026https://github.com/getsentry/sentry-python/issues/6411#event-26193944228
https://github.com/IgorGanapolsky
IgorGanapolskyhttps://github.com/IgorGanapolsky
on Jul 24, 2026https://github.com/getsentry/sentry-python/issues/6411#issuecomment-5072024337
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Jul 24, 2026https://github.com/getsentry/sentry-python/issues/6411#event-28446282392
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Jul 24, 2026https://github.com/getsentry/sentry-python/issues/6411#event-28446535664
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Jul 24, 2026https://github.com/getsentry/sentry-python/issues/6411
sentrivanahttps://github.com/sentrivana
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Jul 27, 2026https://github.com/getsentry/sentry-python/issues/6411#event-28523720585
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Jul 27, 2026https://github.com/getsentry/sentry-python/issues/6411
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-python/issues/6411
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-python/issues/6411
PythonSDKhttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Python%22
Testshttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Tests%22
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
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.