Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support cyclic references #138

Merged
merged 3 commits into from
Nov 9, 2024
Merged

Conversation

dlenski
Copy link
Contributor

@dlenski dlenski commented Nov 9, 2024

Rebased old branch https://github.com/rnag/dataclass-wizard/tree/WIP-support-cyclic-references (from #62) onto main

Added 22060e6 to ensure that RecursiveClassError isn't shown in misleading cases.

rnag and others added 3 commits November 8, 2024 20:57
@rnag
Copy link
Owner

rnag commented Nov 9, 2024

@dlenski Thanks for your work on this! I’ve been wanting to add support for cyclic references myself, but ran out of time.

Since all tests look good, I’ll go ahead and merge this into the main branch. I’ll include these changes along with my updates in #139 for the next minor release, v0.27.0.

Thanks again, and hope your week (or weekend!) is going well.

@rnag rnag merged commit 2a0f487 into rnag:main Nov 9, 2024
8 checks passed
rnag added a commit that referenced this pull request Nov 9, 2024
rnag added a commit that referenced this pull request Nov 10, 2024
* bump

* minor fix

* minor fix

* Add test case to satisfy #89

* Support cyclic references (#138)

* support cyclic or self-referential dataclasses

* update to add custom recursion error

* Don't replace RecursionError with RecursiveClassError if recursion-safe loader is already enabled

If we get a `RecursionError` in this case, something else must have gone wrong

---------

Co-authored-by: Ritvik Nag <[email protected]>

* Update all requirements to latest versions

* Update requirements in requirements-dev.txt and requirements-test.txt to latest

* "When you drop py3.6/7/8, remove everything EXCEPT the py.typed file."

* See [comment](#136 (comment))

* Update tests to support Python 3.9+

* Run tests on CI for PY 3.9+
* `typing_extensions` should be required for Python 3.10 (as well as 3.9)

* Starting to purge PY 3.6, 3.7 and 3.8 support

* Fix `Sphinx` dependency issue

* I realized this was a bug!

* Continue with purge of PY 3.6, 3.7, and 3.8

* Continue with purge of PY 3.6, 3.7, and 3.8

* Continue with purge of PY 3.6, 3.7, and 3.8

* This concludes the purge of PY 3.6, 3.7, and 3.8

* Remove unnecessary code

* Remove unnecessary code

* Update docs to mention cyclic or "recursive" dataclasses

* Update docs to remove `typing.List` mentions

* Update docs to remove `typing.List` mentions

* Update HISTORY.rst

---------

Co-authored-by: Dan Lenski <[email protected]>
@dlenski dlenski deleted the WIP-support-cyclic-references-new branch November 12, 2024 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants