Skip to content
This repository was archived by the owner on May 16, 2026. It is now read-only.

feat: Enable support and testing for python 3.11 - #512

Merged
chalmerlowe merged 11 commits into
googleapis:mainfrom
mr-mcox:support-py-3_11
Jan 5, 2023
Merged

feat: Enable support and testing for python 3.11#512
chalmerlowe merged 11 commits into
googleapis:mainfrom
mr-mcox:support-py-3_11

Conversation

@mr-mcox

Copy link
Copy Markdown
Contributor

Done:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes#500 🦕

I followed the pattern from the support for python 3.10 PR , so I hope that I caught everything that needed to change.

@mr-mcox
mr-mcox requested review from a team and prash-miNovember 28, 2022 20:23
@conventional-commit-lint-gcf

conventional-commit-lint-gcfBot commented Nov 28, 2022

Copy link
Copy Markdown

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@product-auto-labelproduct-auto-labelBot added size: s Pull request size is small. api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. labels Nov 28, 2022
@atrigent

Copy link
Copy Markdown

Is there a particular reason for the upper bound on the python version? This library doesn't seem particularly likely to be broken by new Python versions.

@mr-mcox

Copy link
Copy Markdown
ContributorAuthor

There's no reason that I know of - I was following the established convention. I'm happy to remove it if a reviewer believes that we're better off without an upper bound.

@Chum4k3r

Copy link
Copy Markdown

Please, review and aprove this!

@EugeneTorap

Copy link
Copy Markdown

@tswast@parthea@chalmerlowe Can you merge it?

@chalmerlowe

Copy link
Copy Markdown
Contributor

@tswast@parthea@chalmerlowe Can you merge it?

I will look at this later today. We did a similar change to Python-BIgquery just recently, so this makes sense.

@mr-mcox

Copy link
Copy Markdown
ContributorAuthor

@chalmerlowe Have you had a chance to review? I'm happy to make changes that you believe are needed.

@mr-mcox

Copy link
Copy Markdown
ContributorAuthor

@tswast@parthea@chalmerlowe@prash-mi Is there anything I can do to facilitate this PR getting reviewed? It has been waiting on a review for over a month and I anticipate this being a pretty straightforward review.

Comment threadnoxfile.py
"alembic",
],
"3.10": [
"3.11": [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@tswast

What are our guidelines on what goes into the Unit Test Extras?
Are those always used solely in conjunction with the earliest and latest Python Versions?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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 setup.py and our contraints files are correct. Latest SGTM so long as the extra dependencies have been released. In the past we'd update before pyarrow had cut a release, but this doesn't appear to be the case right now.

@tswasttswast added the kokoro:run Add this label to force Kokoro to re-run the tests. label Jan 3, 2023
@yoshi-kokoroyoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Jan 3, 2023
@product-auto-labelproduct-auto-labelBot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Jan 3, 2023
@@ -0,0 +1,40 @@
# Format: //devtools/kokoro/config/proto/build.proto

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
ContributorAuthor

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.

@mr-mcoxmr-mcoxJan 3, 2023

Copy link
Copy Markdown
ContributorAuthor

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.

@product-auto-labelproduct-auto-labelBot added size: s Pull request size is small. and removed size: m Pull request size is medium. labels Jan 3, 2023
@mr-mcox

Copy link
Copy Markdown
ContributorAuthor

@tswast While you can't easily see the build now, Kokoro failed: 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

It complained of Session unit-3.11 failed: Python interpreter 3.11 not found.. Is there something that I should change in configuration to resolve that error or does someone internally need to handle it?

Secondly, while poking around in there, I realized that owlbot seems to generate the Kokoro configuration files and one hasn't been created for Python 3.11. Should that be done before this PR is ready to release?

@partheaparthea added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Jan 4, 2023
@gcf-owl-botgcf-owl-botBot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 4, 2023
@yoshi-kokoroyoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jan 4, 2023
@chalmerlowe

Copy link
Copy Markdown
Contributor

@mr-mcox

My colleague parthea jumped in and added Python 3.11 to our docker images via a separate repo that controls some of what happens in our CI/CD pipeline. That may help to clear up some of the issues associated with a missing 3.11 interpreter in both this and another of our repositories.

I appreciate all you are doing to try and assist with moving this forward.
Apologies that this is taking so long.

@partheaparthea added the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 4, 2023
@gcf-owl-botgcf-owl-botBot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 4, 2023
@partheaparthea added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Jan 4, 2023
@gcf-owl-botgcf-owl-botBot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 4, 2023
@yoshi-kokoroyoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jan 4, 2023
@mr-mcox

Copy link
Copy Markdown
ContributorAuthor

@chalmerlowe@parthea I'm curious how you'd like to handle the failures on the current build. It appears that "Kokoro prerelease" is failing because nox is allowing the prerelease installation of sqlalchemy and sqlalchemy 2.0.0 is in pre-release. This contradicts the dependencies of python-biquery-sqlalchemy, which requires sqlalchemy to be < 2.0.0.

Do you want to:

  • Specify in nox that sqlalchemy needs to be < 2.0.0
  • Remove sqlalchemy from the pre-release check
  • Something else?

The SQLAlchemy compliance check is failing and complaining about legacy features not available in sqlalchemy 2.0, and I'm curious if the method of addressing the pre-release check would inform the compliance check as well.

@tswast

Copy link
Copy Markdown
Contributor

The prerelease checks are not required to pass in order to merge, and since the failures aren't caused by this change, we can safely ignore.

@chalmerlowechalmerlowe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@chalmerlowe

Copy link
Copy Markdown
Contributor

As noted by @tswast compliance and prerelease tests are not caused by this change, but as demonstrated by @mr-mcox they are a result of the fact that the sqlalchemy project has V2 of slqalchemy tagged as pre-release and this library is not compatible with V2.

I am fine with merging this change to enable the use of Python 3.11.

@chalmerlowe
chalmerlowe merged commit f826d83 into googleapis:mainJan 5, 2023
@release-pleaserelease-pleaseBot mentioned this pull request Jan 5, 2023
@mr-mcox
mr-mcox deleted the support-py-3_11 branch January 5, 2023 15:29
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigqueryIssues related to the googleapis/python-bigquery-sqlalchemy API.size: sPull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Python 3.11

8 participants

@mr-mcox@atrigent@Chum4k3r@EugeneTorap@chalmerlowe@tswast@parthea@yoshi-kokoro