[
https://issues.apache.org/jira/browse/BEAM-5320?focusedWorklogId=167771&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-167771
]
ASF GitHub Bot logged work on BEAM-5320:
----------------------------------------
Author: ASF GitHub Bot
Created on: 20/Nov/18 14:57
Start Date: 20/Nov/18 14:57
Worklog Time Spent: 10m
Work Description: RobbeSneyders commented on a change in pull request
#7029: [BEAM-5320] Finish Python 3 porting for testing module
URL: https://github.com/apache/beam/pull/7029#discussion_r235035629
##########
File path: sdks/python/apache_beam/testing/test_utils.py
##########
@@ -79,7 +79,7 @@ def compute_hash(content, hashing_alg=DEFAULT_HASHING_ALG):
content.sort()
m = hashlib.new(hashing_alg)
for elem in content:
- m.update(str(elem).encode('utf-8'))
+ m.update(elem)
Review comment:
On Python 3, `str(None).encode('utf-8')` results in `'b"None"'`. Checking
for `bytes` fixes this.
I also moved this conversion to the start of the method, since `sort()`
otherwise fails with a `TypeError` on Python 3 because of unorderable types.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 167771)
Time Spent: 3h (was: 2h 50m)
> Finish Python 3 porting for testing module
> ------------------------------------------
>
> Key: BEAM-5320
> URL: https://issues.apache.org/jira/browse/BEAM-5320
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-py-core
> Reporter: Robbe
> Assignee: Robbe
> Priority: Major
> Time Spent: 3h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)