-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Enable support and testing for python 3.11 #512
Changes from 7 commits
5d4fdaa
1bca882
5258407
bcfe5bc
6fdf0de
9656d3d
4ee7f5f
342b67e
6d3359f
f5367b0
a1f7803
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
# Build logs will be here | ||
action { | ||
define_artifacts { | ||
regex: "**/*sponge_log.xml" | ||
} | ||
} | ||
|
||
# Specify which tests to run | ||
env_vars: { | ||
key: "RUN_TESTS_SESSION" | ||
value: "py-3.11" | ||
} | ||
|
||
# Declare build specific Cloud project. | ||
env_vars: { | ||
key: "BUILD_SPECIFIC_GCLOUD_PROJECT" | ||
value: "python-docs-samples-tests-311" | ||
} | ||
|
||
env_vars: { | ||
key: "TRAMPOLINE_BUILD_FILE" | ||
value: "github/python-bigquery-sqlalchemy/.kokoro/test-samples.sh" | ||
} | ||
|
||
# Configure the docker image for kokoro-trampoline. | ||
env_vars: { | ||
key: "TRAMPOLINE_IMAGE" | ||
value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" | ||
} | ||
|
||
# Download secrets for samples | ||
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" | ||
|
||
# Download trampoline resources. | ||
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" | ||
|
||
# Use the trampoline script to run in docker. | ||
build_file: "python-bigquery-sqlalchemy/.kokoro/trampoline_v2.sh" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
env_vars: { | ||
key: "INSTALL_LIBRARY_FROM_SOURCE" | ||
value: "True" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
env_vars: { | ||
key: "INSTALL_LIBRARY_FROM_SOURCE" | ||
value: "True" | ||
} | ||
|
||
env_vars: { | ||
key: "TRAMPOLINE_BUILD_FILE" | ||
value: "github/python-bigquery-sqlalchemy/.kokoro/test-samples-against-head.sh" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
env_vars: { | ||
key: "INSTALL_LIBRARY_FROM_SOURCE" | ||
value: "False" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
env_vars: { | ||
key: "INSTALL_LIBRARY_FROM_SOURCE" | ||
value: "True" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ | |
|
||
DEFAULT_PYTHON_VERSION = "3.8" | ||
|
||
UNIT_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10"] | ||
UNIT_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11"] | ||
UNIT_TEST_STANDARD_DEPENDENCIES = [ | ||
"mock", | ||
"asyncmock", | ||
|
@@ -51,13 +51,12 @@ | |
"tests", | ||
"alembic", | ||
], | ||
"3.10": [ | ||
"3.11": [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What are our guidelines on what goes into the Unit Test Extras? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Definitely lowest so that we make sure the lower dependency bounds we have in |
||
"tests", | ||
"geography", | ||
], | ||
} | ||
|
||
SYSTEM_TEST_PYTHON_VERSIONS = ["3.8", "3.10"] | ||
SYSTEM_TEST_PYTHON_VERSIONS = ["3.8", "3.11"] | ||
SYSTEM_TEST_STANDARD_DEPENDENCIES = [ | ||
"mock", | ||
"pytest", | ||
|
@@ -74,7 +73,7 @@ | |
"tests", | ||
"alembic", | ||
], | ||
"3.10": [ | ||
"3.11": [ | ||
"tests", | ||
"geography", | ||
], | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
numpy>=1.23 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tswast
are these files typically autogenerated OR do we add the manually?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect that these are autogenerated. However, I tried adding them manually as we had a test failure relating to Kokoro: https://source.cloud.google.com/results/invocations/b41e3d1e-1e73-454d-a24a-d1a790c7b129/targets/cloud-devrel%2Fclient-libraries%2Fpython%2Fgoogleapis%2Fpython-bigquery-sqlalchemy%2Fpresubmit%2Fpresubmit/log
I believe that the failure was the result of
Session unit-3.11 failed: Python interpreter 3.11 not found.
and I was experimenting whether adding these files resolved that issue. If it doesn't I'll go ahead and remove those files.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh shoot - it appears that I can't find that out the results of that experiment without adding the
kokoro:run
label, which I'm unable to do. I'll revert those additions as it was a slim chance that this would fix the build.