[jira] [Work logged] (BEAM-8156) Finish migration to standard Python typing

2019-09-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-8156:


Author: ASF GitHub Bot
Created on: 12/Sep/19 00:02
Start Date: 12/Sep/19 00:02
Worklog Time Spent: 10m 
  Work Description: udim commented on pull request #9509: [BEAM-8156] Add 
convert_to_typing_type
URL: https://github.com/apache/beam/pull/9509
 
 
   
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 311091)
Remaining Estimate: 502h 20m  (was: 502.5h)
Time Spent: 1h 40m  (was: 1.5h)

> Finish migration to standard Python typing
> --
>
> Key: BEAM-8156
> URL: https://issues.apache.org/jira/browse/BEAM-8156
> Project: Beam
>  Issue Type: Improvement
>  Components: sdk-py-core
>Reporter: Robert Bradshaw
>Assignee: Udi Meiri
>Priority: Major
>   Original Estimate: 504h
>  Time Spent: 1h 40m
>  Remaining Estimate: 502h 20m
>
> We should migrate all Python uses of types to the standard typing module, and 
> make the typehints.* ones aliases of the Python ones. 
>  
> There are three places where we use custom typehints behavior: 
> (1) is_compatible_with
> (2) bind_type_variables/match_type_variables
> (3) trivial type inference. 
>  
> I would propose that each of these be adapted to a (internal) public 
> interface that accepts and returns standard typing types, and internally 
> converts to our (nowhere else exposed) typehints types, performs the logic, 
> and converts back. Each of these in turn can then be updated, as needed and 
> orthogonally, to operate on the typing types natively (possibly via deference 
> to a third-party library). 
>  
> I think coder inference could be easily adopted to use typing types directly, 
> but it may be a fourth place where we do internal conversion first. Another 
> gotcha is special care may need to be taken if we ever need to pickle these 
> types (which IIRC may have issues). 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Work logged] (BEAM-8156) Finish migration to standard Python typing

2019-09-10 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-8156:


Author: ASF GitHub Bot
Created on: 11/Sep/19 01:12
Start Date: 11/Sep/19 01:12
Worklog Time Spent: 10m 
  Work Description: udim commented on pull request #9509: [BEAM-8156] Add 
convert_to_typing_type
URL: https://github.com/apache/beam/pull/9509#discussion_r323023802
 
 

 ##
 File path: sdks/python/apache_beam/typehints/native_type_compatibility.py
 ##
 @@ -198,6 +202,10 @@ def convert_to_beam_type(typ):
   arity=-1,
   beam_type=typehints.Tuple),
   _TypeMapEntry(match=_match_is_union, arity=-1, 
beam_type=typehints.Union),
+  _TypeMapEntry(
+  match=_match_issubclass(typing.Iterator),
 
 Review comment:
   Note that `GeneratorHint` has changed in my latest update. It now accepts 1 
or 3 arguments in `__getitem__`.
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 310234)
Remaining Estimate: 502.5h  (was: 502h 40m)
Time Spent: 1.5h  (was: 1h 20m)

> Finish migration to standard Python typing
> --
>
> Key: BEAM-8156
> URL: https://issues.apache.org/jira/browse/BEAM-8156
> Project: Beam
>  Issue Type: Improvement
>  Components: sdk-py-core
>Reporter: Robert Bradshaw
>Assignee: Udi Meiri
>Priority: Major
>   Original Estimate: 504h
>  Time Spent: 1.5h
>  Remaining Estimate: 502.5h
>
> We should migrate all Python uses of types to the standard typing module, and 
> make the typehints.* ones aliases of the Python ones. 
>  
> There are three places where we use custom typehints behavior: 
> (1) is_compatible_with
> (2) bind_type_variables/match_type_variables
> (3) trivial type inference. 
>  
> I would propose that each of these be adapted to a (internal) public 
> interface that accepts and returns standard typing types, and internally 
> converts to our (nowhere else exposed) typehints types, performs the logic, 
> and converts back. Each of these in turn can then be updated, as needed and 
> orthogonally, to operate on the typing types natively (possibly via deference 
> to a third-party library). 
>  
> I think coder inference could be easily adopted to use typing types directly, 
> but it may be a fourth place where we do internal conversion first. Another 
> gotcha is special care may need to be taken if we ever need to pickle these 
> types (which IIRC may have issues). 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Work logged] (BEAM-8156) Finish migration to standard Python typing

2019-09-10 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-8156:


Author: ASF GitHub Bot
Created on: 10/Sep/19 23:20
Start Date: 10/Sep/19 23:20
Worklog Time Spent: 10m 
  Work Description: udim commented on pull request #9509: [BEAM-8156] Add 
convert_to_typing_type
URL: https://github.com/apache/beam/pull/9509#discussion_r323002366
 
 

 ##
 File path: sdks/python/apache_beam/typehints/native_type_compatibility.py
 ##
 @@ -198,6 +202,10 @@ def convert_to_beam_type(typ):
   arity=-1,
   beam_type=typehints.Tuple),
   _TypeMapEntry(match=_match_is_union, arity=-1, 
beam_type=typehints.Union),
+  _TypeMapEntry(
+  match=_match_issubclass(typing.Iterator),
 
 Review comment:
   PTAL. I don't see how I can implement bidirectional conversion of internal 
and external types without at least supporting all internal types. Otherwise 
we'll break existing users.
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 310174)
Remaining Estimate: 502h 40m  (was: 502h 50m)
Time Spent: 1h 20m  (was: 1h 10m)

> Finish migration to standard Python typing
> --
>
> Key: BEAM-8156
> URL: https://issues.apache.org/jira/browse/BEAM-8156
> Project: Beam
>  Issue Type: Improvement
>  Components: sdk-py-core
>Reporter: Robert Bradshaw
>Assignee: Udi Meiri
>Priority: Major
>   Original Estimate: 504h
>  Time Spent: 1h 20m
>  Remaining Estimate: 502h 40m
>
> We should migrate all Python uses of types to the standard typing module, and 
> make the typehints.* ones aliases of the Python ones. 
>  
> There are three places where we use custom typehints behavior: 
> (1) is_compatible_with
> (2) bind_type_variables/match_type_variables
> (3) trivial type inference. 
>  
> I would propose that each of these be adapted to a (internal) public 
> interface that accepts and returns standard typing types, and internally 
> converts to our (nowhere else exposed) typehints types, performs the logic, 
> and converts back. Each of these in turn can then be updated, as needed and 
> orthogonally, to operate on the typing types natively (possibly via deference 
> to a third-party library). 
>  
> I think coder inference could be easily adopted to use typing types directly, 
> but it may be a fourth place where we do internal conversion first. Another 
> gotcha is special care may need to be taken if we ever need to pickle these 
> types (which IIRC may have issues). 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Work logged] (BEAM-8156) Finish migration to standard Python typing

2019-09-10 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-8156:


Author: ASF GitHub Bot
Created on: 10/Sep/19 18:06
Start Date: 10/Sep/19 18:06
Worklog Time Spent: 10m 
  Work Description: robertwb commented on pull request #9509: [BEAM-8156] 
Add convert_to_typing_type
URL: https://github.com/apache/beam/pull/9509#discussion_r322887211
 
 

 ##
 File path: sdks/python/apache_beam/typehints/native_type_compatibility.py
 ##
 @@ -198,6 +202,10 @@ def convert_to_beam_type(typ):
   arity=-1,
   beam_type=typehints.Tuple),
   _TypeMapEntry(match=_match_is_union, arity=-1, 
beam_type=typehints.Union),
+  _TypeMapEntry(
+  match=_match_issubclass(typing.Iterator),
 
 Review comment:
   Sounds good. Thanks for bearing with me. 
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 310003)
Remaining Estimate: 502h 50m  (was: 503h)
Time Spent: 1h 10m  (was: 1h)

> Finish migration to standard Python typing
> --
>
> Key: BEAM-8156
> URL: https://issues.apache.org/jira/browse/BEAM-8156
> Project: Beam
>  Issue Type: Improvement
>  Components: sdk-py-core
>Reporter: Robert Bradshaw
>Assignee: Udi Meiri
>Priority: Major
>   Original Estimate: 504h
>  Time Spent: 1h 10m
>  Remaining Estimate: 502h 50m
>
> We should migrate all Python uses of types to the standard typing module, and 
> make the typehints.* ones aliases of the Python ones. 
>  
> There are three places where we use custom typehints behavior: 
> (1) is_compatible_with
> (2) bind_type_variables/match_type_variables
> (3) trivial type inference. 
>  
> I would propose that each of these be adapted to a (internal) public 
> interface that accepts and returns standard typing types, and internally 
> converts to our (nowhere else exposed) typehints types, performs the logic, 
> and converts back. Each of these in turn can then be updated, as needed and 
> orthogonally, to operate on the typing types natively (possibly via deference 
> to a third-party library). 
>  
> I think coder inference could be easily adopted to use typing types directly, 
> but it may be a fourth place where we do internal conversion first. Another 
> gotcha is special care may need to be taken if we ever need to pickle these 
> types (which IIRC may have issues). 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Work logged] (BEAM-8156) Finish migration to standard Python typing

2019-09-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-8156:


Author: ASF GitHub Bot
Created on: 09/Sep/19 20:52
Start Date: 09/Sep/19 20:52
Worklog Time Spent: 10m 
  Work Description: udim commented on pull request #9509: [BEAM-8156] Add 
convert_to_typing_type
URL: https://github.com/apache/beam/pull/9509#discussion_r322449200
 
 

 ##
 File path: sdks/python/apache_beam/typehints/native_type_compatibility.py
 ##
 @@ -198,6 +202,10 @@ def convert_to_beam_type(typ):
   arity=-1,
   beam_type=typehints.Tuple),
   _TypeMapEntry(match=_match_is_union, arity=-1, 
beam_type=typehints.Union),
+  _TypeMapEntry(
+  match=_match_issubclass(typing.Iterator),
 
 Review comment:
   I needed both directions of conversion between 
`typehints.IteratorTypeConstraint` and `typing.Iterator`.
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 309235)
Remaining Estimate: 503h  (was: 503h 10m)
Time Spent: 1h  (was: 50m)

> Finish migration to standard Python typing
> --
>
> Key: BEAM-8156
> URL: https://issues.apache.org/jira/browse/BEAM-8156
> Project: Beam
>  Issue Type: Improvement
>  Components: sdk-py-core
>Reporter: Robert Bradshaw
>Assignee: Udi Meiri
>Priority: Major
>   Original Estimate: 504h
>  Time Spent: 1h
>  Remaining Estimate: 503h
>
> We should migrate all Python uses of types to the standard typing module, and 
> make the typehints.* ones aliases of the Python ones. 
>  
> There are three places where we use custom typehints behavior: 
> (1) is_compatible_with
> (2) bind_type_variables/match_type_variables
> (3) trivial type inference. 
>  
> I would propose that each of these be adapted to a (internal) public 
> interface that accepts and returns standard typing types, and internally 
> converts to our (nowhere else exposed) typehints types, performs the logic, 
> and converts back. Each of these in turn can then be updated, as needed and 
> orthogonally, to operate on the typing types natively (possibly via deference 
> to a third-party library). 
>  
> I think coder inference could be easily adopted to use typing types directly, 
> but it may be a fourth place where we do internal conversion first. Another 
> gotcha is special care may need to be taken if we ever need to pickle these 
> types (which IIRC may have issues). 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Work logged] (BEAM-8156) Finish migration to standard Python typing

2019-09-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-8156:


Author: ASF GitHub Bot
Created on: 09/Sep/19 20:06
Start Date: 09/Sep/19 20:06
Worklog Time Spent: 10m 
  Work Description: robertwb commented on pull request #9509: [BEAM-8156] 
Add convert_to_typing_type
URL: https://github.com/apache/beam/pull/9509#discussion_r322429914
 
 

 ##
 File path: sdks/python/apache_beam/typehints/native_type_compatibility.py
 ##
 @@ -198,6 +202,10 @@ def convert_to_beam_type(typ):
   arity=-1,
   beam_type=typehints.Tuple),
   _TypeMapEntry(match=_match_is_union, arity=-1, 
beam_type=typehints.Union),
+  _TypeMapEntry(
+  match=_match_issubclass(typing.Iterator),
 
 Review comment:
   Ah, I see this is `Iterator`, not `Itererable`. I still think that changing 
what we do here should probably be a separate PR, or at least commit, as it's 
orthogonal to implementing `convert_to_typing_type` (or is there some reason 
you need 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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 309174)
Remaining Estimate: 503h 10m  (was: 503h 20m)
Time Spent: 50m  (was: 40m)

> Finish migration to standard Python typing
> --
>
> Key: BEAM-8156
> URL: https://issues.apache.org/jira/browse/BEAM-8156
> Project: Beam
>  Issue Type: Improvement
>  Components: sdk-py-core
>Reporter: Robert Bradshaw
>Assignee: Udi Meiri
>Priority: Major
>   Original Estimate: 504h
>  Time Spent: 50m
>  Remaining Estimate: 503h 10m
>
> We should migrate all Python uses of types to the standard typing module, and 
> make the typehints.* ones aliases of the Python ones. 
>  
> There are three places where we use custom typehints behavior: 
> (1) is_compatible_with
> (2) bind_type_variables/match_type_variables
> (3) trivial type inference. 
>  
> I would propose that each of these be adapted to a (internal) public 
> interface that accepts and returns standard typing types, and internally 
> converts to our (nowhere else exposed) typehints types, performs the logic, 
> and converts back. Each of these in turn can then be updated, as needed and 
> orthogonally, to operate on the typing types natively (possibly via deference 
> to a third-party library). 
>  
> I think coder inference could be easily adopted to use typing types directly, 
> but it may be a fourth place where we do internal conversion first. Another 
> gotcha is special care may need to be taken if we ever need to pickle these 
> types (which IIRC may have issues). 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Work logged] (BEAM-8156) Finish migration to standard Python typing

2019-09-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-8156:


Author: ASF GitHub Bot
Created on: 06/Sep/19 23:16
Start Date: 06/Sep/19 23:16
Worklog Time Spent: 10m 
  Work Description: udim commented on pull request #9509: [BEAM-8156] Add 
convert_to_typing_type
URL: https://github.com/apache/beam/pull/9509#discussion_r321938298
 
 

 ##
 File path: sdks/python/apache_beam/typehints/native_type_compatibility.py
 ##
 @@ -198,6 +202,10 @@ def convert_to_beam_type(typ):
   arity=-1,
   beam_type=typehints.Tuple),
   _TypeMapEntry(match=_match_is_union, arity=-1, 
beam_type=typehints.Union),
+  _TypeMapEntry(
+  match=_match_issubclass(typing.Iterator),
 
 Review comment:
   Line 170 effectively limits the scope to typing module types. Is that good 
enough?
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 308214)
Remaining Estimate: 503h 20m  (was: 503.5h)
Time Spent: 40m  (was: 0.5h)

> Finish migration to standard Python typing
> --
>
> Key: BEAM-8156
> URL: https://issues.apache.org/jira/browse/BEAM-8156
> Project: Beam
>  Issue Type: Improvement
>  Components: sdk-py-core
>Reporter: Robert Bradshaw
>Assignee: Udi Meiri
>Priority: Major
>   Original Estimate: 504h
>  Time Spent: 40m
>  Remaining Estimate: 503h 20m
>
> We should migrate all Python uses of types to the standard typing module, and 
> make the typehints.* ones aliases of the Python ones. 
>  
> There are three places where we use custom typehints behavior: 
> (1) is_compatible_with
> (2) bind_type_variables/match_type_variables
> (3) trivial type inference. 
>  
> I would propose that each of these be adapted to a (internal) public 
> interface that accepts and returns standard typing types, and internally 
> converts to our (nowhere else exposed) typehints types, performs the logic, 
> and converts back. Each of these in turn can then be updated, as needed and 
> orthogonally, to operate on the typing types natively (possibly via deference 
> to a third-party library). 
>  
> I think coder inference could be easily adopted to use typing types directly, 
> but it may be a fourth place where we do internal conversion first. Another 
> gotcha is special care may need to be taken if we ever need to pickle these 
> types (which IIRC may have issues). 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Work logged] (BEAM-8156) Finish migration to standard Python typing

2019-09-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-8156:


Author: ASF GitHub Bot
Created on: 06/Sep/19 23:08
Start Date: 06/Sep/19 23:08
Worklog Time Spent: 10m 
  Work Description: robertwb commented on pull request #9509: [BEAM-8156] 
Add convert_to_typing_type
URL: https://github.com/apache/beam/pull/9509#discussion_r321936389
 
 

 ##
 File path: sdks/python/apache_beam/typehints/native_type_compatibility.py
 ##
 @@ -198,6 +202,10 @@ def convert_to_beam_type(typ):
   arity=-1,
   beam_type=typehints.Tuple),
   _TypeMapEntry(match=_match_is_union, arity=-1, 
beam_type=typehints.Union),
+  _TypeMapEntry(
+  match=_match_issubclass(typing.Iterator),
 
 Review comment:
   This will math all kinds of things, including strings and dicts, which is 
not what we want. (We may want to explicitly note that.)
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 308211)
Remaining Estimate: 503.5h  (was: 503h 40m)
Time Spent: 0.5h  (was: 20m)

> Finish migration to standard Python typing
> --
>
> Key: BEAM-8156
> URL: https://issues.apache.org/jira/browse/BEAM-8156
> Project: Beam
>  Issue Type: Improvement
>  Components: sdk-py-core
>Reporter: Robert Bradshaw
>Assignee: Udi Meiri
>Priority: Major
>   Original Estimate: 504h
>  Time Spent: 0.5h
>  Remaining Estimate: 503.5h
>
> We should migrate all Python uses of types to the standard typing module, and 
> make the typehints.* ones aliases of the Python ones. 
>  
> There are three places where we use custom typehints behavior: 
> (1) is_compatible_with
> (2) bind_type_variables/match_type_variables
> (3) trivial type inference. 
>  
> I would propose that each of these be adapted to a (internal) public 
> interface that accepts and returns standard typing types, and internally 
> converts to our (nowhere else exposed) typehints types, performs the logic, 
> and converts back. Each of these in turn can then be updated, as needed and 
> orthogonally, to operate on the typing types natively (possibly via deference 
> to a third-party library). 
>  
> I think coder inference could be easily adopted to use typing types directly, 
> but it may be a fourth place where we do internal conversion first. Another 
> gotcha is special care may need to be taken if we ever need to pickle these 
> types (which IIRC may have issues). 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Work logged] (BEAM-8156) Finish migration to standard Python typing

2019-09-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-8156:


Author: ASF GitHub Bot
Created on: 06/Sep/19 23:04
Start Date: 06/Sep/19 23:04
Worklog Time Spent: 10m 
  Work Description: udim commented on issue #9509: [BEAM-8156] Add 
convert_to_typing_type
URL: https://github.com/apache/beam/pull/9509#issuecomment-529041440
 
 
   R: @robertwb @tvalentyn 
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 308208)
Remaining Estimate: 503h 40m  (was: 503h 50m)
Time Spent: 20m  (was: 10m)

> Finish migration to standard Python typing
> --
>
> Key: BEAM-8156
> URL: https://issues.apache.org/jira/browse/BEAM-8156
> Project: Beam
>  Issue Type: Improvement
>  Components: sdk-py-core
>Reporter: Robert Bradshaw
>Assignee: Udi Meiri
>Priority: Major
>   Original Estimate: 504h
>  Time Spent: 20m
>  Remaining Estimate: 503h 40m
>
> We should migrate all Python uses of types to the standard typing module, and 
> make the typehints.* ones aliases of the Python ones. 
>  
> There are three places where we use custom typehints behavior: 
> (1) is_compatible_with
> (2) bind_type_variables/match_type_variables
> (3) trivial type inference. 
>  
> I would propose that each of these be adapted to a (internal) public 
> interface that accepts and returns standard typing types, and internally 
> converts to our (nowhere else exposed) typehints types, performs the logic, 
> and converts back. Each of these in turn can then be updated, as needed and 
> orthogonally, to operate on the typing types natively (possibly via deference 
> to a third-party library). 
>  
> I think coder inference could be easily adopted to use typing types directly, 
> but it may be a fourth place where we do internal conversion first. Another 
> gotcha is special care may need to be taken if we ever need to pickle these 
> types (which IIRC may have issues). 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Work logged] (BEAM-8156) Finish migration to standard Python typing

2019-09-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-8156:


Author: ASF GitHub Bot
Created on: 06/Sep/19 22:46
Start Date: 06/Sep/19 22:46
Worklog Time Spent: 10m 
  Work Description: udim commented on pull request #9509: [BEAM-8156] Add 
convert_to_typing_type
URL: https://github.com/apache/beam/pull/9509
 
 
   First step in being able to compartmentalize Beam typing types to
   certain functions, and not expose them externally.
   
   
   
   Thank you for your contribution! Follow this checklist to help us 
incorporate your contribution quickly and easily:
   
- [ ] [**Choose 
reviewer(s)**](https://beam.apache.org/contribute/#make-your-change) and 
mention them in a comment (`R: @username`).
- [ ] Format the pull request title like `[BEAM-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA 
issue, if applicable. This will automatically link the pull request to the 
issue.
- [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   Post-Commit Tests Status (on master branch)
   

   
   Lang | SDK | Apex | Dataflow | Flink | Gearpump | Samza | Spark
   --- | --- | --- | --- | --- | --- | --- | ---
   Go | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/)
 | --- | --- | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Go_VR_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go_VR_Flink/lastCompletedBuild/)
 | --- | --- | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Go_VR_Spark/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go_VR_Spark/lastCompletedBuild/)
   Java | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/)[![Build
 
Status](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/)[![Build
 
Status](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/)[![Build
 
Status](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Spark_Batch/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Spark_Batch/lastCompletedBuild/)
   Python | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Python2/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python2/lastCompletedBuild/)[![Build
 
Status](https://builds.apache.org/job/beam_PostCommit_Python35/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python35/lastCompletedBuild/)[![Build
 
Status](https://builds.apache.org/job/beam_PostCommit_Python36/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python36/lastCompletedBuild/)[![Build