-
Notifications
You must be signed in to change notification settings - Fork 206
SG-22787: Shotgun to ShotGrid #245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,61 +37,61 @@ v3.1.2 (2019 Sept 17) | |
methods ``schema_entity_read()``, ``schema_field_read()``, and ``schema_read()``. | ||
|
||
v3.1.1 (2019 August 29) | ||
===================== | ||
======================= | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This fixes a LOT of warnings. |
||
- Fixes a regression on Python 2.7.0-2.7.9 on Windows with the mimetypes module. | ||
|
||
v3.1.0 (2019 July 29) | ||
===================== | ||
- Adds support for Python 3.7 | ||
|
||
v3.0.41 (2019 June 28) | ||
===================== | ||
====================== | ||
- Adds an optional sleep between retries specified via the `SHOTGUN_API_RETRY_INTERVAL` environment variable, or by setting `sg.config.rpc_attempt_interval`. | ||
|
||
v3.0.40 (2019 March 13) | ||
===================== | ||
======================= | ||
- Updates encoding method to use shutil when uploading, to avoid memory and overflow errors when reading large files. (contributed by @eestrada) | ||
|
||
v3.0.39 (2019 February 20) | ||
===================== | ||
========================== | ||
- Ensures the certificates packaged with the API and those specified via the `SHOTGUN_API_CACERTS` environment variable | ||
are used when uploading a file. | ||
|
||
v3.0.38 (2019 February 7) | ||
===================== | ||
========================= | ||
- Upgrades the version of ``httplib2`` to ``0.12.0``, which fixes SNI issues. Note this | ||
version contains a more recent list of certificate authorities. If you are running Shotgun locally and have | ||
signed your https certificate with an outdated certificate authority, the Shotgun connection will be rejected. | ||
|
||
v3.0.37 (2018 July 19) | ||
===================== | ||
====================== | ||
|
||
- Proper support added for unicode and utf-8 string paths given to upload methods, and a sane error is raised when an unusable string encoding is used. | ||
- Adds support for querying preferences from Shotgun via the new preferences_read method. | ||
- Under-the-hood changes to add support for direct to s3 uploads to Shotgun. This change should be transparent to users. | ||
|
||
v3.0.36 (2018 April 3) | ||
===================== | ||
====================== | ||
|
||
- Fixes an error where ``connect=False`` during ``__init__`` would still connect to Shotgun. | ||
- Adds support for ``SHOTGUN_API_CACERTS`` when uploading and downloading files. | ||
- Properly handles failed downloads due to malware scanning. | ||
|
||
v3.0.35 (2017 December 8) | ||
===================== | ||
========================= | ||
|
||
- Add exception UserCredentialsNotAllowedForSSOAuthenticationFault. | ||
Triggered when attempting to initiate a connection with a username/password | ||
pair on an SSO-enabled Shotgun site. | ||
|
||
v3.0.34 (2017 September 18) | ||
===================== | ||
=========================== | ||
|
||
- Optimized pagination strategy for Shotgun 7.4+ | ||
- Switched from a hard-coded value of 500 for "records_per_page" to a server-defined value. We will be experimenting with higher values with the goal of increasing performance for large result sets. | ||
|
||
v3.0.33 (2017 July 18) | ||
===================== | ||
====================== | ||
|
||
- Raise an exception when uploading an empty file using :meth:`upload`, :meth:`upload_thumbnail` | ||
or :meth:`upload_filmstrip_thumbnail` before calling out to the server. | ||
|
@@ -105,7 +105,7 @@ v3.0.32 (2016 Sep 22) | |
- Optimized import speed of the API on Python 2.7. | ||
- Integrated the latest fixes to the ``mimetypes`` module. | ||
- Added ``nav_expand()`` method as an experimental, internal method for querying SG hierarchy. | ||
- Ported all documentation to sphinx. See http://developer.shotgunsoftware.com/python-api. | ||
- Ported all documentation to sphinx. See http://developer.shotgridsoftware.com/python-api. | ||
- Moved Changelog to dedicated HISTORY file. | ||
|
||
v3.0.31 (2016 May 18) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
[](http://www.vfxplatform.com/) | ||
[](https://www.python.org/) | ||
[](http://developer.shotgunsoftware.com/python-api) | ||
[](https://www.python.org/) | ||
[](http://developer.shotgridsoftware.com/python-api) | ||
[](http://travis-ci.org/shotgunsoftware/python-api) | ||
[](https://ci.appveyor.com/project/jfboismenu/python-api/branch/master) | ||
[](https://coveralls.io/github/shotgunsoftware/python-api?branch=master) | ||
|
||
# Shotgun Python API | ||
|
||
Shotgun provides a simple Python-based API for accessing Shotgun and integrating with other tools. This is the official API that is maintained by Shotgun Software (support@shotgunsoftware.com) | ||
ShotGrid provides a simple Python-based API for accessing ShotGrid and integrating with other tools. This is the official API that is maintained by ShotGrid Software (support@shotgunsoftware.com) | ||
|
||
The latest version can always be found at http://github.com/shotgunsoftware/python-api | ||
|
||
## Minimum Requirements | ||
|
||
* Shotgun server v2.4.12+. | ||
* Python v2.6 - v2.7 or v3.7 | ||
* ShotGrid server v2.4.12+. | ||
* Python v2.7 or v3.7 | ||
|
||
## Documentation | ||
Tutorials and detailed documentation about the Python API are available at http://developer.shotgunsoftware.com/python-api). | ||
Tutorials and detailed documentation about the Python API are available at http://developer.shotgridsoftware.com/python-api). | ||
|
||
Some useful direct links: | ||
|
||
* [Installing](http://developer.shotgunsoftware.com/python-api/installation.html) | ||
* [Tutorials](http://developer.shotgunsoftware.com/python-api/cookbook/tutorials.html) | ||
* [API Reference](http://developer.shotgunsoftware.com/python-api/reference.html) | ||
* [Data Types](http://developer.shotgunsoftware.com/python-api/reference.html#data-types) | ||
* [Filter Syntax](http://developer.shotgunsoftware.com/python-api/reference.html#filter-syntax) | ||
* [Installing](http://developer.shotgridsoftware.com/python-api/installation.html) | ||
* [Tutorials](http://developer.shotgridsoftware.com/python-api/cookbook/tutorials.html) | ||
* [API Reference](http://developer.shotgridsoftware.com/python-api/reference.html) | ||
* [Data Types](http://developer.shotgridsoftware.com/python-api/reference.html#data-types) | ||
* [Filter Syntax](http://developer.shotgridsoftware.com/python-api/reference.html#filter-syntax) | ||
Comment on lines
+25
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These links don't work right now. Are we sure they are going to be online when this is released? |
||
|
||
## Changelog | ||
|
||
You can see the [full history of the Python API on the documentation site](http://developer.shotgunsoftware.com/python-api/changelog.html). | ||
You can see the [full history of the Python API on the documentation site](http://developer.shotgridsoftware.com/python-api/changelog.html). | ||
|
||
## Updating HTTPLib2 | ||
|
||
|
@@ -108,8 +108,8 @@ Integration and unit tests are provided. | |
- A `tests/config` file (you can copy an example from `tests/example_config`). | ||
- Tests can be run individually like this: `nosetests --config="nose.cfg" tests/test_client.py` | ||
- Make sure to not forget the `--config="nose.cfg"` option. This option tells nose to use our config file. This will exclude python 2- and 3-specific files in the `/lib` directory, preventing a failure from being reported by nose for compilation due to incompatible syntax in those files. | ||
- `test_client` and `tests_unit` use mock server interaction and do not require a Shotgun instance to be available (no modifications to `tests/config` are necessary). | ||
- `test_api` and `test_api_long` *do* require a Shotgun instance, with a script key available for the tests. The server and script user values must be supplied in the `tests/config` file. The tests will add test data to your server based on information in your config. This data will be manipulated by the tests, and should not be used for other purposes. | ||
- `test_client` and `tests_unit` use mock server interaction and do not require a ShotGrid instance to be available (no modifications to `tests/config` are necessary). | ||
- `test_api` and `test_api_long` *do* require a ShotGrid instance, with a script key available for the tests. The server and script user values must be supplied in the `tests/config` file. The tests will add test data to your server based on information in your config. This data will be manipulated by the tests, and should not be used for other purposes. | ||
- To run all of the tests, use the shell script `run-tests`. | ||
|
||
## Release process | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -219,10 +219,10 @@ def __init__(self, host, meta): | |
except AttributeError: | ||
self.version = None | ||
if not self.version: | ||
raise ShotgunError("The Shotgun Server didn't respond with a version number. " | ||
raise ShotgunError("The ShotGrid Server didn't respond with a version number. " | ||
"This may be because you are running an older version of " | ||
"Shotgun against a more recent version of the Shotgun API. " | ||
"For more information, please contact Shotgun Support.") | ||
"ShotGrid against a more recent version of the ShotGrid API. " | ||
"For more information, please contact ShotGrid Support.") | ||
|
||
if len(self.version) > 3 and self.version[3] == "Dev": | ||
self.is_dev = True | ||
|
@@ -774,9 +774,6 @@ def info(self): | |
>>> sg.info() | ||
{'full_version': [8, 2, 1, 0], 'version': [8, 2, 1], 'user_authentication_method': 'default', ...} | ||
|
||
Tokens and values | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was never rendered out to html and generated warnings. It made sense to remove as the doc is prefectly readable without it. |
||
----------------- | ||
|
||
:: | ||
|
||
Token Value | ||
|
@@ -2730,13 +2727,11 @@ def get_attachment_download_url(self, attachment): | |
.. note:: | ||
Support for passing in an int representing the Attachment ``id`` is deprecated | ||
|
||
.. todo:: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
Support for a standard entity hash should be removed: #22150 | ||
|
||
:returns: the download URL for the Attachment or ``None`` if ``None`` was passed to | ||
``attachment`` parameter. | ||
:rtype: str | ||
""" | ||
# TODO: Support for a standard entity hash should be removed: #22150 | ||
attachment_id = None | ||
if isinstance(attachment, int): | ||
attachment_id = attachment | ||
|
@@ -3550,7 +3545,7 @@ def _parse_http_status(self, status): | |
if status[0] >= 300: | ||
headers = "HTTP error from server" | ||
if status[0] == 503: | ||
errmsg = "Shotgun is currently down for maintenance or too busy to reply. Please try again later." | ||
errmsg = "ShotGrid is currently down for maintenance or too busy to reply. Please try again later." | ||
raise ProtocolError(self.config.server, | ||
error_code, | ||
errmsg, | ||
|
@@ -3636,12 +3631,12 @@ def _response_errors(self, sg_response): | |
raise UserCredentialsNotAllowedForSSOAuthenticationFault( | ||
sg_response.get("message", | ||
"Authentication using username/password is not " | ||
"allowed for an SSO-enabled Shotgun site") | ||
"allowed for an SSO-enabled ShotGrid site") | ||
) | ||
elif sg_response.get("error_code") == ERR_OXYG: | ||
raise UserCredentialsNotAllowedForOxygenAuthenticationFault( | ||
sg_response.get("message", "Authentication using username/password is not " | ||
"allowed for an Autodesk Identity enabled Shotgun site") | ||
"allowed for an Autodesk Identity enabled ShotGrid site") | ||
) | ||
else: | ||
# raise general Fault | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python 2.6 was deprecated on May 1rst and the build is failing, so let's get rid of it.