Skip to content

Comments

Simplify/improve Package.clone()#159

Merged
sdispater merged 1 commit intopython-poetry:masterfrom
0xDEC0DE:issue/2422
Apr 29, 2021
Merged

Simplify/improve Package.clone()#159
sdispater merged 1 commit intopython-poetry:masterfrom
0xDEC0DE:issue/2422

Conversation

@0xDEC0DE
Copy link
Contributor

@0xDEC0DE 0xDEC0DE commented Apr 7, 2021

Downstream clients (e.g., poetry) appear to assume that the result of a Package.clone() will be a full-fidelity copy of the original.

Use copy.deepcopy to clone the object, and ensure that this is the case.

Resolves: python-poetry/poetry#2422
Replaces: python-poetry/poetry#2611

  • [✅] Added tests for changed code.
  • [✅] Updated documentation for changed code.

Downstream clients (e.g., poetry) appear to assume that the result
of a Package.clone() will be a full-fidelity copy of the original.

Use `copy.deepcopy` to clone the object, and ensure that this is
the case.

Resolves Issue #2422
Copy link
Member

@sdispater sdispater left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good to me 👍

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.

poetry.lock hashes not checked when running poetry install

3 participants