Skip to content

shotgun_api3 - compatibility with Py3.14 / Py3.15 #460

Open

Description

@patrickwolf

Now that the shotgun_api has reached Py3.13 (#382), I would like to request support for Python 3.14 and 3.15.

Even though the [VFX Reference Platform](https://vfxplatform.com/) is still at Py3.13, there are numerous benefits to later versions of Python for VFX pipelines. Considering that the ShotGrid API is a relatively small, standalone library, officially supporting newer versions gives developers the choice to use what is best for their specific projects. Currently, the only showstopper to upgrading our standalone environments might be the import of the ShotGrid API.

For example, I'm currently writing a web-based app that accesses ShotGrid on the backend. I could very much make use of the latest Python versions for that service, as there are no other strict VFX-related dependencies tying that specific app to 3.13.

To highlight why this would be so valuable, here are a few of the compelling technical reasons why unlocking Python 3.14 and 3.15 is a massive win for pipeline developers:

Python 3.14: Unblocking DCC Performance and Debugging

  • Deferred Type Annotations: Annotations are now evaluated lazily rather than eagerly at import. For a heavily typed library like the ShotGrid API, this slashes import times and memory overhead, meaning tools open faster for artists.
  • True Concurrency (concurrent.interpreters): Exposing subinterpreters to Python code allows processes to avoid Global Interpreter Lock (GIL) interference. This enables heavy background asset syncs or API queries without freezing the UI.
  • Zero-Overhead Remote Debugging: The new sys.remote_exec interface allows TDs to attach debuggers safely to a running process without stopping execution—invaluable for debugging a stalled API script on a headless render node.

Python 3.15: Startup Speed and Cross-Platform Stability

  • Lazy Imports (lazy import): Pipeline CLIs and DCC menus often suffer from "import bloat." Deferring module parsing until the module is actually called in the code means the API could load instantly upon launch and only execute when an artist actually interacts with it.
  • Universal UTF-8 Default: VFX pipelines constantly mix Windows artist workstations with Linux render farms, often leading to UnicodeDecodeError crashes on Windows when reading config files or asset paths. Python 3.15 forcing UTF-8 universally kills this legacy bug.
  • Immutable Pipeline Contexts (frozendict): Pipeline tools constantly pass dictionaries defining environment context (Show, Sequence, Shot). The new native frozendict provides an immutable, hashable dictionary, ensuring context data cannot be accidentally mutated by a downstream tool.

Thank you for considering this, and for implementing the recently merged changes!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions