-
Notifications
You must be signed in to change notification settings - Fork 684
Chore: Drop support for Python 3.8 #3399
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
...us-remote-write/src/opentelemetry/exporter/prometheus_remote_write/gen/gogoproto/gogo_pb2.py
Outdated
Show resolved
Hide resolved
26c0f26
to
71eb61e
Compare
# Starlette instrumentation is pinned to <0.15 from 2021-06-23 | ||
# This creates a dependency conflict with instrumentation-genai/opentelemetry-instrumentation-google-genai | ||
# TODO: remove exclusion when #3317 is resolved. | ||
exclude = [ | ||
"instrumentation-genai/opentelemetry-instrumentation-google-genai", | ||
"instrumentation/opentelemetry-instrumentation-starlette", | ||
] |
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 think flipping this exclusion makes more sense given how outdated the starlette instrumentation is.
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 think is going to be resolved in the fastapi middleware PR we have open
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'm not sure the fastapi middleware PR will solve that, but I'm ok with excluding it. We'll probably need to exclude it in the fastapi PR as well to make CI pass.
fba15e8
to
e2360f6
Compare
tox.ini
Outdated
# excluded from pypy3 due to missing wheel | ||
pypy3.10-test-exporter-prometheus-remote-write |
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.
pypy3.9 is missing a wheel for cramjam causing this test to fail, if we feel it's necessary we could reopen milesgranger/cramjam#185
op.operation_name(): op | ||
for op in globals().values() | ||
if inspect.isclass(op) | ||
and hasattr(op, "operation_name") |
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 condition was added here, lmdb.py
and sns.py
to resolve a test failure where inspect.isclass(op)
returned true but issubclass(op, ...
failed due to a value from globals not being recognized as a class.
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.
Wondering why they are not failing now though
e2360f6
to
4f57fa3
Compare
@@ -59,7 +60,7 @@ | |||
|
|||
|
|||
class Boto3SQSGetter(Getter[CarrierT]): | |||
def get(self, carrier: CarrierT, key: str) -> Optional[List[str]]: | |||
def get(self, carrier: CarrierT, key: str) -> Optional[list[str]]: |
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.
Maybe use from __future__ import annotations
whenever possible? Upgrading a code from 3.9 to 3.10 (and 3.11-3.13) will not require many changes.
Maybe https://docs.astral.sh/ruff/rules/future-rewritable-type-annotation/ can help with it.
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.
+1 I would prefer not touching too much code on that PR.
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!
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.
After I followed through with these changes (pyupgrade, ruff/isort enforcing future annotations) the blast radius was massive.
I've removed type changes from this PR as that change does not need to be coupled to deprecating python 3.8.
I can follow-up with the changes I had in smaller separate PRs.
Issue to track enabling the checks: #3428
4f57fa3
to
415fb0c
Compare
5e91bf0
to
cbac8ca
Compare
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 would have preferred to decouple bumping the baseline to the changes to the other hundreds of files 😅
.github/workflows/generate_workflows_lib/src/generate_workflows_lib/__init__.py
Outdated
Show resolved
Hide resolved
Agree - it's why this is still in draft. |
81f758e
to
b5dbc7b
Compare
Python 3.8 was EoL @ 2024-10-07, our 6 month promise for support ended on 2024-04-07. Changes: * Updated basline refs to 3.9 * Removed 3.8 sys.version_info checks * Fixed botocore test failure * Applied ruff formatting
b5dbc7b
to
7af57d4
Compare
@@ -19,7 +19,6 @@ classifiers = [ | |||
"Programming Language :: Python", | |||
"Programming Language :: Python :: 3", | |||
"Programming Language :: Python :: 3.7", | |||
"Programming Language :: Python :: 3.8", |
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.
We need to revisit this later 😓 we don't even support 3.7.
@@ -19,7 +19,6 @@ classifiers = [ | |||
"Programming Language :: Python", | |||
"Programming Language :: Python :: 3", | |||
"Programming Language :: Python :: 3.7", |
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.
"Programming Language :: Python :: 3.7", |
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.
Need to update the requires-python >= 3.7 too
@@ -48,6 +48,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
([[#3332](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3332)]) | |||
|
|||
|
|||
### Deprecated |
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.
Remind to update this
Description
Python 3.8 was EoL @ 2024-10-07, our 6 month promise for support will end @ 2024-04-07.
Changes:
Fixes open-telemetry/opentelemetry-python#4513
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.