diff --git a/src/poetry/mixology/version_solver.py b/src/poetry/mixology/version_solver.py index b520737eb70..a61fcf24aa7 100644 --- a/src/poetry/mixology/version_solver.py +++ b/src/poetry/mixology/version_solver.py @@ -113,7 +113,7 @@ def solve(self) -> SolverResult: or raises an error if no such set is available. """ start = time.time() - root_dependency = Dependency(self._root.name, self._root.version) + root_dependency = Dependency(self._root.name, self._root.version, extras=list(self._root.extras)) root_dependency.is_root = True self._add_incompatibility( @@ -121,7 +121,7 @@ def solve(self) -> SolverResult: ) try: - next: str | None = self._root.name + next: str | None = root_dependency.complete_name while next is not None: self._propagate(next) next = self._choose_package_version() diff --git a/src/poetry/puzzle/provider.py b/src/poetry/puzzle/provider.py index dcb890e9318..093f450f828 100644 --- a/src/poetry/puzzle/provider.py +++ b/src/poetry/puzzle/provider.py @@ -834,7 +834,7 @@ def debug(self, message: str, depth: int = 0) -> None: if message.startswith("fact:"): if "depends on" in message: - m = re.match(r"fact: (.+?) depends on (.+?) \((.+?)\)", message) + m = re.match(r"fact: (.+?) depends on ([^() ]+)(.*)", message) if m is None: raise ValueError(f"Unable to parse fact: {message}") m2 = re.match(r"(.+?) \((.+?)\)", m.group(1)) @@ -847,7 +847,7 @@ def debug(self, message: str, depth: int = 0) -> None: message = ( f"fact: {name}{version} " - f"depends on {m.group(2)} ({m.group(3)})" + f"depends on {m.group(2)} ({m.group(3).strip(' ()')})" ) elif " is " in message: message = re.sub(