KevinGG commented on a change in pull request #14176:
URL: https://github.com/apache/beam/pull/14176#discussion_r592741715
##########
File path: sdks/python/setup.py
##########
@@ -131,6 +131,10 @@ def get_version():
# Avro 1.9.2 for python3 was broken. The issue was fixed in version 1.9.2.1
'avro-python3>=1.8.1,!=1.9.2,<1.10.0',
'crcmod>=1.7,<2.0',
+ # dataclasses backport for Python 3.6. No version boundary so that Python
+ # picks the correct one based on its version. For more details, see
+ # https://pypi.org/project/dataclasses/
+ 'dataclasses',
Review comment:
Yes it makes sense. I'll add a `python_version<3.7` TODO to remove it
when we drop Python 3.6.
**More context on why no version bound**:
Based on https://pypi.org/project/dataclasses/
>this repo should only be used for historical purposes
If you look at the "Release History" section of it, the newer version of the
package is for backport of Python 3.6.
For Python 3.7, the compatible version is actually lower (though
installation is not needed at all).
Tested as something like:
| Python version | Compatible dataclasses version |
| --------------- | -------------------------------- |
|3.7 | 0.5|
|3.8 | 0.6|
A range of versions doesn't make sense since each Python version uses a
specific version of dataclasses.
----------------------------------------------------------------
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:
[email protected]