Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Flow Production Tracking Python API Changelog

Here you can see the full list of changes between each Python API release.

v3.6.0 (2024 May 1)
===================
- Drop support for Python 2.7
- certifi version changed to 2024.2.2
- Documentation update

v3.5.1 (2024 Apr 3)
===================
- Documentation: Revert to Shotgun in the API Reference headers to keep consistency with the API methods
Expand Down
15 changes: 13 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@

setup(
name='shotgun_api3',
version='3.5.1',
description='Flow Production Tracking Python API ',
version='3.6.0',
description='Flow Production Tracking Python API',
long_description=readme,
author='Autodesk',
author_email='https://www.autodesk.com/support/contact-support',
Expand All @@ -39,4 +39,15 @@
include_package_data=True,
package_data={'': ['cacerts.txt', 'cacert.pem']},
zip_safe=False,
python_requires=">=3.7.0",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Operating System :: OS Independent",
],
)
10 changes: 9 additions & 1 deletion shotgun_api3/shotgun.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def _is_mimetypes_broken():

# ----------------------------------------------------------------------------
# Version
__version__ = "3.5.1"
__version__ = "3.6.0"

# ----------------------------------------------------------------------------
# Errors
Expand Down Expand Up @@ -213,6 +213,7 @@ def __init__(self, host, meta):
:ivar bool is_dev: ``True`` if server is running a development version of the Shotgun
codebase.
"""
self._ensure_python_version_supported()
# Server host name
self.host = host
self.server_info = meta
Expand All @@ -237,6 +238,13 @@ def __init__(self, host, meta):
self.version = tuple(self.version[:3])
self._ensure_json_supported()

def _ensure_python_version_supported(self):
"""
Checks the if current Python version is supported.
"""
if sys.version_info < (3, 7):
raise ShotgunError("This module requires Python version 3.7 or higher.")

def _ensure_support(self, feature, raise_hell=True):
"""
Checks the server version supports a given feature, raises an exception if it does not.
Expand Down