Skip to content

Commit

Permalink
Warn when using Beam with Python 3.8 (#32484)
Browse files Browse the repository at this point in the history
* Warn when using Beam with Python 3.8

* Call out in CHANGES.md

* formatting
  • Loading branch information
jrmccluskey authored Sep 18, 2024
1 parent 019efe1 commit 3105260
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@
## Deprecations

* X behavior is deprecated and will be removed in X versions ([#X](https://github.com/apache/beam/issues/X)).
* Python 3.8 is reaching EOL and support is being removed in Beam 2.61.0. The 2.60.0 release will warn users
when running on 3.8. ([#31192](https://github.com/apache/beam/issues/31192))

## Bugfixes

Expand Down
6 changes: 6 additions & 0 deletions sdks/python/apache_beam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@
'This version of Apache Beam has not been sufficiently tested on '
'Python %s.%s. You may encounter bugs or missing features.' %
(sys.version_info.major, sys.version_info.minor))
elif sys.version_info.minor == 8:
warnings.warn(
'Python 3.8 reaches EOL in October 2024 and support will '
'be removed from Apache Beam in version 2.61.0. See '
'https://github.com/apache/beam/issues/31192 for more '
'information.')
pass
else:
raise RuntimeError(
Expand Down
5 changes: 5 additions & 0 deletions sdks/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,11 @@ def get_portability_package_data():
'This version of Apache Beam has not been sufficiently tested on '
'Python %s.%s. You may encounter bugs or missing features.' %
(sys.version_info.major, sys.version_info.minor))
elif sys.version_info.major == 3 and sys.version_info.minor == 8:
warnings.warn('Python 3.8 reaches EOL in October 2024 and support will '
'be removed from Apache Beam in version 2.61.0. See '
'https://github.com/apache/beam/issues/31192 for more '
'information.')

if __name__ == '__main__':
# In order to find the tree of proto packages, the directory
Expand Down

0 comments on commit 3105260

Please sign in to comment.