X Tutup
Skip to content

Fix Path deepcopy signature#6877

Merged
tacaswell merged 1 commit intomatplotlib:masterfrom
has2k1:fix-deepcopy
Aug 3, 2016
Merged

Fix Path deepcopy signature#6877
tacaswell merged 1 commit intomatplotlib:masterfrom
has2k1:fix-deepcopy

Conversation

@has2k1
Copy link
Copy Markdown
Contributor

@has2k1 has2k1 commented Aug 1, 2016

Problem

Path.__deepcopy__ does not accept a second(memo) parameter,
so the common usage of the deepcopy function fails.

Solution

Add second parameter.

@dopplershift
Copy link
Copy Markdown
Contributor

dopplershift commented Aug 2, 2016

👍 For anyone else wanting more information on __deepcopy__ see: https://docs.python.org/3.5/library/copy.html?highlight=__deepcopy__

I don't think any of the tests failures were related--I restarted the failing Travis jobs to confirm. Can someone restart the AppVeyor job?

@tacaswell tacaswell added this to the 2.0.1 (next bug fix release) milestone Aug 2, 2016
@tacaswell
Copy link
Copy Markdown
Member

https://docs.python.org/3.5/library/copy.html?highlight=__deepcopy__ <- fixed the link for you 👿

Do we need to do anything with memo?

@has2k1
Copy link
Copy Markdown
Contributor Author

has2k1 commented Aug 2, 2016

memo is to deal any circular stuff. Since the class is offloads the copying of the relevant structures to numpy, then memo can be safely ignored.

However, hold on this until I can fix another issue with the copy. I am not in position to do so at the moment.

@dopplershift
Copy link
Copy Markdown
Contributor

@tacaswell What link problem? 😁 I blame Google/Python defaulting to 2.x on the docs when I search.

**Problem**

Path.__deepcopy__ does not accept a second(`memo`) parameter,
so the common usage of the `deepcopy` function fails.

**Solution**

Add second parameter. While at it, also take care of the case
of copying the `Path` without codes.
@has2k1
Copy link
Copy Markdown
Contributor Author

has2k1 commented Aug 3, 2016

Okay. I fixed the other issue of not being able to deecopy if the path had no codes.

@tacaswell tacaswell merged commit 3f7e675 into matplotlib:master Aug 3, 2016
tacaswell added a commit that referenced this pull request Aug 3, 2016
FIX: Path deepcopy signature
@tacaswell
Copy link
Copy Markdown
Member

Backported to v2.x as b338a71

@has2k1 Thanks!

@QuLogic QuLogic modified the milestones: 2.0 (style change major release), 2.0.1 (next bug fix release) Aug 3, 2016
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.

5 participants

X Tutup