Skip to content
Snippets Groups Projects
Unverified Commit e70e6c7d authored by Gilbert Gilb's's avatar Gilbert Gilb's Committed by GitHub
Browse files

fix(manager/pip_setup): support namespaced packages (#19736)

parent 27768c4b
No related branches found
No related tags found
No related merge requests found
......@@ -78,6 +78,7 @@ setup(
'raven>=5.27.1,<7.0', # pyup: nothing
'future>=0.15.2,<0.17',
'ipaddress>=1.0.16,<2.0;python_version<"3.3"',
'zope.interface>=5.5.2,<6.0.0',
],
keywords=[
'talisker',
......
......@@ -124,6 +124,14 @@ exports[`modules/manager/pip_setup/extract extractPackageFile() returns found de
"lineNumber": 79,
},
},
{
"currentValue": ">=5.5.2,<6.0.0",
"datasource": "pypi",
"depName": "zope.interface",
"managerData": {
"lineNumber": 80,
},
},
],
}
`;
......@@ -32,6 +32,7 @@ describe('modules/manager/pip_setup/extract', () => {
{ depName: 'raven', currentValue: '>=5.27.1,<7.0' },
{ depName: 'future', currentValue: '>=0.15.2,<0.17' },
{ depName: 'ipaddress', currentValue: '>=1.0.16,<2.0' },
{ depName: 'zope.interface', currentValue: '>=5.5.2,<6.0.0' },
],
});
});
......
......@@ -19,7 +19,7 @@ function cleanupNamedGroups(regexSource: string): string {
const rangePattern = cleanupNamedGroups(RANGE_PATTERN);
const versionPattern = `(?:${rangePattern}(?:\\s*,\\s*${rangePattern})*)`;
const depNamePattern = '(?:[a-zA-Z][-_a-zA-Z0-9]*[a-zA-Z0-9])';
const depNamePattern = '(?:[a-zA-Z][-_a-zA-Z0-9\\.]*[a-zA-Z0-9])';
const depPattern = [
'^',
`(?<depName>${depNamePattern})`,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment