Skip to content

Commit e866fee

Browse files
committed
Fix dependency:licenses to correctly parse exceptional names
1 parent d7c33bb commit e866fee

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

doc/changes/unreleased.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@
55
## ✨ Features
66

77
* #426: Allowed configuring the python version used for coverage
8+
9+
## Bugfixes
10+
11+
* #463: Fixed dependency:licenses to correctly parse exceptional names

exasol/toolbox/util/dependencies/poetry_dependencies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class PoetryDependencies(BaseModel):
8585

8686
@staticmethod
8787
def _extract_from_line(line: str) -> Package:
88-
pattern = r"\s+(\d+(?:\.\d+)*)\s+"
88+
pattern = r"\s+(\d+(?:\.\S+)*)"
8989
match = re.split(pattern, line)
9090
return Package(name=match[0], version=match[1]) #
9191

test/unit/util/dependencies/poetry_dependencies_test.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ class TestPoetryDependencies:
9595
"import-linter 2.3 Enforces rules for the imports within and between Python packages.",
9696
Package(name="import-linter", version="2.3"),
9797
),
98+
(
99+
"python-dateutil 2.9.0.post0 Extensions to the standard Python datetime module",
100+
Package(name="python-dateutil", version="2.9.0.post0"),
101+
),
102+
(
103+
"types-requests 2.32.0.20250602",
104+
Package(name="types-requests", version="2.32.0.20250602"),
105+
),
98106
],
99107
)
100108
def test_extract_from_line(line, expected):

0 commit comments

Comments
 (0)