From cfab2b48fc4df378ca7219adbf99b70d96d3f983 Mon Sep 17 00:00:00 2001 From: Julien Langlois <16244608+julien-lang@users.noreply.github.com> Date: Tue, 3 Jun 2025 07:08:22 -0700 Subject: [PATCH 1/3] Better CI Job Name (#388) --- azure-pipelines-templates/run-tests.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-pipelines-templates/run-tests.yml b/azure-pipelines-templates/run-tests.yml index bc402c42..6c60b39c 100644 --- a/azure-pipelines-templates/run-tests.yml +++ b/azure-pipelines-templates/run-tests.yml @@ -33,9 +33,9 @@ parameters: jobs: # The job will be named after the OS and Azure will suffix the strategy to make it unique - # so we'll have a job name "Windows Python27" for example. What's a strategy? Strategies are the - # name of the keys under the strategy.matrix scope. So for each OS we'll have " Python27" and - # " Python37". + # so we'll have a job name "Windows Python 2.7" for example. What's a strategy? Strategies are the + # name of the keys under the strategy.matrix scope. So for each OS we'll have " Python 2.7" and + # " Python 3.7". - job: ${{ parameters.name }} pool: vmImage: ${{ parameters.vm_image }} @@ -44,11 +44,11 @@ jobs: strategy: matrix: # We support these versions of Python. - Python39: + Python 3.9: python.version: '3.9' - Python310: + Python 3.10: python.version: '3.10' - Python311: + Python 3.11: python.version: '3.11' maxParallel: 4 From 209949404121add444ecd3776c19ba1085d84935 Mon Sep 17 00:00:00 2001 From: Carlos Villavicencio <123113322+carlos-villavicencio-adsk@users.noreply.github.com> Date: Tue, 10 Jun 2025 15:25:00 -0500 Subject: [PATCH 2/3] SG-37924 Replace `utcfromtimestamp` for Python 3.12 (#390) * Replace `utcfromtimestamp` for Python 3.12 * Support expected value --- tests/test_client.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_client.py b/tests/test_client.py index e29c6158..4a81996f 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -587,7 +587,12 @@ def test_transform_data(self): now = datetime.datetime.fromtimestamp(timestamp).replace( microsecond=0, tzinfo=SG_TIMEZONE.local ) - utc_now = datetime.datetime.utcfromtimestamp(timestamp).replace(microsecond=0) + utc_now = ( + datetime.datetime.fromtimestamp(timestamp, tz=datetime.timezone.utc) + .replace(microsecond=0) + .astimezone(None) + .replace(tzinfo=None) + ) local = {"date": now.strftime("%Y-%m-%d"), "datetime": now, "time": now.time()} # date will still be the local date, because they are not transformed utc = { From 7b392bde6ec033e4a1c5749117fc47214e246380 Mon Sep 17 00:00:00 2001 From: Carlos Villavicencio <123113322+carlos-villavicencio-adsk@users.noreply.github.com> Date: Wed, 11 Jun 2025 12:10:10 -0500 Subject: [PATCH 3/3] Packaging for v3.8.4 (#391) --- HISTORY.rst | 5 +++++ setup.py | 2 +- shotgun_api3/shotgun.py | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 10e34bb5..60e97895 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,11 @@ Flow Production Tracking Python API Changelog Here you can see the full list of changes between each Python API release. +v3.8.4 (2025 Jun 11) +==================== + +- Replace ``utcfromtimestamp`` to prevent breaking changes in Python 3.12. + v3.8.3 (2025 May 22) ==================== diff --git a/setup.py b/setup.py index cf3304f9..9240486b 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ setup( name="shotgun_api3", - version="3.8.2", + version="3.8.4", description="Flow Production Tracking Python API", long_description=readme, author="Autodesk", diff --git a/shotgun_api3/shotgun.py b/shotgun_api3/shotgun.py index b682e87e..fea25deb 100644 --- a/shotgun_api3/shotgun.py +++ b/shotgun_api3/shotgun.py @@ -122,7 +122,7 @@ def _is_mimetypes_broken(): # ---------------------------------------------------------------------------- # Version -__version__ = "3.8.2" +__version__ = "3.8.4" # ---------------------------------------------------------------------------- # Errors