You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/04/01 15:25:20 UTC
[GitHub] [zookeeper] TisonKun opened a new pull request #1303:
ZOOKEEPER-3782: Replace filter() with list comprehension for returning list
TisonKun opened a new pull request #1303: ZOOKEEPER-3782: Replace filter() with list comprehension for returning list
URL: https://github.com/apache/zookeeper/pull/1303
After Py3, `filter` return a `filter object` instead of `list object`, which causes
```
Traceback (most recent call last):
File "zk-merge-pr.py", line 533, in <module>
main()
File "zk-merge-pr.py", line 519, in main
resolve_jira_issues(commit_title, merged_refs, jira_comment)
File "zk-merge-pr.py", line 329, in resolve_jira_issues
resolve_jira_issue(merge_branches, comment, jira_id)
File "zk-merge-pr.py", line 312, in resolve_jira_issue
jira_fix_versions = [get_version_json(v) for v in fix_versions]
File "zk-merge-pr.py", line 312, in <listcomp>
jira_fix_versions = [get_version_json(v) for v in fix_versions]
File "zk-merge-pr.py", line 310, in get_version_json
return filter(lambda v: v.name == version_str, versions)[0].raw
TypeError: 'filter' object is not subscriptable
```
We can replace filter with list comprehension to fix it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [zookeeper] eolivelli closed pull request #1303: ZOOKEEPER-3782:
Replace filter() with list comprehension for returning list
Posted by GitBox <gi...@apache.org>.
eolivelli closed pull request #1303: ZOOKEEPER-3782: Replace filter() with list comprehension for returning list
URL: https://github.com/apache/zookeeper/pull/1303
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [zookeeper] eolivelli commented on issue #1303: ZOOKEEPER-3782:
Replace filter() with list comprehension for returning list
Posted by GitBox <gi...@apache.org>.
eolivelli commented on issue #1303: ZOOKEEPER-3782: Replace filter() with list comprehension for returning list
URL: https://github.com/apache/zookeeper/pull/1303#issuecomment-610919128
committed
thank you !
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [zookeeper] TisonKun commented on issue #1303: ZOOKEEPER-3782:
Replace filter() with list comprehension for returning list
Posted by GitBox <gi...@apache.org>.
TisonKun commented on issue #1303: ZOOKEEPER-3782: Replace filter() with list comprehension for returning list
URL: https://github.com/apache/zookeeper/pull/1303#issuecomment-607317072
cc @anmolnar Please verify the change.
I'm sorry that I don't spot it earlier :(
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services