René's URL Explorer Experiment


Title: fix: reconstruct dataclasses with derived fields by Shubham-Padkonde · Pull Request #283 · microsoft/durabletask-python · GitHub

Open Graph Title: fix: reconstruct dataclasses with derived fields by Shubham-Padkonde · Pull Request #283 · microsoft/durabletask-python

X Title: fix: reconstruct dataclasses with derived fields by Shubham-Padkonde · Pull Request #283 · microsoft/durabletask-python

Description: Dataclasses with field(init=False) serialize successfully, but passing those fields to a generated constructor raises TypeError and makes JsonDataConverter return a dictionary. Omitting every non-init field also loses persisted state when a handwritten constructor accepts that field: a saved counter of 42 can be restored and written back as 0. During reconstruction, omit non-init fields only when the actual initializer cannot accept them as keywords. Preserve and recursively convert values accepted by explicit keyword parameters or **kwargs. Keep the existing behavior for regular constructor fields and unavailable signatures. Cache signature inspection by initializer callable with a bounded cache, and leave generated/frozen dataclass initialization to the constructor. Constructors are called once, without retries or subsequent attribute restoration. Document when non-init values can be reset, recomputed, or left unset, the need for deterministic initialization during replay, and the explicit from_json() option for preserving state that the initializer cannot accept. Validation on Windows / Python 3.14: 210 serialization, converter, round-trip, type-discovery, and entity-executor tests passed, including typed StateShim read/write regressions for saved counter values and coverage for explicit keywords, **kwargs, nested coercion, initializer binding, unavailable signatures, and constructor side effects. The custom-constructor regressions reproduce the persisted-state loss before this follow-up; existing generated, frozen, and nested dataclass regressions remain covered. Flake8 and strict Pyright passed. Pyright targets Python 3.10. The codec subset also passed all 102 tests on Python 3.10; its full suite could not run because the local environment lacks google.protobuf. Remote service integration tests were not run. Developed and tested with AI assistance.

Open Graph Description: Dataclasses with field(init=False) serialize successfully, but passing those fields to a generated constructor raises TypeError and makes JsonDataConverter return a dictionary. Omitting every non-i...

X Description: Dataclasses with field(init=False) serialize successfully, but passing those fields to a generated constructor raises TypeError and makes JsonDataConverter return a dictionary. Omitting every non-i...

