From 17454be4afc987ef837fd62078f078ffca292a95 Mon Sep 17 00:00:00 2001 From: Riccardo Albertazzi Date: Sat, 10 Jun 2023 13:36:38 +0200 Subject: [PATCH] perf: remove unnecessary deepcopy (#8031) --- src/poetry/repositories/repository.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/poetry/repositories/repository.py b/src/poetry/repositories/repository.py index c9dd4b85969..5211a4a204b 100644 --- a/src/poetry/repositories/repository.py +++ b/src/poetry/repositories/repository.py @@ -115,6 +115,6 @@ def package( canonicalized_name = canonicalize_name(name) for package in self.packages: if canonicalized_name == package.name and package.version == version: - return package.clone() + return package raise PackageNotFound(f"Package {name} ({version}) not found.")