[
https://issues.apache.org/jira/browse/BEAM-6665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16767535#comment-16767535
]
Valentyn Tymofieiev commented on BEAM-6665:
-------------------------------------------
Verified that the contents of a tarball generated on Py2 and Py3 is the same
lest a few insignificant differences in setup.cfg
{noformat}
000000000 +0000
@@ -7,21 +7,19 @@
branch = True
source = apache_beam
omit =
- # Omit auto-generated files by the protocol buffer compiler.
apache_beam/portability/api/*_pb2.py
apache_beam/portability/api/*_pb2_grpc.py
[coverage:report]
exclude_lines =
- # Have to re-enable the standard pragma
pragma: no cover
abc.abstractmethod
- # Don't complain about missing debug-only code:
+
def __repr__
if self\.debug
- # Don't complain if tests don't hit defensive assertion code:
+
raise NotImplementedError
- # Don't complain if non-runnable code isn't run:
+
if __name__ == .__main__.:
{noformat}
> SDK source tarball is different when created on Python 2 and Python 3
> ---------------------------------------------------------------------
>
> Key: BEAM-6665
> URL: https://issues.apache.org/jira/browse/BEAM-6665
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-py-core
> Reporter: Valentyn Tymofieiev
> Priority: Blocker
> Fix For: 2.11.0
>
>
> When we create a source tarball via `python setup.py sdist` on Python 2, the
> generated protocol buffer code includes relative imports.
> Because of that, a tarball created on Python 2 interpreter cannot be used on
> Python 3.
> AFAIK, we release only one source tarball to PyPi, so if possible we should
> make source distribution of Beam compatible both with Python 2 and Python 3.
> When we create a source tarball on Python 3, we call futurize on generated
> _.pb2.py files[1]. Looks like this does not happen on Python 2, which we can
> fix in this issue.
> [1]
> [[https://github.com/apache/beam/blob/d6dc3602c808ce1961f46098deb898e5c7480ad4/sdks/python/gen_protos.py#L122]
> cc [~altay], [[email protected]], [~RobbeSneyders]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)