René's URL Explorer Experiment


Title: fix(serialization): support MutableMapping and MutableSequence container traversal in can_reconstruct by hardikkaurani · Pull Request #354 · microsoft/durabletask-python · GitHub

Open Graph Title: fix(serialization): support MutableMapping and MutableSequence container traversal in can_reconstruct by hardikkaurani · Pull Request #354 · microsoft/durabletask-python

X Title: fix(serialization): support MutableMapping and MutableSequence container traversal in can_reconstruct by hardikkaurani · Pull Request #354 · microsoft/durabletask-python

Description: Summary of Changes Closes #352 While _coerce_generic() and _can_reconstruct() in durabletask/serialization.py support type-directed coercion for dict / Mapping, tuple, and list / Sequence containers, they previously omitted support for collections.abc.MutableMapping and collections.abc.MutableSequence. As a result: converter.can_reconstruct() returned False for annotations such as MutableMapping[str, MyModel] and MutableSequence[MyModel]. Inbound type discovery in type_discovery.activity_input_type and orchestrator_input_type discarded these annotations and returned None, causing activities and orchestrators to receive uncoerced dictionaries and lists instead of typed model instances. Inbound payloads deserialized with target_type=MutableMapping[str, MyModel] or MutableSequence[MyModel] bypassed element-wise coercion. This change: Adds MutableMapping and MutableSequence to _can_reconstruct(), enabling recursive model reconstructability checks when their value or element types are reconstructable. Extends _coerce_generic() to recursively coerce items for MutableMapping and MutableSequence annotations. Adds comprehensive round-trip deserialization, type discovery, and activity executor regression tests for both container types. Documents MutableMapping and MutableSequence container support in durabletask/serialization.py and the core and Azure Managed changelogs. Changes Across Commits Commit 1: fix(serialization): support MutableMapping in can_reconstruct and _coerce_generic Import MutableMapping from collections.abc and add it to _can_reconstruct() and _coerce_generic(). Commit 2: fix(serialization): support MutableSequence in can_reconstruct and _coerce_generic Import MutableSequence from collections.abc and add it to _can_reconstruct() and _coerce_generic(). Commit 3: test(serialization): verify can_reconstruct and deserialization with MutableMapping Add unit tests verifying can_reconstruct() and round-trip deserialization for MutableMapping[str, Model]. Commit 4: test(serialization): verify can_reconstruct and deserialization with MutableSequence Add unit tests verifying can_reconstruct() and round-trip deserialization for MutableSequence[Model]. Commit 5: test(worker): verify type discovery and input reconstruction for MutableMapping and MutableSequence Add worker activity execution tests verifying that activities annotated with MutableMapping[str, Order] and MutableSequence[Order] correctly receive reconstructed dataclass instances. Commit 6: docs(serialization): document MutableMapping and MutableSequence container support Update docstring in durabletask/serialization.py and document the change in CHANGELOG.md and durabletask-azuremanaged/CHANGELOG.md. Verification pytest tests/durabletask/test_serialization.py tests/durabletask/test_type_discovery.py tests/durabletask/test_data_converter_roundtrip.py (191/191 passed) ruff check . (All checks passed)

Open Graph Description: Summary of Changes Closes #352 While _coerce_generic() and _can_reconstruct() in durabletask/serialization.py support type-directed coercion for dict / Mapping, tuple, and list / Sequence container...

