Skip to content

Commit c3a688c

Browse files
Bump python api to v3.9.0 (#1055)
* Bump python-api to v3.9.0 * Update python-api update script to remove six copy
1 parent 2482c47 commit c3a688c

File tree

30 files changed

+2088
-12189
lines changed

30 files changed

+2088
-12189
lines changed

developer/shotgun_api_update.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ pushd $DEST_REPO
9494
git rev-parse HEAD > $DEST/commit_id
9595
popd
9696

97-
cp $DEST/lib/six.py $DEST/../six.py
98-
9997
# Put files in the staging area.
10098
echo "adding new files to git..."
10199
git add -A $DEST
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7b392bde6ec033e4a1c5749117fc47214e246380
1+
09dd4cbd395fc1c8a67bdb99bf14111b296a1ab9

python/tank_vendor/shotgun_api3/lib/README.md

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,8 @@ Some third-party modules are bundled with `python-api` inside lib.
1010

1111
The version of `httplib2` bundled should be updated manually, however its version is included in the unused `shotgun_api3/lib/requirements.txt` to allow Github's automated CVE notifications to work.
1212

13-
### mimetypes
14-
15-
The `mimetypes` module is broken on Windows only for Python 2.7.0 to 2.7.9 inclusively.
16-
We bundle the version from 2.7.10
17-
18-
See bugs:
19-
20-
* [9291](http://bugs.python.org/issue9291) (Fixed in 2.7.7)
21-
* [21652](http://bugs.python.org/issue21652) (Fixed in 2.7.8)
22-
* [22028](http://bugs.python.org/issue22028) (Fixed in 2.7.10)
23-
24-
The version of `mimetypes` bundled should be updated manually if necessary, however it is unlikely this will be needed, as it is only used for Python versions 2.7.0 - 2.7.9, and newer Python versions simply use the native `mimetypes` module.
25-
26-
### six
27-
28-
Six is a Python 2/3 compatibility library. In python-api, it's used to make simultaneous support for Python on 2 and 3 easier to maintain and more readable, but allowing the use of common helper functions, unified interfaces for modules that changed, and variables to ease type comparisons. For more on six, see the [documentation](https://six.readthedocs.io/).
29-
30-
The version of `six` bundled should be updated manually, however its version is included in the unused `shotgun_api3/lib/requirements.txt` to allow Github's automated CVE notifications to work.
31-
3213
## Flow Production Tracking Modules
3314

34-
### sgsix
35-
36-
`sgsix` is a module that contains extensions to `six`. These might be additional helper functions, variables, etc. that supplement six's functionality. It is intended that `sgsix` can be used within other packages that include or depend on the `python-api` package as well.
37-
3815
### sgtimezone
3916

4017
`sgtimezone` contains classes for easing the conversion between the server (UTC) timezone and client timezone.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from .core import contents, where
22

33
__all__ = ["contents", "where"]
4-
__version__ = "2024.12.14"
4+
__version__ = "2025.07.14"

python/tank_vendor/shotgun_api3/lib/certifi/cacert.pem

Lines changed: 185 additions & 263 deletions
Large diffs are not rendered by default.

python/tank_vendor/shotgun_api3/lib/certifi/core.py

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def where() -> str:
4646
def contents() -> str:
4747
return files("certifi").joinpath("cacert.pem").read_text(encoding="ascii")
4848

49-
elif sys.version_info >= (3, 7):
49+
else:
5050

5151
from importlib.resources import path as get_path, read_text
5252

@@ -81,34 +81,3 @@ def where() -> str:
8181

8282
def contents() -> str:
8383
return read_text("certifi", "cacert.pem", encoding="ascii")
84-
85-
else:
86-
import os
87-
import types
88-
from typing import Union
89-
90-
Package = Union[types.ModuleType, str]
91-
Resource = Union[str, "os.PathLike"]
92-
93-
# This fallback will work for Python versions prior to 3.7 that lack the
94-
# importlib.resources module but relies on the existing `where` function
95-
# so won't address issues with environments like PyOxidizer that don't set
96-
# __file__ on modules.
97-
def read_text(
98-
package: Package,
99-
resource: Resource,
100-
encoding: str = 'utf-8',
101-
errors: str = 'strict'
102-
) -> str:
103-
with open(where(), encoding=encoding) as data:
104-
return data.read()
105-
106-
# If we don't have importlib.resources, then we will just do the old logic
107-
# of assuming we're on the filesystem and munge the path directly.
108-
def where() -> str:
109-
f = os.path.dirname(__file__)
110-
111-
return os.path.join(f, "cacert.pem")
112-
113-
def contents() -> str:
114-
return read_text("certifi", "cacert.pem", encoding="ascii")

0 commit comments

Comments
 (0)