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

Add support for python3.7 #166

Merged
merged 2 commits into from Aug 5, 2019

Conversation

@pipermerriam
Copy link
Member

commented Aug 5, 2019

What was wrong?

Not tested support for python3.7

How was it fixed?

Added CI test run for 3.7 (including a linting run against 3.7)

Cute Animal Picture

7a95115cafccc9afd448c9b69bc850ef

@pipermerriam pipermerriam force-pushed the pipermerriam:piper/python37 branch from 2de4397 to abe6a47 Aug 5, 2019

@pipermerriam pipermerriam force-pushed the pipermerriam:piper/python37 branch from abe6a47 to 59bd92d Aug 5, 2019

@pipermerriam pipermerriam requested a review from carver Aug 5, 2019

@carver

carver approved these changes Aug 5, 2019

<<: *common
docker:
- image: circleci/python:3.6
environment:
TOXENV: lint
TOXENV: lint-py36
lint-py37:

This comment has been minimized.

Copy link
@carver

carver Aug 5, 2019

Collaborator

I don't think it adds a ton of value to run the linter in multiple pythons, but I'm not against it. Maybe if it CI wasn't able to schedule all the jobs in parallel, I would feel more strongly, but I don't think that's a problem on eth-utils.

This comment has been minimized.

Copy link
@carver

carver Aug 5, 2019

Collaborator

Oh, and of course, this is what found the problem you're talking about in the first place. 🤦‍♂ So obviously worth keeping here.


class HasLoggerCompatWithGeneric(metaclass=HasLoggerMeta.meta_compat(GenericMeta)):

This comment has been minimized.

Copy link
@carver

carver Aug 5, 2019

Collaborator

Does this mean that the whole approach of using meta_compat is broken for Generic in 3.7+? Do we need a different approach?

This comment has been minimized.

Copy link
@pipermerriam

pipermerriam Aug 5, 2019

Author Member

Not something that needs to be fixed in this library I don't think but it would look something like this.

if is_python_36():
    from typing import GenericMeta, Generic
    class GenericWithLogger(Generic, HasLoggerMeta.meta_compat(GenericMeta)):
        ...
elif is_python_37_or_greater():
    from typing import Generic
    class GenericWithLogger(HasLogger, Generic):
        ...

Basically, typing.Generic is no longer implemented with a metaclass in 3.7 so there's no need to do the compat layer.

Update tests/logging-utils/test_compat_with_typing_Generic.py
Co-Authored-By: Jason Carver <ut96caarrs@snkmail.com>

@pipermerriam pipermerriam merged commit 1850533 into ethereum:master Aug 5, 2019

8 checks passed

ci/circleci: doctest Your tests passed on CircleCI!
Details
ci/circleci: lint-py36 Your tests passed on CircleCI!
Details
ci/circleci: lint-py37 Your tests passed on CircleCI!
Details
ci/circleci: py35 Your tests passed on CircleCI!
Details
ci/circleci: py36 Your tests passed on CircleCI!
Details
ci/circleci: py36-typing1 Your tests passed on CircleCI!
Details
ci/circleci: py37 Your tests passed on CircleCI!
Details
ci/circleci: pypy3 Your tests passed on CircleCI!
Details

@pipermerriam pipermerriam deleted the pipermerriam:piper/python37 branch Aug 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.