For record, I logged https://issues.apache.org/jira/browse/BEAM-5607 and sent a
PR. This may also help anyone who run the tests locally in Python 3.7.
在 2018年9月29日 +0800 AM3:06,Valentyn Tymofieiev <valen...@google.com>,写道:
> Hi Manu,
>
> I second what Ahmet said - thanks for the pointers. Python 3.7 support can
> come later down the road.
>
> Thanks,
> Valentyn
>
> > On Fri, Sep 28, 2018 at 11:17 AM Ahmet Altay <al...@google.com> wrote:
> > > Hi Manu,
> > >
> > > Currently, we use Python 3.5.2 on Jenkins for testing. Python tests print
> > > out the python version in the console logs and I found this information
> > > from one of the logs [1]. Initial proposal for the Python 3 support was
> > > to support a specific version of python 3 during the porting process and
> > > later on work to add support for additional versions [2]. (Also note
> > > that, Python 3 was released about 3 months ago and after the porting
> > > effort started.)
> > >
> > > Hope this helps.
> > >
> > > Ahmet
> > >
> > > [1]
> > > https://builds.apache.org/view/A-D/view/Beam/job/beam_PostCommit_Python_Verify/6114/consoleFull
> > > [2]
> > > https://lists.apache.org/thread.html/5371469de567357b1431606f766217ef73a9098dc45046f51a6ecceb@%3Cdev.beam.apache.org%3E
> > >
> > > > On Thu, Sep 27, 2018 at 10:09 PM, Manu Zhang <owenzhang1...@gmail.com>
> > > > wrote:
> > > > > Hi Valentyn,
> > > > >
> > > > > I'm aware there is Python 3 environment and have worked on the
> > > > > options module. Yes, I'd love to contribute more.
> > > > > The issue I raise here is specifically about Python 3.7, where the
> > > > > dependency on typing library would fail all the tests.
> > > > > Do you know which version of Python 3 is setup for our tests ?
> > > > >
> > > > > Manu
> > > > >
> > > > > > On Fri, Sep 28, 2018 at 8:02 AM Valentyn Tymofieiev
> > > > > > <valen...@google.com> wrote:
> > > > > > > Hi Manu,
> > > > > > >
> > > > > > > We have added Python 3 environment to our tests see [1], and we
> > > > > > > are actively making changes to Beam code to make it Python
> > > > > > > 3-compatible. We are enabling tests module by module, although we
> > > > > > > have to disable some of the tests initially, when failures are
> > > > > > > likely introduced in other modules.
> > > > > > >
> > > > > > > I think @RobbeSneyders is currently working on typehints package
> > > > > > > specifically, as per our Kanban board [2].
> > > > > > >
> > > > > > > If you (or anyone else) is interested in helping with Python 3
> > > > > > > support, and has cycles to actively work on it now, please reach
> > > > > > > out - I would be happy to coordinate the effort, and help with
> > > > > > > code reviews.
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Valentyn
> > > > > > >
> > > > > > > [1]
> > > > > > > https://github.com/apache/beam/blob/5d298db4c20bbb8876a5b75142341332c1e3fb8d/sdks/python/tox.ini#L56
> > > > > > > [2]
> > > > > > > https://issues.apache.org/jira/secure/RapidBoard.jspa?rapidView=245&view=detail
> > > > > > >
> > > > > > > > On Thu, Sep 27, 2018 at 3:52 PM Manu Zhang
> > > > > > > > <owenzhang1...@gmail.com> wrote:
> > > > > > > > > Hi all,
> > > > > > > > >
> > > > > > > > > I failed to run Python tests in 3.7 with the following error.
> > > > > > > > >
> > > > > > > > > File
> > > > > > > > > "/Users/doria/git/incubator-beam/sdks/python/apache_beam/typehints/native_type_compatibility.py",
> > > > > > > > > line 23, in <module>
> > > > > > > > > import typing
> > > > > > > > > File
> > > > > > > > > "/Users/doria/git/incubator-beam/sdks/python/.eggs/typing-3.6.6-py3.7.egg/typing.py",
> > > > > > > > > line 1356, in <module>
> > > > > > > > > class Callable(extra=collections_abc.Callable,
> > > > > > > > > metaclass=CallableMeta):
> > > > > > > > > File
> > > > > > > > > "/Users/doria/git/incubator-beam/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'
> > > > > > > > >
> > > > > > > > > This is because the required typing library is not
> > > > > > > > > provisional in Python 3.7.
> > > > > > > > >
> > > > > > > > > Any thoughts on this? Shall we add Python 3.7 environment to
> > > > > > > > > our tests ?
> > > > > > > > >
> > > > > > > > > Thanks,
> > > > > > > > > Manu Zhang
> > >