X Description: Summary of Changes Closes #352 While _coerce_generic() and _can_reconstruct() in durabletask/serialization.py support type-directed coercion for dict / Mapping, tuple, and list / Sequence container...

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

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:c817e2cf-f6b6-5c1c-1a21-23d70134c80c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9D08:16CE4E:C17444:10F7DCD:6AFE2B83
html-safe-nonce587af59030799e58f84339777d193b6d61bbc7f4c185ee81f322ea8b829f3a26
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RDA4OjE2Q0U0RTpDMTc0NDQ6MTBGN0RDRDo2QUZFMkI4MyIsInZpc2l0b3JfaWQiOiIxNDc5MzE5ODI2Njg5MDQzMzMxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac07124763463dbc0414dab77ac3cda609bcdf38aa91648da268564167f7f5e0e1
hovercard-subject-tagpull_request:5250404909
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/354/files
twitter:imagehttps://avatars.githubusercontent.com/u/224249943?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/224249943?s=400&v=4
og:image:altSummary of Changes Closes #352 While _coerce_generic() and _can_reconstruct() in durabletask/serialization.py support type-directed coercion for dict / Mapping, tuple, and list / Sequence container...
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/354/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fdurabletask-python%2Fpull%2F354%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%2F354%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/354/files
Reloadhttps://github.com/microsoft/durabletask-python/pull/354/files
Reloadhttps://github.com/microsoft/durabletask-python/pull/354/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
Hardik K (hardikkaurani)https://github.com/hardikkaurani
microsoft:mainhttps://github.com/microsoft/durabletask-python/tree/main
hardikkaurani:fix/mutable-mapping-sequence-reconstructionhttps://github.com/hardikkaurani/durabletask-python/tree/fix/mutable-mapping-sequence-reconstruction
Conversation 4 https://github.com/microsoft/durabletask-python/pull/354
Commits 6 https://github.com/microsoft/durabletask-python/pull/354/commits
Checks 1 https://github.com/microsoft/durabletask-python/pull/354/checks
Files changed https://github.com/microsoft/durabletask-python/pull/354/files
Please reload this pagehttps://github.com/microsoft/durabletask-python/pull/354/files
fix(serialization): support MutableMapping and MutableSequence container traversal in can_reconstruct https://github.com/microsoft/durabletask-python/pull/354/files#top
Show all changes 6 commits https://github.com/microsoft/durabletask-python/pull/354/files
a5c2038 fix(serialization): support MutableMapping in can_reconstruct and _co… hardikkaurani Nov 10, 2026 https://github.com/microsoft/durabletask-python/pull/354/commits/a5c20381af32f12ea79bb331716ce3a262f508ab
aeab5a0 fix(serialization): support MutableSequence in can_reconstruct and _c… hardikkaurani Nov 10, 2026 https://github.com/microsoft/durabletask-python/pull/354/commits/aeab5a050941f9c3bed8365feacee552daf8f55e
8f51fba test(serialization): verify can_reconstruct and deserialization with … hardikkaurani Nov 10, 2026 https://github.com/microsoft/durabletask-python/pull/354/commits/8f51fba3a715dfbc8f6da4fd4850e5b8e95713dc
f845be3 test(serialization): verify can_reconstruct and deserialization with … hardikkaurani Nov 10, 2026 https://github.com/microsoft/durabletask-python/pull/354/commits/f845be33d02613930e38af1f158d9746a345ee51
2cc6303 test(worker): verify type discovery and input reconstruction for Muta… hardikkaurani Nov 10, 2026 https://github.com/microsoft/durabletask-python/pull/354/commits/2cc6303f898ef48ed2fc29827310a2385ef464ff
b089cf1 docs(serialization): document MutableMapping and MutableSequence cont… hardikkaurani Nov 10, 2026 https://github.com/microsoft/durabletask-python/pull/354/commits/b089cf19cc5d64735c069c5f892b10106488c327
Clear filters https://github.com/microsoft/durabletask-python/pull/354/files
Please reload this pagehttps://github.com/microsoft/durabletask-python/pull/354/files
Please reload this pagehttps://github.com/microsoft/durabletask-python/pull/354/files
CHANGELOG.md https://github.com/microsoft/durabletask-python/pull/354/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
CHANGELOG.md https://github.com/microsoft/durabletask-python/pull/354/files#diff-1d1ece375471f083a849ea1b601985661b8bd8e7017fdb7fd5d10e02c4ca69f6
serialization.py https://github.com/microsoft/durabletask-python/pull/354/files#diff-f49463ca38a9f81ee6f796dd29945e39d02d04b184442d8891b40a9dd3bc010b
test_data_converter_roundtrip.py https://github.com/microsoft/durabletask-python/pull/354/files#diff-2dc82948ef83e46e4e07cd2b12d0ff4cebdf151299630947af22299ac6fc451e
test_type_discovery.py https://github.com/microsoft/durabletask-python/pull/354/files#diff-61c92b625a9197ef63e9f0e5b32ab7b7e8f08bba32005ac6eca2fc0613033a39
CHANGELOG.mdhttps://github.com/microsoft/durabletask-python/pull/354/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
View file https://github.com/microsoft/durabletask-python/blob/b089cf19cc5d64735c069c5f892b10106488c327/CHANGELOG.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/durabletask-python/pull/354/{{ revealButtonHref }}
https://github.com/microsoft/durabletask-python/pull/354/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
https://github.com/microsoft/durabletask-python/pull/354/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
https://github.com/microsoft/durabletask-python/pull/354/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
durabletask-azuremanaged/CHANGELOG.mdhttps://github.com/microsoft/durabletask-python/pull/354/files#diff-1d1ece375471f083a849ea1b601985661b8bd8e7017fdb7fd5d10e02c4ca69f6
View file https://github.com/microsoft/durabletask-python/blob/b089cf19cc5d64735c069c5f892b10106488c327/durabletask-azuremanaged/CHANGELOG.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/durabletask-python/pull/354/{{ revealButtonHref }}
https://github.com/microsoft/durabletask-python/pull/354/files#diff-1d1ece375471f083a849ea1b601985661b8bd8e7017fdb7fd5d10e02c4ca69f6
https://github.com/microsoft/durabletask-python/pull/354/files#diff-1d1ece375471f083a849ea1b601985661b8bd8e7017fdb7fd5d10e02c4ca69f6
durabletask/serialization.pyhttps://github.com/microsoft/durabletask-python/pull/354/files#diff-f49463ca38a9f81ee6f796dd29945e39d02d04b184442d8891b40a9dd3bc010b
View file https://github.com/microsoft/durabletask-python/blob/b089cf19cc5d64735c069c5f892b10106488c327/durabletask/serialization.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/durabletask-python/pull/354/{{ revealButtonHref }}
https://github.com/microsoft/durabletask-python/pull/354/files#diff-f49463ca38a9f81ee6f796dd29945e39d02d04b184442d8891b40a9dd3bc010b
https://github.com/microsoft/durabletask-python/pull/354/files#diff-f49463ca38a9f81ee6f796dd29945e39d02d04b184442d8891b40a9dd3bc010b
https://github.com/microsoft/durabletask-python/pull/354/files#diff-f49463ca38a9f81ee6f796dd29945e39d02d04b184442d8891b40a9dd3bc010b
https://github.com/microsoft/durabletask-python/pull/354/files#diff-f49463ca38a9f81ee6f796dd29945e39d02d04b184442d8891b40a9dd3bc010b
https://github.com/microsoft/durabletask-python/pull/354/files#diff-f49463ca38a9f81ee6f796dd29945e39d02d04b184442d8891b40a9dd3bc010b
https://github.com/microsoft/durabletask-python/pull/354/files#diff-f49463ca38a9f81ee6f796dd29945e39d02d04b184442d8891b40a9dd3bc010b
https://github.com/microsoft/durabletask-python/pull/354/files#diff-f49463ca38a9f81ee6f796dd29945e39d02d04b184442d8891b40a9dd3bc010b
https://github.com/microsoft/durabletask-python/pull/354/files#diff-f49463ca38a9f81ee6f796dd29945e39d02d04b184442d8891b40a9dd3bc010b
tests/durabletask/test_data_converter_roundtrip.pyhttps://github.com/microsoft/durabletask-python/pull/354/files#diff-2dc82948ef83e46e4e07cd2b12d0ff4cebdf151299630947af22299ac6fc451e
View file https://github.com/microsoft/durabletask-python/blob/b089cf19cc5d64735c069c5f892b10106488c327/tests/durabletask/test_data_converter_roundtrip.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/durabletask-python/pull/354/{{ revealButtonHref }}
https://github.com/microsoft/durabletask-python/pull/354/files#diff-2dc82948ef83e46e4e07cd2b12d0ff4cebdf151299630947af22299ac6fc451e
https://github.com/microsoft/durabletask-python/pull/354/files#diff-2dc82948ef83e46e4e07cd2b12d0ff4cebdf151299630947af22299ac6fc451e
https://github.com/microsoft/durabletask-python/pull/354/files#diff-2dc82948ef83e46e4e07cd2b12d0ff4cebdf151299630947af22299ac6fc451e
https://github.com/microsoft/durabletask-python/pull/354/files#diff-2dc82948ef83e46e4e07cd2b12d0ff4cebdf151299630947af22299ac6fc451e
tests/durabletask/test_type_discovery.pyhttps://github.com/microsoft/durabletask-python/pull/354/files#diff-61c92b625a9197ef63e9f0e5b32ab7b7e8f08bba32005ac6eca2fc0613033a39
View file https://github.com/microsoft/durabletask-python/blob/b089cf19cc5d64735c069c5f892b10106488c327/tests/durabletask/test_type_discovery.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/durabletask-python/pull/354/{{ revealButtonHref }}
https://github.com/microsoft/durabletask-python/pull/354/files#diff-61c92b625a9197ef63e9f0e5b32ab7b7e8f08bba32005ac6eca2fc0613033a39
https://github.com/microsoft/durabletask-python/pull/354/files#diff-61c92b625a9197ef63e9f0e5b32ab7b7e8f08bba32005ac6eca2fc0613033a39
https://github.com/microsoft/durabletask-python/pull/354/files#diff-61c92b625a9197ef63e9f0e5b32ab7b7e8f08bba32005ac6eca2fc0613033a39
https://github.com/microsoft/durabletask-python/pull/354/files#diff-61c92b625a9197ef63e9f0e5b32ab7b7e8f08bba32005ac6eca2fc0613033a39
https://github.com/microsoft/durabletask-python/pull/354/files#diff-61c92b625a9197ef63e9f0e5b32ab7b7e8f08bba32005ac6eca2fc0613033a39
https://github.com/microsoft/durabletask-python/pull/354/files#diff-61c92b625a9197ef63e9f0e5b32ab7b7e8f08bba32005ac6eca2fc0613033a39
https://github.com/microsoft/durabletask-python/pull/354/files#diff-61c92b625a9197ef63e9f0e5b32ab7b7e8f08bba32005ac6eca2fc0613033a39
https://github.com/microsoft/durabletask-python/pull/354/files#diff-61c92b625a9197ef63e9f0e5b32ab7b7e8f08bba32005ac6eca2fc0613033a39
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.