-
Notifications
You must be signed in to change notification settings - Fork 31
CI: Configure astral-sh/setup-uv to use the right Python version
#778
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
base: main
Are you sure you want to change the base?
Conversation
actions/setup-python recipe
6d30e52 to
9fc1a08
Compare
f544dea to
eeb0a56
Compare
mfussenegger
left a comment
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.
The setup-uv action needs to be configured with the desired python version. See https://github.com/astral-sh/setup-uv?tab=readme-ov-file#python-version
Using both uv and actions/setup-python imho doesn't make much sense. Should be either/or
docs/by-example/http.rst
Outdated
| When connecting to non-CrateDB servers, the HttpClient will raise a ConnectionError like this: | ||
|
|
||
| >>> http_client = HttpClient(["https://example.org/"]) | ||
| >>> http_client = HttpClient(["https://httpbin.org/html"]) |
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.
Why change this? example.org is specifically for use in documentation examples.
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.
eeb0a56 was needed because CI/GHA started failing on macOS when using more recent versions than Python 3.12. I also don't like the change: Maybe you have an idea how to solve it differently?
HTTPSConnectionPool(host='www.example.org', port=443): Max retries exceeded
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1081)
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.
It looks like example.org or GitHub runners fixed their certificates or certificate bundles, so this update was removed again.
| - name: Set up uv | ||
| uses: astral-sh/setup-uv@v7 | ||
| with: | ||
| cache-dependency-glob: | | ||
| pyproject.toml | ||
| python-version: ${{ matrix.python-version }} | ||
| cache-suffix: ${{ matrix.python-version }} |
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.
@mfussenegger: 3a70d51 now configures the astral-sh/setup-uv properly, and removes the actions/setup-python recipe again. Thanks!
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.
Python 3.10 slot now actually uses Python 3.10. 👍
actions/setup-python recipeastral-sh/setup-uv to use the right Python version
0f21a92 to
0379dc7
Compare
05787d3 to
279b4a6
Compare
Problem
No matter what the test matrix slot designates, CI/GHA will (currently) always use Python 3.12, which seems to be the default Python on the selected runner image. Example: Python 3.11 test matrix slot selects Python 3.12.
Outcome
CI: Re-add missing
actions/setup-pythonrecipe (solution)CI: Fix HTTP certificate error when requesting example.org from GHA (side-effect)
Unrelated
CI: Trim
releaseworkflow. It will be fine using the default Python.CI: Validate
releaseworkflow. Only push to PyPI on designated event.