Skip to content

Commit 01290d1

Browse files
authored
Install setuptools_scm via pip to fix vcs_versioning build failure (#610)
* Install setuptools_scm via pip to fix vcs_versioning ModuleNotFoundError * Fix pipeline warnings: pin Python to '3.10' and replace deprecated utcnow()
1 parent 924c215 commit 01290d1

3 files changed

Lines changed: 5 additions & 13 deletions

File tree

azure-pipelines.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ stages:
3737
- script: |
3838
python -m pip install --upgrade pip
3939
pip install -r requirements.txt
40-
# Ensure setuptools >= 69.3.0 so the sdist filename follows the
41-
# PEP 625 normalized form (azure_functions_durable-*.tar.gz).
42-
# Older setuptools emits the legacy hyphenated name, which ESRP
43-
# rejects.
44-
pip install "setuptools>=69.3.0" wheel
40+
pip install "setuptools>=69.3.0" setuptools_scm wheel
4541
# Pin an older azure-functions (< 1.26.0) that predates the
4642
# centralized df_dumps / df_loads serializers so this job exercises
4743
# the legacy serialization fallback in df_serialization. The

eng/templates/build.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,11 @@ jobs:
1212
steps:
1313
- task: UsePythonVersion@0
1414
inputs:
15-
versionSpec: '3.10.x'
15+
versionSpec: '3.10'
1616
- script: |
1717
python -m pip install --upgrade pip
1818
pip install -r requirements.txt
19-
# Ensure setuptools >= 69.3.0 so the sdist filename follows the
20-
# PEP 625 normalized form (azure_functions_durable-*.tar.gz).
21-
# Older setuptools emits the legacy hyphenated name, which ESRP
22-
# rejects.
23-
pip install "setuptools>=69.3.0" wheel
19+
pip install "setuptools>=69.3.0" setuptools_scm wheel
2420
# Pin an older azure-functions (< 1.26.0) that predates the
2521
# centralized df_dumps / df_loads serializers so this job
2622
# exercises the legacy serialization fallback in df_serialization.

tests/orchestrator/test_sequential_orchestrator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from azure.durable_functions.models.actions.WhenAnyAction import WhenAnyAction
22
from azure.durable_functions.models.actions.WhenAllAction import WhenAllAction
33
from azure.durable_functions.models.ReplaySchema import ReplaySchema
4-
from datetime import datetime, timedelta
4+
from datetime import datetime, timedelta, timezone
55
from .orchestrator_test_utils \
66
import assert_orchestration_state_equals, get_orchestration_state_result, assert_valid_schema
77
from tests.test_utils.ContextBuilder import ContextBuilder
@@ -703,7 +703,7 @@ def test_utc_time_is_never_none():
703703
def test_utc_time_updates_correctly():
704704
"""Tests that current_utc_datetime updates correctly"""
705705

706-
now = datetime.utcnow()
706+
now = datetime.now(timezone.utc).replace(tzinfo=None)
707707
# the first orchestrator-started event starts 1 second after `now`
708708
context_builder = ContextBuilder('test_simple_function', starting_time=now)
709709
add_hello_completed_events(context_builder, 0, "\"Hello Tokyo!\"")

0 commit comments

Comments
 (0)