Opengraph URL: https://github.com/microsoft/durabletask-python/pull/283

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:64ba0919-06cb-f624-8a6f-ab8b4c266523
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA60E:1381B5:BDDAE:FA199:6AFE2E7C
html-safe-noncedf85f4ebdbf6f325b635bbf6873c2fdd211da7b9fa780609fefbfa4564259bf3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjBFOjEzODFCNTpCRERBRTpGQTE5OTo2QUZFMkU3QyIsInZpc2l0b3JfaWQiOiI4OTQ5OTgzMTQ5NjIyNzAxNjkyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac4990e552f0aaf9d48499a694b2b1c36a078aa90b50abf7b93c4ce1e54c03cb15
hovercard-subject-tagpull_request:4733749504
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/microsoft/durabletask-python/pull/283/files
twitter:imagehttps://avatars.githubusercontent.com/u/177908686?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/177908686?s=400&v=4
og:image:altDataclasses with field(init=False) serialize successfully, but passing those fields to a generated constructor raises TypeError and makes JsonDataConverter return a dictionary. Omitting every non-i...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonee973f9ec3625f3faad8cac5c2d11a214b7ffe45f3cc563b828459b290ecaeed3
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/microsoft/durabletask-python git https://github.com/microsoft/durabletask-python.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id627664515
octolytics-dimension-repository_nwomicrosoft/durabletask-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id627664515
octolytics-dimension-repository_network_root_nwomicrosoft/durabletask-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
release1f92c367595b9190e0be293896078033886b1913
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoft/durabletask-python/pull/283/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fdurabletask-python%2Fpull%2F283%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%2Fmicrosoft%2Fdurabletask-python%2Fpull%2F283%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=microsoft%2Fdurabletask-python
Reloadhttps://github.com/microsoft/durabletask-python/pull/283/files
Reloadhttps://github.com/microsoft/durabletask-python/pull/283/files
Reloadhttps://github.com/microsoft/durabletask-python/pull/283/files
microsofthttps://github.com/microsoft
durabletask-pythonhttps://github.com/microsoft/durabletask-python
Codehttps://github.com/microsoft/durabletask-python
Issues15 (15)https://github.com/microsoft/durabletask-python/issues
Pull requests12 (12)https://github.com/microsoft/durabletask-python/pulls
Actionshttps://github.com/microsoft/durabletask-python/actions
Projectshttps://github.com/microsoft/durabletask-python/projects
Security and qualityhttps://github.com/microsoft/durabletask-python/security
Insightshttps://github.com/microsoft/durabletask-python/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fmicrosoft%2Fdurabletask-python%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fmicrosoft%2Fdurabletask-python%2Fissues%2Fnew%2Fchoose
Bernd Verst (berndverst)https://github.com/berndverst
microsoft:mainhttps://github.com/microsoft/durabletask-python/tree/main
Shubham-Padkonde:fix/dataclass-derived-fieldshttps://github.com/Shubham-Padkonde/durabletask-python/tree/fix/dataclass-derived-fields
Conversation 6 https://github.com/microsoft/durabletask-python/pull/283
Commits 6 https://github.com/microsoft/durabletask-python/pull/283/commits
Checks 26 https://github.com/microsoft/durabletask-python/pull/283/checks
Files changed https://github.com/microsoft/durabletask-python/pull/283/files
Please reload this pagehttps://github.com/microsoft/durabletask-python/pull/283/files
fix: reconstruct dataclasses with derived fields https://github.com/microsoft/durabletask-python/pull/283/files#top
Show all changes 6 commits https://github.com/microsoft/durabletask-python/pull/283/files
266bd6b fix: reconstruct dataclasses with derived fields Shubham-Padkonde Oct 4, 2026 https://github.com/microsoft/durabletask-python/pull/283/commits/266bd6b82220f617e05392a5a5386ed71fa958f0
e416111 fix: preserve non-init state accepted by custom constructors Shubham-Padkonde Oct 5, 2026 https://github.com/microsoft/durabletask-python/pull/283/commits/e416111ab48828157c9a61c2b011342844fced55
30a1b67 Merge main and preserve dataclass changelog entry Shubham-Padkonde Oct 6, 2026 https://github.com/microsoft/durabletask-python/pull/283/commits/30a1b67e04d9d46c7daab711e0932772f5dec901
9ce0cb7 Merge branch 'main' into fix/dataclass-derived-fields berndverst Oct 6, 2026 https://github.com/microsoft/durabletask-python/pull/283/commits/9ce0cb7268969ae3fb704a4bd966449a5b721ddd
b8f0bbc fix: inspect decorated dataclass initializer signatures Shubham-Padkonde Oct 7, 2026 https://github.com/microsoft/durabletask-python/pull/283/commits/b8f0bbc6ec409ce2327594bddb62b1c59af21749
e3c3b23 Merge branch 'main' into fix/dataclass-derived-fields berndverst Oct 12, 2026 https://github.com/microsoft/durabletask-python/pull/283/commits/e3c3b23703113383f54661e39b5ae05501341a0c
Clear filters https://github.com/microsoft/durabletask-python/pull/283/files
Please reload this pagehttps://github.com/microsoft/durabletask-python/pull/283/files
Please reload this pagehttps://github.com/microsoft/durabletask-python/pull/283/files
CHANGELOG.md https://github.com/microsoft/durabletask-python/pull/283/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
serialization.py https://github.com/microsoft/durabletask-python/pull/283/files#diff-f49463ca38a9f81ee6f796dd29945e39d02d04b184442d8891b40a9dd3bc010b
test_data_converter.py https://github.com/microsoft/durabletask-python/pull/283/files#diff-b929229a906514c493c39390efbd3c7fb158243712c98b40a48870a08d4a0753
CHANGELOG.mdhttps://github.com/microsoft/durabletask-python/pull/283/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
View file https://github.com/Shubham-Padkonde/durabletask-python/blob/e3c3b23703113383f54661e39b5ae05501341a0c/CHANGELOG.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/durabletask-python/pull/283/{{ revealButtonHref }}
https://github.com/microsoft/durabletask-python/pull/283/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
https://github.com/microsoft/durabletask-python/pull/283/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
durabletask/serialization.pyhttps://github.com/microsoft/durabletask-python/pull/283/files#diff-f49463ca38a9f81ee6f796dd29945e39d02d04b184442d8891b40a9dd3bc010b
View file https://github.com/Shubham-Padkonde/durabletask-python/blob/e3c3b23703113383f54661e39b5ae05501341a0c/durabletask/serialization.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/durabletask-python/pull/283/{{ revealButtonHref }}
https://github.com/microsoft/durabletask-python/pull/283/files#diff-f49463ca38a9f81ee6f796dd29945e39d02d04b184442d8891b40a9dd3bc010b
https://github.com/microsoft/durabletask-python/pull/283/files#diff-f49463ca38a9f81ee6f796dd29945e39d02d04b184442d8891b40a9dd3bc010b
https://github.com/microsoft/durabletask-python/pull/283/files#diff-f49463ca38a9f81ee6f796dd29945e39d02d04b184442d8891b40a9dd3bc010b
https://github.com/microsoft/durabletask-python/pull/283/files#diff-f49463ca38a9f81ee6f796dd29945e39d02d04b184442d8891b40a9dd3bc010b
https://github.com/microsoft/durabletask-python/pull/283/files#diff-f49463ca38a9f81ee6f796dd29945e39d02d04b184442d8891b40a9dd3bc010b
tests/durabletask/test_data_converter.pyhttps://github.com/microsoft/durabletask-python/pull/283/files#diff-b929229a906514c493c39390efbd3c7fb158243712c98b40a48870a08d4a0753
View file https://github.com/Shubham-Padkonde/durabletask-python/blob/e3c3b23703113383f54661e39b5ae05501341a0c/tests/durabletask/test_data_converter.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/durabletask-python/pull/283/{{ revealButtonHref }}
https://github.com/microsoft/durabletask-python/pull/283/files#diff-b929229a906514c493c39390efbd3c7fb158243712c98b40a48870a08d4a0753
https://github.com/microsoft/durabletask-python/pull/283/files#diff-b929229a906514c493c39390efbd3c7fb158243712c98b40a48870a08d4a0753
https://github.com/microsoft/durabletask-python/pull/283/files#diff-b929229a906514c493c39390efbd3c7fb158243712c98b40a48870a08d4a0753
Please reload this pagehttps://github.com/microsoft/durabletask-python/pull/283/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.