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

fix: Resolve Then copy TypeError #3553

Merged
merged 1 commit into from
Aug 25, 2024
Merged

Conversation

dangotbanned
Copy link
Member

@dangotbanned dangotbanned commented Aug 21, 2024

Fixes


I originally thought #3543 introduced this regression.

Haven't tested on earlier branches, but @mattijn can you check if you can repro on v5.4.0?
I think it would be present on there as well

Copy link
Contributor

@joelostblom joelostblom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this @dangotbanned. I tried it out and as you mentioned, the error is raised on 5.4.0 as well. In fact, it is present all the way back to the commit that merged #3427, so it seems to have been there since the new alt.when functionality was added.

The fix here looks good to me 👍

@dangotbanned
Copy link
Member Author

Thanks for fixing this @dangotbanned. I tried it out and as you mentioned, the error is raised on 5.4.0 as well. In fact, it is present all the way back to the commit that merged #3427, so it seems to have been there since the new alt.when functionality was added.

The fix here looks good to me 👍

Thanks for the review @joelostblom

For anyone searching in the future, what I added is a very basic implementation of copy.deepcopy.
Which has a memo parameter, and that is why Then.__deepcopy__ does as well.

https://github.com/python/cpython/blob/74ff496dce9f7db1dd1e2184d4316cc21d78ee52/Lib/copy.py#L119-L179

@dangotbanned dangotbanned merged commit bf7fc29 into vega:main Aug 25, 2024
17 checks passed
@dangotbanned dangotbanned deleted the fix-then-copy branch August 25, 2024 14:11
dangotbanned added a commit that referenced this pull request Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants