This is an automated email from the ASF dual-hosted git repository.
andreac pushed a commit to branch 3.8-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
The following commit(s) were added to refs/heads/3.8-dev by this push:
new 2bb5fcce25 Upgrade python to 3.10 (#3272)
2bb5fcce25 is described below
commit 2bb5fcce2581abca66ebe06f8f0b569d2a1fc4b2
Author: andreachild <[email protected]>
AuthorDate: Thu Nov 6 14:05:10 2025 -0800
Upgrade python to 3.10 (#3272)
Upgraded python to 3.10 and synchronized pytest version across
gremlin-python and gremlin-console. Version upgrade required modifying regex
pattern in test_web_socket_client_behavior.py to handle version numbers with
multiple decimal places.
---
.github/workflows/build-test.yml | 2 +-
CHANGELOG.asciidoc | 1 +
docs/src/upgrade/release-3.8.0.asciidoc | 1 +
gremlin-console/pom.xml | 4 ++--
gremlin-console/src/test/python/docker/Dockerfile | 2 +-
gremlin-console/src/test/python/setup.py | 2 +-
gremlin-python/docker-compose.yml | 4 ++--
gremlin-python/src/main/python/pyproject.toml | 4 ++--
.../src/main/python/tests/driver/test_web_socket_client_behavior.py | 2 +-
9 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml
index b8c2d0719c..b84f2dbebf 100644
--- a/.github/workflows/build-test.yml
+++ b/.github/workflows/build-test.yml
@@ -253,7 +253,7 @@ jobs:
- name: Set up Python 3.x
uses: actions/setup-python@v6
with:
- python-version: '3.9'
+ python-version: '3.10'
- name: Build with Maven
run: |
touch gremlin-python/.glv
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index bee2ee232d..7506380a30 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -132,6 +132,7 @@ This release also includes changes from <<release-3-7-XXX,
3.7.XXX>>.
* Fixed referenced log file name for `gremlin-archetype-server`.
* Changed some feature tests using `order()` to use specific `by()` modulators
for better result predictability.
* Upgraded Go to version 1.25.
+* Upgraded Python to version 3.10.
* Modified `RepeatUnrollStrategy` to use a more conservative approach, only
unrolling repeat loops containing safe navigation and filtering steps.
* Modified `limit()`, `skip()`, range()` in `repeat()` to track per-iteration
counters.
* Moved `Traverser` loop logic into new interface `NL_SL_Traverser` and
changed loop-supporting `Traverser`s to extend the common interface.
diff --git a/docs/src/upgrade/release-3.8.0.asciidoc
b/docs/src/upgrade/release-3.8.0.asciidoc
index 4a0335a44a..4283c484bf 100644
--- a/docs/src/upgrade/release-3.8.0.asciidoc
+++ b/docs/src/upgrade/release-3.8.0.asciidoc
@@ -1091,6 +1091,7 @@
link:https://issues.apache.org/jira/browse/TINKERPOP-3023[TINKERPOP-3023]
===== Runtime Upgrades
Gremlin Go has been upgraded to Go version 1.25.
+Gremlin Python has been upgraded to Python version 3.10.
[[set-minimum-java-version-to-11]]
TinkerPop 3.8.0 requires a minimum of Java 11 for building and running.
Support for Java 1.8 has been dropped.
diff --git a/gremlin-console/pom.xml b/gremlin-console/pom.xml
index aad002eac2..1243d9cdec 100644
--- a/gremlin-console/pom.xml
+++ b/gremlin-console/pom.xml
@@ -381,12 +381,12 @@ limitations under the License.
<target>
<exec executable="docker"
failonerror="true">
<!-- This build command relies on
Docker's caching mechanism to reduce the amount of times it is run. -->
- <arg line="build -t
gremlin-console-test:py3.9jre11 ./src/test/python/docker"/>
+ <arg line="build -t
gremlin-console-test:py3.10jre11 ./src/test/python/docker"/>
</exec>
<exec executable="docker"
failonerror="true">
<arg line="run --rm --mount
type=bind,src=${project.basedir}/src/test/python,dst=/console_app
--mount
type=bind,src=${project.basedir}/target/apache-tinkerpop-gremlin-console-${project.version}-standalone,dst=/console_app/gremlin-console
- gremlin-console-test:py3.9jre11"/>
+ gremlin-console-test:py3.10jre11"/>
</exec>
</target>
</configuration>
diff --git a/gremlin-console/src/test/python/docker/Dockerfile
b/gremlin-console/src/test/python/docker/Dockerfile
index 0bafe8e392..e20de5991b 100644
--- a/gremlin-console/src/test/python/docker/Dockerfile
+++ b/gremlin-console/src/test/python/docker/Dockerfile
@@ -16,7 +16,7 @@
# under the License.
# Image used for running integration tests for gremlin-console.
-FROM python:3.9.20-bullseye
+FROM python:3.10-bullseye
LABEL maintainer="[email protected]"
diff --git a/gremlin-console/src/test/python/setup.py
b/gremlin-console/src/test/python/setup.py
index 4914991b2e..ec53a8fa26 100644
--- a/gremlin-console/src/test/python/setup.py
+++ b/gremlin-console/src/test/python/setup.py
@@ -30,7 +30,7 @@ setup(
'importlib-metadata<3.0.0'
],
tests_require=[
- 'pytest>=4.6.4,<5.0.0',
+ 'pytest>=6.2.5,<8.0.0',
'mock>=3.0.5,<4.0.0',
'pexpect==4.8.0'
]
diff --git a/gremlin-python/docker-compose.yml
b/gremlin-python/docker-compose.yml
index 9879ae8a0c..d819467f8a 100644
--- a/gremlin-python/docker-compose.yml
+++ b/gremlin-python/docker-compose.yml
@@ -46,7 +46,7 @@ services:
gremlin-python-integration-tests:
container_name: gremlin-python-integration-tests
- image: python:3.9
+ image: python:3.10
volumes:
- ${BUILD_DIR:-./src/main/python}:/python_app
-
../gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features:/python_app/gremlin-test/features
@@ -80,7 +80,7 @@ services:
gremlin-python-package:
container_name: gremlin-python-package
- image: python:3.9
+ image: python:3.10
volumes:
- ${PACKAGE_DIR:-./src/main/python}:/python_package
working_dir: /python_package
diff --git a/gremlin-python/src/main/python/pyproject.toml
b/gremlin-python/src/main/python/pyproject.toml
index 89af9a6a30..75ff315736 100644
--- a/gremlin-python/src/main/python/pyproject.toml
+++ b/gremlin-python/src/main/python/pyproject.toml
@@ -26,7 +26,7 @@ description = "Gremlin-Python for Apache TinkerPop"
readme = {file = "README.rst", content-type = "text/x-rst"}
license = {text = "Apache 2"}
maintainers = [{name = "Apache TinkerPop", email =
"[email protected]"}]
-requires-python = ">=3.9"
+requires-python = ">=3.10"
dependencies = [
"nest_asyncio",
"aiohttp>=3.8.0,<4.0.0",
@@ -48,7 +48,7 @@ Homepage = "https://tinkerpop.apache.org"
kerberos = ["kerberos>=1.3.0,<2.0.0"]
ujson = ["ujson>=2.0.0"]
test = [
- "pytest>=4.6.4,<7.2.0",
+ "pytest>=6.2.5,<8.0.0",
"radish-bdd==0.18.2",
"PyHamcrest>=1.9.0,<3.0.0",
"PyYAML>=5.3"
diff --git
a/gremlin-python/src/main/python/tests/driver/test_web_socket_client_behavior.py
b/gremlin-python/src/main/python/tests/driver/test_web_socket_client_behavior.py
index c231792ee3..76bad8a685 100644
---
a/gremlin-python/src/main/python/tests/driver/test_web_socket_client_behavior.py
+++
b/gremlin-python/src/main/python/tests/driver/test_web_socket_client_behavior.py
@@ -72,7 +72,7 @@ def
test_should_not_include_user_agent_in_handshake_request_if_disabled(socket_s
# If the gremlin user agent is disabled, the underlying web socket library
reverts to sending its default user agent
# during connection requests.
- assert re.search("^Python/(\d\.)*\d aiohttp/(\d\.)*\d",
user_agent_response)
+ assert re.search("^Python/\d+(\.\d+)* aiohttp/\d+(\.\d+)*",
user_agent_response)
# Tests that client does not request permessage deflate compression by default