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

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

                Author: ASF GitHub Bot
            Created on: 03/Oct/18 22:56
            Start Date: 03/Oct/18 22:56
    Worklog Time Spent: 10m 
      Work Description: tvalentyn commented on a change in pull request #6543: 
[BEAM-5607] Set python_version of typing library < 3.7.0
URL: https://github.com/apache/beam/pull/6543#discussion_r222493267
 
 

 ##########
 File path: sdks/python/setup.py
 ##########
 @@ -124,7 +124,7 @@ def get_version():
     'pytz>=2018.3,<=2018.4',
     'pyyaml>=3.12,<4.0.0',
     'pyvcf>=0.6.8,<0.7.0',
-    'typing>=3.6.0,<3.7.0',
+    'typing>=3.6.0,<3.7.0; python_version < "3.7.0"',
 
 Review comment:
   Thanks for your change, @manuzhang, I was also not aware of this syntax. It 
is documented in 
https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-platform-specific-dependencies
 and in more detail in https://www.python.org/dev/peps/pep-0508/. We should use 
it to simplify our setup.py and instead of 
`REQUIRED_PACKAGES_PY3_ONLY`/`REQUIRED_PACKAGES_PY2_ONLY`. @manuzhang - would 
you be interested in adding this cleanup to this PR?
   
   As for this change: 
   - I do notice that more typehints tests fail for Python 3.7, but I did not 
see any effect whether we install `typing` or not. I did see errors coming from 
`futures` package, and removing it helped to significantly reduce the number of 
failures on 3.7. As per https://pypi.org/project/typing/: in Python 3.5 and 
later, the typing module lives in the stdlib, and installing this package has 
no effect. I think we should file a Jira and do a little more investigation to 
rootcause the issue you are facing. I wonder if it may be platform-specific.

----------------------------------------------------------------
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: 150962)
    Time Spent: 0.5h  (was: 20m)

> Typing library no longer provisional in Python 3.7
> --------------------------------------------------
>
>                 Key: BEAM-5607
>                 URL: https://issues.apache.org/jira/browse/BEAM-5607
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-py-core
>            Reporter: Manu Zhang
>            Assignee: Manu Zhang
>            Priority: Minor
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> This is an issue coming from future since the target version in the [initial 
> proposal|https://lists.apache.org/thread.html/5371469de567357b1431606f766217ef73a9098dc45046f51a6ecceb@%3Cdev.beam.apache.org%3E]
>  is up to 3.6. Running python tests in 3.7 would throw the following error 
> because the [typing library is no longer provisional in Python 
> 3.7|https://github.com/python/typing#important-dates]
> {code}
> sdks/python/.eggs/typing-3.6.6-py3.7.egg/typing.py", line 1004, in __new__
>     self._abc_registry = extra._abc_registry
> AttributeError: type object 'Callable' has no attribute '_abc_registry'
> {code}



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

Reply via email to