[
https://issues.apache.org/jira/browse/BEAM-4000?focusedWorklogId=119050&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-119050
]
ASF GitHub Bot logged work on BEAM-4000:
----------------------------------------
Author: ASF GitHub Bot
Created on: 04/Jul/18 11:25
Start Date: 04/Jul/18 11:25
Worklog Time Spent: 10m
Work Description: RobbeSneyders commented on a change in pull request
#5715: [BEAM-4000] Futurize io subpackage
URL: https://github.com/apache/beam/pull/5715#discussion_r200096594
##########
File path: sdks/python/apache_beam/io/filebasedsource.py
##########
@@ -235,11 +241,11 @@ class _SingleFileSource(iobase.BoundedSource):
def __init__(self, file_based_source, file_name, start_offset, stop_offset,
min_bundle_size=0, splittable=True):
- if not isinstance(start_offset, integer_types):
+ if not isinstance(start_offset, (int, long)):
Review comment:
If you want to replace this with just `int`, we would have to import `int`
from (future.)`builtins`, which gives problems when used for typechecks. To
stay consistent with other modules, which do use typechecks, I would advice
against this.
Instead, we can replace the try/except block with from `past.builtins import
long` as mentioned in the comment above.
----------------------------------------------------------------
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: 119050)
Time Spent: 3h 40m (was: 3.5h)
> Futurize and fix python 2 compatibility for io subpackage
> ---------------------------------------------------------
>
> Key: BEAM-4000
> URL: https://issues.apache.org/jira/browse/BEAM-4000
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-py-core
> Reporter: Robbe
> Assignee: Matthias Feys
> Priority: Major
> Time Spent: 3h 40m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)