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

Fix Python 3.8 issue, use separate flake8 pre-commit hook, fix tests #320

Merged
merged 1 commit into from
Mar 5, 2019

Conversation

sjaensch
Copy link
Contributor

@sjaensch sjaensch commented Mar 5, 2019

Starting with Python 3.8 it's not possible to import Mapping from collections, we'll need to use collections.abc as package.

Additionally, I'm introducing the separate flake8 pre-commit hook as well as changing things around pre-commit hook installation slightly to make sure running tox directly also installs them. I've also incorporated the fix from #319 with one slight modification so the tests pass on Python 3.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 98.335% when pulling b9b22c3 on sjaensch:python38-pre-commit-fix-build into 18e3574 on Yelp:master.

@@ -375,7 +373,7 @@ def download(uri):
return response.json()

def read_file(uri):
with closing(urlopen(uri)) as fp:
with open(urlparse(uri).path, mode='rb') as fp:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely change :)
I can drop my PR if this will be merged

@sjaensch sjaensch merged commit 26a4842 into Yelp:master Mar 5, 2019
@sjaensch sjaensch deleted the python38-pre-commit-fix-build branch March 5, 2019 21:28
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

Successfully merging this pull request may close these issues.

None yet

3 participants