-
Notifications
You must be signed in to change notification settings - Fork 79
Add Test Cases for Python 3.7 #720
base: master
Are you sure you want to change the base?
Add Test Cases for Python 3.7 #720
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This seems good, except for some linting errors:
|
Thanks @seii-saintway for this. Due to the linting issues and an atypical var name, I ended up making a new PR, #728 that does a very similar thing. I also didn't include yaml loader changes. I am not sure how those relate to python3.7+ support. |
Thanks @crwilcox for the new PR. I have some memory of troubles of the yaml loader thing. And I think we should consider thoroughly. Because I felt that there are some other troubles in Python 3.7 environment. |
7c46758
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
I just want to see if I can merge this PR or not after I solve the linting errors |
@googlebot I signed it! |
@googlebot I fixed it. |
1 similar comment
@googlebot I fixed it. |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@googlebot I consent. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
@@ -328,6 +329,8 @@ def parse_config(config, env, as_dict=True): | |||
config = {} | |||
elif stripped[0] == '{': | |||
config = json.loads(config) | |||
elif six.PY3: | |||
config = yaml.load(config, Loader=yaml.FullLoader) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are these loader changes addressing? This seems unrelated to Python 3.7 compat to me at first glance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am sorry that I cannot remember the reason clearly.
But I searched on google and found an issue concerning pyyaml version.
- https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation
- Why does PyYAML 5.1 raise YAMLLoadWarning when the default loader has been made safer already? yaml/pyyaml#292
I remember that I built the datalab image with py37 and got into some troubles with pyyaml before.
As the pyyaml version show as below,
Line 108 in 8c2df84
'pyyaml>=3.11', |
I guess that pyyaml will be installed as different version in py2 and py3.
As you could see in the py35 coverage test, there were warnings concerning YAMLLoadWarning.
/home/travis/build/googledatalab/pydatalab/tests/pipeline/pipeline_tests.py:305: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
dag_dict = yaml.load(PipelineTest._test_pipeline_yaml_spec)
/home/travis/build/googledatalab/pydatalab/tests/pipeline/pipeline_tests.py:265: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
dag_dict = yaml.load(PipelineTest._test_pipeline_yaml_spec)
/home/travis/build/googledatalab/pydatalab/tests/pipeline/pipeline_tests.py:280: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
dag_dict = yaml.load(PipelineTest._test_pipeline_yaml_spec)
Maybe there will be warnings or errors in py37, too.
I'm sorry that maybe it is better to open a new PR concerning the YAMLLoadWarning thing.
And it is better add some py37 coverage tests.
@@ -12,7 +12,7 @@ | |||
|
|||
"""Google Cloud Platform library - Internal Helpers.""" | |||
|
|||
from ._async import async, async_function, async_method | |||
from ._async import async_, async_function, async_method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for incorporating the naming style from #728. It is shorter and a more standard pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks you very much for your support.
Add trove for py3
#711