diff --git a/HISTORY.rst b/HISTORY.rst index 10e34bb55..60e978958 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/azure-pipelines-templates/run-tests.yml b/azure-pipelines-templates/run-tests.yml index bc402c42c..6c60b39c8 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 diff --git a/setup.py b/setup.py index cf3304f91..9240486b5 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 b682e87eb..fea25deba 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 diff --git a/tests/test_client.py b/tests/test_client.py index e29c6158d..4a81996f1 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 = {