Skip to content
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

Testsuite failed in Python 3.7.2 #153

Closed
Mariatta opened this issue Feb 12, 2019 · 3 comments
Closed

Testsuite failed in Python 3.7.2 #153

Mariatta opened this issue Feb 12, 2019 · 3 comments

Comments

@Mariatta
Copy link
Member

When I run bedevere's test suite in Python 3.7.2, there are failing tests, but I don't know whether the fix is in bedevere or one of the dependencies.

$ python3.7
Python 3.7.2 (v3.7.2:9a3ffc0492, Dec 24 2018, 02:44:43) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
python3.7 -m coverage run --branch -m pytest tests/
=========================================================================================================== test session starts ===========================================================================================================
platform darwin -- Python 3.7.2, pytest-4.2.0, py-1.7.0, pluggy-0.8.1
rootdir: /Users/mariatta/python_github/bedevere, inifile: pytest.ini
plugins: asyncio-0.10.0, aiohttp-0.3.0
collected 128 items                                                                                                                                                                                                                       

tests/test___main__.py ...                                                                                                                                                                                                          [  2%]
tests/test_backport.py ...FFFFF............                                                                                                                                                                                         [ 17%]
tests/test_bpo.py ................................                                                                                                                                                                                  [ 42%]
tests/test_close_pr.py .......                                                                                                                                                                                                      [ 48%]
tests/test_filepaths.py ......                                                                                                                                                                                                      [ 53%]
tests/test_follow_up.py FF.                                                                                                                                                                                                         [ 55%]
tests/test_news.py ........................                                                                                                                                                                                         [ 74%]
tests/test_prtype.py .........                                                                                                                                                                                                      [ 81%]
tests/test_stage.py F.....FFFFF.....                                                                                                                                                                                                [ 93%]
tests/test_util.py ........                                                                                                                                                                                                         [100%]

One of the results:

_______________________________________________________________________________________ test_awaiting_label_removed_when_pr_merged[awaiting review] _______________________________________________________________________________________

label = 'awaiting review'

    @pytest.mark.parametrize("label", awaiting_labels)
    async def test_awaiting_label_removed_when_pr_merged(label):
        encoded_label = label.replace(" ", "%20")
    
        issue_url = "https://api.github.com/repos/org/proj/issues/3749"
        data = {
            "action": "closed",
            "pull_request": {
                "merged": True,
                "issue_url": issue_url,
            }
        }
        event = sansio.Event(data, event="pull_request", delivery_id="12345")
    
        issue_data = {
            issue_url: {
                "labels": [
                    {"url": f"https://api.github.com/repos/python/cpython/labels/{encoded_label}",
                     "name": label,
                     },
                    {
                      "url": "https://api.github.com/repos/python/cpython/labels/CLA%20signed",
                      "name": "CLA signed",
                    },
                ],
                "labels_url": "https://api.github.com/repos/python/cpython/issues/12345/labels{/name}",
            },
        }
    
        gh = FakeGH(getitem=issue_data)
    
>       await awaiting.router.dispatch(event, gh)

tests/test_stage.py:585: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
venv/lib/python3.7/site-packages/gidgethub/routing.py:80: in dispatch
    await callback(event, *args, **kwargs)
bedevere/stage.py:232: in closed_pr
    await _remove_stage_labels(gh, issue)
bedevere/stage.py:120: in _remove_stage_labels
    await gh.delete(issue["labels_url"], {"name": stale_name})
tests/test_stage.py:36: in delete
    self.delete_url = sansio.format_url(url, url_vars)
venv/lib/python3.7/site-packages/gidgethub/sansio.py:341: in format_url
    expanded_url: str = uritemplate.expand(url, var_dict=url_vars)
venv/lib/python3.7/site-packages/uritemplate/api.py:33: in expand
    return URITemplate(uri).expand(var_dict, **kwargs)
venv/lib/python3.7/site-packages/uritemplate/template.py:132: in expand
    return self._expand(_merge(var_dict, kwargs), False)
venv/lib/python3.7/site-packages/uritemplate/template.py:97: in _expand
    expanded.update(v.expand(expansion))
venv/lib/python3.7/site-packages/uritemplate/variable.py:338: in expand
    expanded = expansion(name, value, opts['explode'], opts['prefix'])
venv/lib/python3.7/site-packages/uritemplate/variable.py:204: in _label_path_expansion
    if dict_test(value) or tuples:
venv/lib/python3.7/site-packages/uritemplate/variable.py:363: in dict_test
    return isinstance(value, (dict, collections.MutableMapping))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

name = 'MutableMapping'

    def __getattr__(name):
        # For backwards compatibility, continue to make the collections ABCs
        # through Python 3.6 available through the collections module.
        # Note, no new collections ABCs were added in Python 3.7
        if name in _collections_abc.__all__:
            obj = getattr(_collections_abc, name)
            import warnings
            warnings.warn("Using or importing the ABCs from 'collections' instead "
                          "of from 'collections.abc' is deprecated, "
                          "and in 3.8 it will stop working",
>                         DeprecationWarning, stacklevel=2)
E           DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/collections/__init__.py:52: DeprecationWarning
@Mariatta
Copy link
Member Author

Seems like this failed in 3.7.1 too (#154)

@Mariatta
Copy link
Member Author

Seems like issue with uritemplate library. I've made a PR to attempt fixing it python-hyper/uritemplate#41 🤞

@Mariatta
Copy link
Member Author

Closed via #154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant