Skip to content

Commit e51dd53

Browse files
build: Enable editable installs (#1625)
* Fix: Enable editable installs * otel packages are only supported for 3.8+ --------- Co-authored-by: hallvictoria <59299039+hallvictoria@users.noreply.github.com> Co-authored-by: hallvictoria <victoriahall@microsoft.com>
1 parent 7aac7b0 commit e51dd53

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Repository = "https://github.com/Azure/azure-functions-python-worker"
4545
dev = [
4646
"azure-eventhub", # Used for EventHub E2E tests
4747
"azure-functions-durable", # Used for Durable E2E tests
48-
"azure-monitor-opentelemetry", # Used for Azure Monitor unit tests
48+
"azure-monitor-opentelemetry; python_version >= '3.8'", # Used for Azure Monitor unit tests
4949
"flask",
5050
"fastapi~=0.103.2",
5151
"pydantic",
@@ -56,7 +56,7 @@ dev = [
5656
"requests==2.*",
5757
"coverage",
5858
"pytest-sugar",
59-
"opentelemetry-api", # Used for OpenTelemetry unit tests
59+
"opentelemetry-api; python_version >= '3.8'", # Used for OpenTelemetry unit tests
6060
"pytest-cov",
6161
"pytest-xdist",
6262
"pytest-randomly",
@@ -83,7 +83,7 @@ test-deferred-bindings = [
8383
]
8484

8585
[build-system]
86-
requires = ["setuptools>=42", "wheel"]
86+
requires = ["setuptools>=62", "wheel"]
8787
build-backend = "setuptools.build_meta"
8888

8989

tests/unittests/test_opentelemetry.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import asyncio
22
import os
3+
import sys
34
import unittest
5+
6+
from unittest import skipIf
47
from unittest.mock import MagicMock, patch
58

69
from tests.unittests.test_dispatcher import FUNCTION_APP_DIRECTORY
@@ -9,6 +12,8 @@
912
from azure_functions_worker import protos
1013

1114

15+
@skipIf(sys.version_info.minor == 7,
16+
"Packages are only supported for 3.8+")
1217
class TestOpenTelemetry(unittest.TestCase):
1318

1419
def setUp(self):

0 commit comments

Comments
 (0)