You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In commit 6015632, the package_index.py file's imports were changed. A direct import of urllib was replaced with a "from setuptools.compat import ( ..." statement. This was all fine and good for most of the file, but a few things got missed.
Specifically, the _vcs_split_rev_from_url method of PackageIndex contains a reference to urlsplit and urlunsplit. These references were formerly qualified with "urllib." prior to the commit, but after the commit were left unqualified ... and without imports from setuptools.compat.
The end-user affect of this is that if you include a URL in the dependency_links section of your setup call (a git URL with a revision and egg name, in my instance), setuptools is likely to puke on it.
Should be a simple fix: Just import those functions. But given the nature of this bug, someone might want to go back over that entire commit carefully to make sure no other similar bugs were introduced. (And if someone added a test case for the dependency_links feature with a complex VCS url, I certainly wouldn't complain. ;-) )
Original comment byjaraco (Bitbucket: jaraco, GitHub: jaraco):
As suggested, in addition to the simple fix, I've extended the tests (acc09758ac3f) and improved the ability of a linter to detect these errors (fe4fc0aa26b4).
Originally reported by: Anonymous
In commit 6015632, the package_index.py file's imports were changed. A direct import of urllib was replaced with a "from setuptools.compat import ( ..." statement. This was all fine and good for most of the file, but a few things got missed.
Specifically, the _vcs_split_rev_from_url method of PackageIndex contains a reference to urlsplit and urlunsplit. These references were formerly qualified with "urllib." prior to the commit, but after the commit were left unqualified ... and without imports from setuptools.compat.
The end-user affect of this is that if you include a URL in the dependency_links section of your setup call (a git URL with a revision and egg name, in my instance), setuptools is likely to puke on it.
Should be a simple fix: Just import those functions. But given the nature of this bug, someone might want to go back over that entire commit carefully to make sure no other similar bugs were introduced. (And if someone added a test case for the dependency_links feature with a complex VCS url, I certainly wouldn't complain. ;-) )
The text was updated successfully, but these errors were encountered: