-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failing tests #29
Comments
On 2017-12-12 02:52:31 -0800, Florian Bergmann wrote:
When running the test suite I get *21* failures:
```bash
python -m test.suite
```
A lot of those come from `TypeError: unhashable type: 'dict'` in `/usr/lib64/python2.7/urlparse.py:176: TypeError`.
Out of curiosity, what other errors do you get?
After digging into this a bit, it seems to be a problem with `def _download_url_builder(binfo, bdep):` in `osc2/fetch.py`: it returns a `tuple` of `(downloadurl, path, {})`.
This is passed into a `MirrorGroup` from `urlgrabber`, which can't handle the tuples:
```python
test/test_fetch.py:423: in test__fetch1
fr = fetcher._fetch(binfo, bdep)
osc2/fetch.py:469: in _fetch
mgroup = CustomMirrorGroup(MirrorUrlOpener(bdep), mirrors=base_urls)
osc2/fetch.py:225: in __init__
super(CustomMirrorGroup, self).__init__(*args, **kwargs)
.venv/lib/python2.7/site-packages/urlgrabber/mirror.py:275: in __init__
self.mirrors.sort(key=estimate, reverse=True)
.venv/lib/python2.7/site-packages/urlgrabber/mirror.py:269: in estimate
speed, fail = _TH.estimate(m['mirror'])
.venv/lib/python2.7/site-packages/urlgrabber/grabber.py:2470: in estimate
host = urlparse.urlsplit(baseurl).netloc.split('@')[-1] or baseurl
```
Changing the tuples for the `mirror` to `urls` will just lead to a chain of consecutive problems, so maybe I am just running the tests wrong or my version of `urlgrabber` is not working with `osc2`?
```python
>>> import urlgrabber
>>> urlgrabber.__version__
'3.10.2'
```
Hmm it works for me with 3.9.1. From where did you get this new urlgrabber
version? Currently, TW ships 3.9.1.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When running the test suite I get 21 failures:
A lot of those come from
TypeError: unhashable type: 'dict'
in/usr/lib64/python2.7/urlparse.py:176: TypeError
.After digging into this a bit, it seems to be a problem with
def _download_url_builder(binfo, bdep):
inosc2/fetch.py
: it returns atuple
of(downloadurl, path, {})
.This is passed into a
MirrorGroup
fromurlgrabber
, which can't handle the tuples:Changing the tuples for the
mirror
tourls
will just lead to a chain of consecutive problems, so maybe I am just running the tests wrong or my version ofurlgrabber
is not working withosc2
?The text was updated successfully, but these errors were encountered: