Skip to content

Commit

Permalink
Merge branch 'main' into version-testing-20240910
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene-lumigo authored Sep 17, 2024
2 parents eb37850 + 1691ea3 commit 0c3ebf6
Show file tree
Hide file tree
Showing 29 changed files with 105 additions and 1,276 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.0.155
current_version = 1.0.156
commit = True
tag = True

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
strategy:
fail-fast: false # Prevent a single failure in the matrix from stopping all other jobs
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
integration-test-family: ${{ fromJson(needs.list-instrumentations.outputs.integration-tests) }}
name: ${{ matrix.python-version }} ${{ matrix.integration-test-family }}
steps:
Expand All @@ -52,7 +52,7 @@ jobs:
strategy:
fail-fast: false # Prevent a single failure in the matrix from stopping all other jobs
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
name: Component Test for Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/version-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
# If this key gets renamed, noxfile.py needs to be updated accordingly
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
name: test-untested-versions
steps:
- uses: actions/checkout@v3
Expand All @@ -26,7 +26,7 @@ jobs:
- run: git --no-pager diff
- run: mkdir versions_artifact
- run: for path in `git diff --name-only`; do cp "$path" versions_artifact; done
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.python-version }}
path: versions_artifact
Expand All @@ -42,11 +42,6 @@ jobs:
with:
python-version: 3.7
- run: mkdir versions_artifacts
- uses: actions/download-artifact@v2
continue-on-error: true # when there aren't changes the artifact won't be uploaded and this step will fail
with:
name: 3.7
path: versions_artifacts/3.7
- uses: actions/download-artifact@v2
continue-on-error: true
with:
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,16 @@ from opentelemetry.trace import get_current_span
get_current_span().add_event('<error-message>', {'lumigo.type': '<error-type>'})
```

## Python 3.7 Support

**Deprecation Notice:** As of version 1.0.156, support for Python 3.7 has been deprecated. The last version of the Lumigo OpenTelemetry Distro to support Python 3.7 is version 1.0.155.

For users on Python 3.7, we recommend upgrading to a newer version of Python to ensure continued compatibility and access to the latest features and improvements.


## Supported runtimes

* cpython: 3.7.x, 3.8.x, 3.9.x, 3.10.x, 3.11.x
* cpython: 3.8.x, 3.9.x, 3.10.x, 3.11.x

## Supported packages

Expand Down
5 changes: 1 addition & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,10 +481,7 @@ def integration_tests_flask(session, flask_version):

# override the default Werkzeug version for flask v2 compatibility
if flask_version.startswith("2."):
if python == "3.7":
session.install("werkzeug==2.2.3")
else:
session.install("werkzeug==2.3.7")
session.install("werkzeug==2.3.7")

try:
session.run(
Expand Down
2 changes: 1 addition & 1 deletion scripts/init_tested_versions.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

PACKAGE_NAME="$1"
SUPPORTED_VERSIONS=(3.7 3.8 3.9 3.10 3.11)
SUPPORTED_VERSIONS=(3.8 3.9 3.10 3.11)

if [ -z "$PACKAGE_NAME" ]; then
echo "Usage: $0 <PACKAGE_NAME>"
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ classifiers =
package_dir =
= src
packages = find:
python_requires = >=3.7
python_requires = >=3.8

[options.packages.find]
where = src
40 changes: 20 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@
"autowrapt>=1.0",
"wrapt>=1.11.0",
"lumigo_core==0.0.10",
"opentelemetry-api==1.22.0",
"opentelemetry-sdk==1.22.0",
"opentelemetry-sdk-extension-aws==2.0.1",
"opentelemetry-exporter-otlp-proto-http==1.22.0",
"opentelemetry-semantic-conventions==0.43b0",
"opentelemetry-instrumentation==0.43b0",
"opentelemetry-instrumentation-asgi==0.43b0",
"opentelemetry-instrumentation-boto==0.43b0",
"opentelemetry-instrumentation-fastapi==0.43b0",
"opentelemetry-instrumentation-flask==0.43b0",
"opentelemetry-instrumentation-grpc==0.43b0",
"opentelemetry-instrumentation-kafka-python==0.43b0",
"opentelemetry-instrumentation-pika==0.43b0",
"opentelemetry-instrumentation-psycopg2==0.43b0",
"opentelemetry-instrumentation-pymongo==0.43b0",
"opentelemetry-instrumentation-pymysql==0.43b0",
"opentelemetry-instrumentation-requests==0.43b0",
"opentelemetry-instrumentation-redis==0.43b0",
"opentelemetry-instrumentation-django==0.43b0",
"opentelemetry-instrumentation-logging==0.43b0",
"opentelemetry-api==1.26.0",
"opentelemetry-sdk==1.26.0",
"opentelemetry-sdk-extension-aws==2.0.2",
"opentelemetry-exporter-otlp-proto-http==1.26.0",
"opentelemetry-semantic-conventions==0.47b0",
"opentelemetry-instrumentation==0.47b0",
"opentelemetry-instrumentation-asgi==0.47b0",
"opentelemetry-instrumentation-boto==0.47b0",
"opentelemetry-instrumentation-fastapi==0.47b0",
"opentelemetry-instrumentation-flask==0.47b0",
"opentelemetry-instrumentation-grpc==0.47b0",
"opentelemetry-instrumentation-kafka-python==0.47b0",
"opentelemetry-instrumentation-pika==0.47b0",
"opentelemetry-instrumentation-psycopg2==0.47b0",
"opentelemetry-instrumentation-pymongo==0.47b0",
"opentelemetry-instrumentation-pymysql==0.47b0",
"opentelemetry-instrumentation-requests==0.47b0",
"opentelemetry-instrumentation-redis==0.47b0",
"opentelemetry-instrumentation-django==0.47b0",
"opentelemetry-instrumentation-logging==0.47b0",
# v4.7.1 is the last version that supports python 3.7
"typing_extensions==4.7.1; python_version<'3.8'",
# v6.7.0 is the last version that supports python 3.7
Expand Down
2 changes: 1 addition & 1 deletion src/lumigo_opentelemetry/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.155
1.0.156
17 changes: 17 additions & 0 deletions src/lumigo_opentelemetry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,23 @@ def auto_load(_: Any) -> None:


def init() -> Dict[str, Any]:
"""Initialize the Lumigo OpenTelemetry distribution."""

try:
python_version = sys.version_info
# Check if the major version is 3 and the minor version is between 8 and 11
if python_version.major != 3 or not (8 <= python_version.minor <= 11):
logger.warning(
f"Unsupported Python version {python_version.major}.{python_version.minor}; "
"only Python 3.8 to 3.11 are supported."
)
return {}

except Exception as e: # Catch any issues with accessing sys.version_info
# Log a warning if there is a failure in verifying the Python version
logger.warning("Failed to verify the Python version due to: %s", str(e))
return {}

if str(os.environ.get("LUMIGO_SWITCH_OFF", False)).lower() == "true":
logger.info(
"Lumigo OpenTelemetry distribution disabled via the 'LUMIGO_SWITCH_OFF' environment variable"
Expand Down
Loading

0 comments on commit 0c3ebf6

Please sign in to comment.