[ 
https://issues.apache.org/jira/browse/BEAM-5612?focusedWorklogId=191887&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-191887
 ]

ASF GitHub Bot logged work on BEAM-5612:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Jan/19 20:56
            Start Date: 29/Jan/19 20:56
    Worklog Time Spent: 10m 
      Work Description: RobbeSneyders commented on pull request #7650: 
[BEAM-5612] [BEAM-5315] Python 3 port gcs related io modules.
URL: https://github.com/apache/beam/pull/7650#discussion_r252013577
 
 

 ##########
 File path: sdks/python/apache_beam/io/gcp/gcsio_test.py
 ##########
 @@ -542,10 +542,10 @@ def test_file_iterator(self):
     line_count = 10
     for _ in range(line_count):
       line_length = random.randint(100, 500)
-      line = os.urandom(line_length).replace('\n', ' ') + '\n'
+      line = os.urandom(line_length).replace(b'\n', b' ') + b'\n'
       lines.append(line)
 
-    contents = ''.join(lines)
+    contents = b''.join(lines)
 
 Review comment:
   `os.urandom` returns a `bytestring`. On Python 2, this worked using 
`string`, since a Python 2 `string` is actually a `bytestring` (`'' = b''`), 
while on Python 3 a `string` is actually a `unicode` string (`'' = u''`). By 
defining `b''`, we get the same behavior on both Python versions.
 
----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 191887)
    Time Spent: 1h 10m  (was: 1h)

> Add tox suites to exercise unit tests using Python3 interpreter with cython, 
> and with gcp dependencies.
> -------------------------------------------------------------------------------------------------------
>
>                 Key: BEAM-5612
>                 URL: https://issues.apache.org/jira/browse/BEAM-5612
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-core
>            Reporter: Valentyn Tymofieiev
>            Assignee: Robbe
>            Priority: Minor
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> We want to enable gcp and cython tox suite in Python 3 to increase the 
> coverage. 
> However, enabling more tox suites will result in longer build time in 
> PreCommit, which should be resolved in BEAM-6527.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to