Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/trigger_files/beam_PostCommit_Python.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"comment": "Modify this file in a trivial way to cause this test suite to run.",
"modification": 11
"modification": 12
}

14 changes: 12 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ tasks.register("pythonPreCommit") {
dependsOn(":sdks:python:test-suites:tox:py310:preCommitPy310")
dependsOn(":sdks:python:test-suites:tox:py311:preCommitPy311")
dependsOn(":sdks:python:test-suites:tox:py312:preCommitPy312")
dependsOn(":sdks:python:test-suites:tox:py313:preCommitPy313")
}

tasks.register("pythonPreCommitIT") {
Expand All @@ -499,6 +500,7 @@ tasks.register("pythonDockerBuildPreCommit") {
dependsOn(":sdks:python:container:py310:docker")
dependsOn(":sdks:python:container:py311:docker")
dependsOn(":sdks:python:container:py312:docker")
dependsOn(":sdks:python:container:py313:docker")
}

tasks.register("pythonLintPreCommit") {
Expand Down Expand Up @@ -546,14 +548,22 @@ tasks.register("python312PostCommit") {
dependsOn(":sdks:python:test-suites:dataflow:py312:inferencePostCommitITPy312")
}

tasks.register("python313PostCommit") {
dependsOn(":sdks:python:test-suites:dataflow:py313:postCommitIT")
dependsOn(":sdks:python:test-suites:direct:py313:postCommitIT")
dependsOn(":sdks:python:test-suites:direct:py313:hdfsIntegrationTest")
dependsOn(":sdks:python:test-suites:portable:py313:postCommitPy312")
dependsOn(":sdks:python:test-suites:dataflow:py313:inferencePostCommitITPy312")
}

tasks.register("portablePythonPreCommit") {
dependsOn(":sdks:python:test-suites:portable:py39:preCommitPy39")
dependsOn(":sdks:python:test-suites:portable:py312:preCommitPy312")
dependsOn(":sdks:python:test-suites:portable:py313:preCommitPy313")
}

tasks.register("pythonSparkPostCommit") {
dependsOn(":sdks:python:test-suites:portable:py39:sparkValidatesRunner")
dependsOn(":sdks:python:test-suites:portable:py312:sparkValidatesRunner")
dependsOn(":sdks:python:test-suites:portable:py313:sparkValidatesRunner")
}

tasks.register("websitePreCommit") {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ docker_image_default_repo_prefix=beam_
# supported flink versions
flink_versions=1.17,1.18,1.19
# supported python versions
python_versions=3.9,3.10,3.11,3.12
python_versions=3.9,3.10,3.11,3.12,3.13
2 changes: 1 addition & 1 deletion sdks/python/apache_beam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
import warnings

if sys.version_info.major == 3:
if sys.version_info.minor <= 8 or sys.version_info.minor >= 13:
if sys.version_info.minor <= 8 or sys.version_info.minor >= 14:
warnings.warn(
'This version of Apache Beam has not been sufficiently tested on '
'Python %s.%s. You may encounter bugs or missing features.' %
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@

_LOGGER = logging.getLogger(__name__)

_PYTHON_VERSIONS_SUPPORTED_BY_DATAFLOW = ['3.9', '3.10', '3.11', '3.12']
_PYTHON_VERSIONS_SUPPORTED_BY_DATAFLOW = ['3.9', '3.10', '3.11', '3.12', '3.13']


class Environment(object):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ def test_interpreter_version_check_passes_py39(self):

@mock.patch(
'apache_beam.runners.dataflow.internal.apiclient.sys.version_info',
(3, 13, 0))
(3, 14, 0))
@mock.patch(
'apache_beam.runners.dataflow.internal.apiclient.'
'beam_version.__version__',
Expand Down
2 changes: 1 addition & 1 deletion sdks/python/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from apache_beam.options import pipeline_options
from apache_beam.testing.test_pipeline import TestPipeline

MAX_SUPPORTED_PYTHON_VERSION = (3, 8)
MAX_SUPPORTED_PYTHON_VERSION = (3, 13)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you remind me please, what is the impact of this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one I genuinely just saw while I was going through the code base and updated (since 3.8 hasn't been the max supported python version in quite some time.) I don't think the variable is particularly load bearing since we haven't been using 3.8 for months



def pytest_addoption(parser):
Expand Down
4 changes: 3 additions & 1 deletion sdks/python/container/base_image_requirements_manual.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ cython>=3,<4
# some versions of libraries that launch Beam pipelines, like tensorflow-transform.
# Leaving 'future' in our containers for now prevent breaking tft users.
future
google-cloud-profiler
# google-cloud-profiler is not compatible with python 3.13 (and is not
# explicitly compatible with python 3.12)
google-cloud-profiler;python_version<="3.12"
guppy3
mmh3 # Optimizes execution of some Beam codepaths. TODO: Make it Beam's dependency.
nltk # Commonly used for natural language processing.
Expand Down
28 changes: 28 additions & 0 deletions sdks/python/container/distroless/py313/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

plugins {
id 'base'
id 'org.apache.beam.module'
}
applyDockerNature()
applyPythonNature()

pythonVersion = '3.13'

apply from: "../common.gradle"
171 changes: 171 additions & 0 deletions sdks/python/container/py313/base_image_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Autogenerated requirements file for Apache Beam py313 container image.
# Run ./gradlew :sdks:python:container:generatePythonRequirementsAll to update.
# Do not edit manually, adjust ../base_image_requirements_manual.txt or
# Apache Beam's setup.py instead, and regenerate the list.
# You will need Python interpreters for all versions supported by Beam, see:
# https://s.apache.org/beam-python-dev-wiki
# Reach out to a committer if you need help.

annotated-types==0.7.0
anyio==4.9.0
attrs==25.3.0
beautifulsoup4==4.13.4
bs4==0.0.2
build==1.2.2.post1
cachetools==5.5.2
certifi==2025.4.26
cffi==1.17.1
charset-normalizer==3.4.2
click==8.2.0
crcmod==1.7
cryptography==45.0.2
Cython==3.1.1
Deprecated==1.2.18
deprecation==2.1.0
dill==0.3.1.1
dnspython==2.7.0
docker==7.1.0
docopt==0.6.2
docstring_parser==0.16
execnet==2.1.1
fastavro==1.11.1
fasteners==0.19
freezegun==1.5.1
future==1.0.0
google-api-core==2.24.2
google-apitools==0.5.32
google-auth==2.40.1
google-auth-httplib2==0.2.0
google-cloud-aiplatform==1.93.1
google-cloud-bigquery==3.33.0
google-cloud-bigquery-storage==2.31.0
google-cloud-bigtable==2.30.1
google-cloud-core==2.4.3
google-cloud-datastore==2.21.0
google-cloud-dlp==3.29.0
google-cloud-language==2.17.1
google-cloud-pubsub==2.29.0
google-cloud-pubsublite==1.12.0
google-cloud-recommendations-ai==0.10.17
google-cloud-resource-manager==1.14.2
google-cloud-spanner==3.54.0
google-cloud-storage==2.19.0
google-cloud-videointelligence==2.16.1
google-cloud-vision==3.10.1
google-crc32c==1.7.1
google-genai==1.16.1
google-resumable-media==2.7.2
googleapis-common-protos==1.70.0
greenlet==3.2.2
grpc-google-iam-v1==0.14.2
grpc-interceptor==0.15.4
grpcio==1.71.0
grpcio-status==1.71.0
guppy3==3.1.5
h11==0.16.0
hdfs==2.7.3
httpcore==1.0.9
httplib2==0.22.0
httpx==0.28.1
hypothesis==6.131.20
idna==3.10
importlib_metadata==8.6.1
iniconfig==2.1.0
jaraco.classes==3.4.0
jaraco.context==6.0.1
jaraco.functools==4.1.0
jeepney==0.9.0
Jinja2==3.1.6
joblib==1.5.0
jsonpickle==3.4.2
jsonschema==4.23.0
jsonschema-specifications==2025.4.1
keyring==25.6.0
keyrings.google-artifactregistry-auth==1.1.2
MarkupSafe==3.0.2
mmh3==5.1.0
mock==5.2.0
more-itertools==10.7.0
nltk==3.9.1
numpy==2.2.6
oauth2client==4.1.3
objsize==0.7.1
opentelemetry-api==1.33.1
opentelemetry-sdk==1.33.1
opentelemetry-semantic-conventions==0.54b1
orjson==3.10.18
overrides==7.7.0
packaging==25.0
pandas==2.2.3
parameterized==0.9.0
pluggy==1.6.0
proto-plus==1.26.1
protobuf==5.29.4
psycopg2-binary==2.9.10
pyarrow==18.1.0
pyarrow-hotfix==0.7
pyasn1==0.6.1
pyasn1_modules==0.4.2
pycparser==2.22
pydantic==2.11.4
pydantic_core==2.33.2
pydot==1.4.2
PyHamcrest==2.1.0
PyJWT==2.9.0
pymongo==4.13.0
PyMySQL==1.1.1
pyparsing==3.2.3
pyproject_hooks==1.2.0
pytest==7.4.4
pytest-timeout==2.4.0
pytest-xdist==3.6.1
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==6.0.2
redis==5.3.0
referencing==0.36.2
regex==2024.11.6
requests==2.32.3
requests-mock==1.12.1
rpds-py==0.25.0
rsa==4.9.1
scikit-learn==1.6.1
scipy==1.15.3
SecretStorage==3.3.3
setuptools==80.8.0
shapely==2.1.1
six==1.17.0
sniffio==1.3.1
sortedcontainers==2.4.0
soupsieve==2.7
SQLAlchemy==2.0.41
sqlparse==0.5.3
tenacity==8.5.0
testcontainers==3.7.1
threadpoolctl==3.6.0
tqdm==4.67.1
typing-inspection==0.4.0
typing_extensions==4.13.2
tzdata==2025.2
urllib3==2.4.0
virtualenv-clone==0.5.7
websockets==15.0.1
wheel==0.45.1
wrapt==1.17.2
zipp==3.21.0
zstandard==0.23.0
28 changes: 28 additions & 0 deletions sdks/python/container/py313/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

plugins {
id 'base'
id 'org.apache.beam.module'
}
applyDockerNature()
applyPythonNature()

pythonVersion = '3.13'

apply from: "../common.gradle"
1 change: 1 addition & 0 deletions sdks/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ def get_portability_package_data():
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
# When updating version classifiers, also update version warnings
# above and in apache_beam/__init__.py.
'Topic :: Software Development :: Libraries',
Expand Down
24 changes: 24 additions & 0 deletions sdks/python/test-suites/dataflow/py313/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

apply plugin: org.apache.beam.gradle.BeamModulePlugin
applyPythonNature()

// Required to setup a Python 3 virtualenv and task names.
pythonVersion = '3.13'
apply from: "../common.gradle"
24 changes: 24 additions & 0 deletions sdks/python/test-suites/direct/py313/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

plugins { id 'org.apache.beam.module' }
applyPythonNature()

// Required to setup a Python 3 virtualenv and task names.
pythonVersion = '3.13'
apply from: '../common.gradle'
Loading
Loading