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

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

                Author: ASF GitHub Bot
            Created on: 08/Oct/18 15:11
            Start Date: 08/Oct/18 15:11
    Worklog Time Spent: 10m 
      Work Description: tvalentyn commented on a change in pull request #6587: 
[BEAM-5626] Fix hadoop filesystem test for py3.
URL: https://github.com/apache/beam/pull/6587#discussion_r223399804
 
 

 ##########
 File path: sdks/python/apache_beam/io/hadoopfilesystem_test.py
 ##########
 @@ -214,6 +214,11 @@ def setUp(self):
       url = self.fs.join(self.tmpdir, filename)
       self.fs.create(url).close()
 
+    try:                    # Python 2
 
 Review comment:
   @HuangLED I think from code-readability standpoint, using 
`sys.version_info[0]` is a more direct way, since `sys.version_info` is a 
standard library function whose purpose is to return the version of 
interpreter. A reader of the code, who is not aware of `assertItemsEqual` 
deprecation will probably guess that this method is not available on Python 
3.x, while `try/except` require a clarifying comment in order for a reader not 
to wonder why a method sometimes may not be available. Note that 
https://github.com/apache/beam/pull/6599/files is changing this as well, so 
consider removing these lies from the PR to avoid a merge conflict.

----------------------------------------------------------------
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: 152286)
    Time Spent: 2h 50m  (was: 2h 40m)

> Several IO tests fail in Python 3 with RuntimeError('dictionary changed size 
> during iteration',)}
> -------------------------------------------------------------------------------------------------
>
>                 Key: BEAM-5626
>                 URL: https://issues.apache.org/jira/browse/BEAM-5626
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-core
>            Reporter: Valentyn Tymofieiev
>            Assignee: Ruoyun Huang
>            Priority: Major
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
>  ERROR: test_delete_dir 
> (apache_beam.io.hadoopfilesystem_test.HadoopFileSystemTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/io/hadoopfilesystem_test.py",
>  line 506, in test_delete_dir
>      self.fs.delete([url_t1])
>    File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/io/hadoopfilesystem.py",
>  line 370, in delete
>      raise BeamIOError("Delete operation failed", exceptions)
>  apache_beam.io.filesystem.BeamIOError: Delete operation failed with 
> exceptions {'hdfs://test_dir/new_dir1': RuntimeError('dictionary changed size 
> during iteration',       )}



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

Reply via email to