shotgun-api3 3.8.4__py2.py3-none-any.whl → 3.9.0__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. shotgun_api3/lib/certifi/__init__.py +1 -1
  2. shotgun_api3/lib/certifi/cacert.pem +185 -263
  3. shotgun_api3/lib/certifi/core.py +1 -32
  4. shotgun_api3/lib/httplib2/__init__.py +1799 -39
  5. shotgun_api3/lib/httplib2/auth.py +1 -1
  6. shotgun_api3/lib/mockgun/mockgun.py +0 -1
  7. shotgun_api3/lib/mockgun/schema.py +1 -1
  8. shotgun_api3/shotgun.py +98 -275
  9. {shotgun_api3-3.8.4.dist-info → shotgun_api3-3.9.0.dist-info}/METADATA +6 -47
  10. shotgun_api3-3.9.0.dist-info/RECORD +26 -0
  11. shotgun_api3/lib/httplib2/python2/__init__.py +0 -1993
  12. shotgun_api3/lib/httplib2/python2/auth.py +0 -63
  13. shotgun_api3/lib/httplib2/python2/cacerts.txt +0 -2225
  14. shotgun_api3/lib/httplib2/python2/certs.py +0 -42
  15. shotgun_api3/lib/httplib2/python2/error.py +0 -48
  16. shotgun_api3/lib/httplib2/python2/iri2uri.py +0 -123
  17. shotgun_api3/lib/httplib2/python2/socks.py +0 -518
  18. shotgun_api3/lib/httplib2/python3/__init__.py +0 -1799
  19. shotgun_api3/lib/httplib2/python3/auth.py +0 -69
  20. shotgun_api3/lib/httplib2/python3/cacerts.txt +0 -2225
  21. shotgun_api3/lib/httplib2/python3/certs.py +0 -42
  22. shotgun_api3/lib/httplib2/python3/error.py +0 -48
  23. shotgun_api3/lib/httplib2/python3/iri2uri.py +0 -124
  24. shotgun_api3/lib/httplib2/python3/socks.py +0 -518
  25. shotgun_api3/lib/mimetypes.py +0 -598
  26. shotgun_api3/lib/sgsix.py +0 -87
  27. shotgun_api3/lib/sgutils.py +0 -62
  28. shotgun_api3/lib/six.py +0 -964
  29. shotgun_api3-3.8.4.dist-info/RECORD +0 -44
  30. {shotgun_api3-3.8.4.dist-info → shotgun_api3-3.9.0.dist-info}/WHEEL +0 -0
  31. {shotgun_api3-3.8.4.dist-info → shotgun_api3-3.9.0.dist-info}/licenses/LICENSE +0 -0
  32. {shotgun_api3-3.8.4.dist-info → shotgun_api3-3.9.0.dist-info}/top_level.txt +0 -0
@@ -1,69 +0,0 @@
1
- import base64
2
- import re
3
-
4
- from ... import pyparsing as pp
5
-
6
- from .error import *
7
-
8
-
9
- try: # pyparsing>=3.0.0
10
- downcaseTokens = pp.common.downcaseTokens
11
- except AttributeError:
12
- downcaseTokens = pp.downcaseTokens
13
-
14
- UNQUOTE_PAIRS = re.compile(r"\\(.)")
15
- unquote = lambda s, l, t: UNQUOTE_PAIRS.sub(r"\1", t[0][1:-1])
16
-
17
- # https://tools.ietf.org/html/rfc7235#section-1.2
18
- # https://tools.ietf.org/html/rfc7235#appendix-B
19
- tchar = "!#$%&'*+-.^_`|~" + pp.nums + pp.alphas
20
- token = pp.Word(tchar).setName("token")
21
- token68 = pp.Combine(pp.Word("-._~+/" + pp.nums + pp.alphas) + pp.Optional(pp.Word("=").leaveWhitespace())).setName(
22
- "token68"
23
- )
24
-
25
- quoted_string = pp.dblQuotedString.copy().setName("quoted-string").setParseAction(unquote)
26
- auth_param_name = token.copy().setName("auth-param-name").addParseAction(downcaseTokens)
27
- auth_param = auth_param_name + pp.Suppress("=") + (quoted_string | token)
28
- params = pp.Dict(pp.delimitedList(pp.Group(auth_param)))
29
-
30
- scheme = token("scheme")
31
- challenge = scheme + (params("params") | token68("token"))
32
-
33
- authentication_info = params.copy()
34
- www_authenticate = pp.delimitedList(pp.Group(challenge))
35
-
36
-
37
- def _parse_authentication_info(headers, headername="authentication-info"):
38
- """https://tools.ietf.org/html/rfc7615
39
- """
40
- header = headers.get(headername, "").strip()
41
- if not header:
42
- return {}
43
- try:
44
- parsed = authentication_info.parseString(header)
45
- except pp.ParseException as ex:
46
- # print(ex.explain(ex))
47
- raise MalformedHeader(headername)
48
-
49
- return parsed.asDict()
50
-
51
-
52
- def _parse_www_authenticate(headers, headername="www-authenticate"):
53
- """Returns a dictionary of dictionaries, one dict per auth_scheme."""
54
- header = headers.get(headername, "").strip()
55
- if not header:
56
- return {}
57
- try:
58
- parsed = www_authenticate.parseString(header)
59
- except pp.ParseException as ex:
60
- # print(ex.explain(ex))
61
- raise MalformedHeader(headername)
62
-
63
- retval = {
64
- challenge["scheme"].lower(): challenge["params"].asDict()
65
- if "params" in challenge
66
- else {"token": challenge.get("token")}
67
- for challenge in parsed
68
- }
69
- return retval