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
Add python 3.11 support #1253
Add python 3.11 support #1253
Conversation
* Update the Python versions test matrix for CI tests * Update setup.py to include Python 3.11 version in the classifiers list
Reason: when running tests I got DeprecationWarning: HTTPResponse.getheader() is deprecated and will be removed in urllib3 v2.1.0. Instead use HTTResponse.headers.get(name, default).
@@ -166,7 +166,7 @@ def _handle_redirect_response( | |||
307: ("Redirect", "Temporary redirect"), | |||
400: ("BadRequest", "Bad request"), | |||
}.get(response.status, (None, None)) | |||
region = response.getheader("x-amz-bucket-region") | |||
region = response.headers.get("x-amz-bucket-region") |
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.
This PR #1249 fixed and passed CI on Ubuntu
and Windows
. You would need to add macos
in Github workflow to get it passed.
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.
Ok, will add the github workflow with macos-latest like the others although it's not clear the architecture (https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md, I assume still Intel if not specified there...)
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.
Added
* This file adds a GitHub workflow for macos runners. It uses the latest available mac os in the GitHub runners, which might not be the latest OS released to the public. Here is assumed a Mac with Intel chip, since through simple CTRL+F the page https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md didn't show reference to M1 chips
Removed the action |
@balamurugana Any idea about this error: https://github.com/minio/minio-py/actions/runs/3741803675/jobs/6352419060#step:7:21 ? |
You would need to |
* Install wget if it doesn't exist
* wget seems to exit with code 5 which is SSL verification failure: https://www.gnu.org/software/wget/manual/wget.html#Basic-Startup-Options
* Try if installing the ca-certificates via Homebrew for mac os runs solves the wget problem
if ! [ -x "$(command -v wget)" ]; then | ||
brew install wget | ||
fi | ||
- name: Run functional tests |
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.
You could remove functional tests task entirely including above wget
install. It is OK not to run in macos
now.
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.
Sure, will do it! It looks like was an error with self-signed certificates that prevents the download, probably a bit more work to do to have it run...
wget -v -O /tmp/minio https://dl.min.io/server/minio/release/darwin-amd64/minio
--2022-12-21 00:35:11-- https://dl.min.io/server/minio/release/darwin-amd64/minio
Resolving dl.min.io (dl.min.io)... 138.68.11.125, 178.1[28](https://github.com/minio/minio-py/actions/runs/3743960059/jobs/6359613951#step:8:29).69.202
Connecting to dl.min.io (dl.min.io)|138.68.11.125|:443... connected.
ERROR: cannot verify dl.min.io's certificate, issued by ‘CN=Sectigo RSA Domain Validation Secure Server CA,O=Sectigo Limited,L=Salford,ST=Greater Manchester,C=GB’:
Self-signed certificate encountered.
To connect to dl.min.io insecurely, use `--no-check-certificate'.
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.
Done
* Remove as per comment, functional tests to run on macos-latest GitHub runner image. wget was blocked because a self-signed certificate needs to be trusted (pass the path if already in the machine) or installed.
Related: * macos-latest can currently be associated with either macos-11 or macos-12, so pinned it for the moment --> https://github.blog/changelog/2022-10-03-github-actions-jobs-running-on-macos-latest-are-now-running-on-macos-12/ * Update checkout actions and setup python actions versions * Tools not installed in PATH locations: actions/runner-images#6507 * Explicit export workaround for the only case that seems to fail (for PATH not found reasons): add PATH missing to PATH if os is macos-12 (the one pinned) and running Python 3.11
I changed something in the macos workflow due to issues from GitHub already documented in the commit message plus aligned to current master. |
* add export in macos runner for Python version < 3.11
Re-added the user local PATH to the Python versions < 3.11 that I mistakenly removed for macos runs. Sorry |
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 core dependencies used by this package seem to be running with Python version 3.11 (more checks might be due).
This is an attempt to bump the test matrix and fix a warning regarding the deprecation of
HTTPResponse.getheader()
Here the warning I was getting:
Here my environment:
MacOS 13.0.1 (M1 chip),
Anaconda Python version 3.11
and here the result of pip list