-
Notifications
You must be signed in to change notification settings - Fork 82
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
Pin Python version to 3.11 #1118
Conversation
And, it fails CI as expected, rhods-ci-pr-test/2308
So, I'll have to update Python in CI. Then, I'll announce that contributors should do |
Here is a CI image update that needs to be merged first, |
Robot Results
|
Also need Python 3.11 in the Dockerfile here, https://github.com/red-hat-data-services/ods-ci/blob/master/ods_ci/build/Dockerfile |
f34449e
to
d80de04
Compare
CI: rhods-ci-pr-test/2323 (smokes do run) New CI runs:
both jobs currently in progress |
Here are "migration" steps. After this is merged, your existing ods-ci checkout will start failing on various
So you do
and you are good. |
I've added the "do not merge" label until we have an agreement on slack about merging this |
30589fb
to
3a51201
Compare
## Why pin the Python version? Because we _can_ put everybody on the same version. This way, we make it less likely different people will hit different issues. ## Why use Python 3.11? It is well established, binary wheels exist for it in PyPI, it is available on UBI 8 and 9, and on Fedora starting with Fedora 37. ## Why say `python = ">=3.11.5, <3.12.0"`? The syntax uses basic math instead of tildes and carets, which not everybody might've learned what they mean. That makes the requirement easier to read and understand. Signed-off-by: Jiri Daněk <jdanek@redhat.com>
3a51201
to
65e8302
Compare
Quality Gate passedIssues Measures |
This should be all the needed changes. Now onto rechecking it in CI. |
There are two todo's that I'll do when this is merged
|
@@ -24,16 +24,16 @@ def __init__(self): | |||
self._message = MIMEMultipart() | |||
|
|||
def prepare_payload( | |||
self, text: str = "", attachments: Optional[List[Any]] = None | |||
self, text: str = "", attachments: list[Any] | None = None |
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?
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.
linter wants this when you have a py3.11 project
at some point they made list[...] be an alias for typing.List[...], so that's a cleanup it wants
not sure about why it dislikes Optional, that should be fine imo, and | None is not a clear win in my eyes
job/rhods/job/rhods-ci-pr-test/2487, still looks good |
This is a followup of [1,2] and fixes image build creation after we moved from Python 3.9 to Python 3.11 On top of that, it also removes dnf cache after all installation is done. There is no change in the sice of resulting image but it's a standard step to do in the Dockerfiles in general. [1] red-hat-data-services#1118 [2] 867a617
This is a followup of [1,2] and fixes image build creation after we moved from Python 3.9 to Python 3.11 On top of that, it also removes dnf cache after all installation is done. There is no change in the sice of resulting image but it's a standard step to do in the Dockerfiles in general. [1] #1118 [2] 867a617
Don't we pin Python already?
We don't, or not strictly enough. Currently we have
ods-ci/pyproject.toml
Lines 9 to 10 in afa1de6
which means "use any Python
>=3.8.1, <4.0.0
".Why pin Python version?
Because we can put everybody on the same version.
This way,
we make it less likely different people will hit different infra issues.
Why use Python 3.11?
It is well established,
binary wheels exist for it in PyPI,
it is available on UBI 8 and 9, and on Fedora starting with Fedora 37.
Why say
python = ">=3.11.5, <3.12.0"
?The syntax uses basic math instead of tildes and carets,
which not everybody might've learned what they mean.
That makes the requirement easier to read and understand.
Will this break CI infra?
Most likely, which is why this PR exists, to try things out.All things in order, everything is very good, 🌈 🦄 🌇