Skip to content

Commit 215ac7b

Browse files
committed
Fix compatibility with 2.1
Extras are no longer provided as a parameter to the package method (in several repository types, including LegacyRepository). See python-poetry/poetry#10114
1 parent 069518e commit 215ac7b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/poetry_plugin_pypi_mirror/plugins.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,12 @@ def __init__(
9696
# To work around this, we extend LegacyRepository. The extended version
9797
# drops source URL information from packages attributed to the repository,
9898
# preventing that source information from being included in the lockfile.
99-
def package(
100-
self, name: str, version: Version, extras: list[str] | None = None
101-
) -> Package:
99+
def package(self, name: str, version: Version) -> Package:
102100
try:
103101
index = self._packages.index(Package(name, version))
104102
package = self._packages[index]
105103
except ValueError:
106-
package = super().package(name, version, extras)
104+
package = super().package(name, version)
107105
# It is a bit uncomfortable for this plugin to be modifying an internal
108106
# attribute of the package object. That said, the parent class does the
109107
# same thing (although it's not released independently like this plugin

0 commit comments

Comments
 (0)