• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

malcolmgreaves / pywise
89%
main: 95%

Build:
Build:
LAST BUILD BRANCH: dependabot/pip/certifi-2024.7.4
DEFAULT BRANCH: main
Repo Added 26 Jun 2020 03:25AM UTC
Files 13
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH 0.3.0
branch: 0.3.0
CHANGE BRANCH
x
Reset
  • 0.3.0
  • 0.1.1
  • 0.1.2
  • 0.2.0
  • 0.3.1
  • main
  • master
  • mg/dont_serialize_none
  • mg/fix_gen
  • mg/flatten
  • mg/fp_module
  • mg/handle_generic_dataclasses
  • mg/iter
  • mg/propigate_custom_serialize_deserialize
  • mg/update_type_name
  • mg_trav_up

pending completion
86

push

travis-ci

web-flow
Enable deserialization support for dataclasses with generic types (#5)

Upgrades `deserialize` (and `serialize`) to handle @dataclass types parameterized with generics. Under the hood, the new `_align_generic_concrete`, `_fill`, and `_exec` functions in the `serialization` module handle reifying the parameterized type information at runtime. These new functions modify `_dataclass_field_types` to properly support "filling-in" the generic "holes" and output fully specified types. Extensive tests have been added to explicitly test deserialization from generic @dataclass types, including a very deeply nested example.

Note that it's not possible to support generics in `NamedTuple` deriving types. I.e. if given `class X(NamedTuple,Generic[T]):...` then `X[int]` is an invalid expression in Python. Since such expressions cannot be used, it's not possible to parametrize the generic types and thus it is not possible to gather reified type information at runtime.

This is a major API change: pre `1.x.x` rules dictate a minor version bump to `0.3.0`.

311 of 348 relevant lines covered (89.37%)

1.79 hits per line

Relevant lines Covered
Build:
Build:
348 RELEVANT LINES 311 COVERED LINES
1.79 HITS PER LINE
Source Files on 0.3.0
  • Tree
  • List 6
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
86 0.3.0 Enable deserialization support for dataclasses with generic types (#5) Upgrades `deserialize` (and `serialize`) to handle @dataclass types parameterized with generics. Under the hood, the new `_align_generic_concrete`, `_fill`, and `_exec` functi... push 09 Sep 2020 06:23AM UTC web-flow travis-ci pending completion  
See All Builds (94)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc