Skip to content

Commit

Permalink
Merge pull request #89 from MoonShineVFX/ple-1939
Browse files Browse the repository at this point in the history
support maya2024 py3
  • Loading branch information
rebeccaLinx authored Apr 25, 2023
2 parents cb4b68b + 2fef913 commit 41eafd3
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 9 deletions.
8 changes: 6 additions & 2 deletions avalon/vendor/requests/cookies.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
import copy
import time
import calendar
import collections

try:
from collections import MutableMapping
except Exception as e:
from _collections_abc import MutableMapping

from ._internal_utils import to_native_string
from .compat import cookielib, urlparse, urlunparse, Morsel
Expand Down Expand Up @@ -169,7 +173,7 @@ class CookieConflictError(RuntimeError):
"""


class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):
class RequestsCookieJar(cookielib.CookieJar, MutableMapping):
"""Compatibility class; is a cookielib.CookieJar, but exposes a dict
interface.
Expand Down
7 changes: 6 additions & 1 deletion avalon/vendor/requests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
"""

import collections
try:
from collections import Mapping
except Exception as e:
from _collections_abc import Mapping

import datetime
import sys

Expand Down Expand Up @@ -464,7 +469,7 @@ def prepare_body(self, data, files, json=None):

is_stream = all([
hasattr(data, '__iter__'),
not isinstance(data, (basestring, list, tuple, collections.Mapping))
not isinstance(data, (basestring, list, tuple, Mapping))
])

try:
Expand Down
7 changes: 6 additions & 1 deletion avalon/vendor/requests/packages/urllib3/_collections.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
from __future__ import absolute_import
from collections import Mapping, MutableMapping

try:
from collections import Mapping, MutableMapping
except Exception as e:
from _collections_abc import Mapping, MutableMapping

try:
from threading import RLock
except ImportError: # Platform-specific: No threads available
Expand Down
7 changes: 6 additions & 1 deletion avalon/vendor/requests/packages/urllib3/util/selectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
import socket
import sys
import time
from collections import namedtuple, Mapping
from collections import namedtuple

try:
from collections import Mapping
except Exception as e:
from _collections_abc import Mapping

try:
monotonic = time.monotonic
Expand Down
6 changes: 5 additions & 1 deletion avalon/vendor/requests/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
import os
import platform
import time
from collections import Mapping
try:
from collections import Mapping
except Exception as e:
from _collections_abc import Mapping

from datetime import timedelta

from .auth import _basic_auth_str
Expand Down
9 changes: 6 additions & 3 deletions avalon/vendor/requests/structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@
Data structures that power Requests.
"""

import collections
try:
from collections import Mapping, MutableMapping
except Exception as e:
from _collections_abc import Mapping, MutableMapping

from .compat import OrderedDict


class CaseInsensitiveDict(collections.MutableMapping):
class CaseInsensitiveDict(MutableMapping):
"""A case-insensitive ``dict``-like object.
Implements all methods and operations of
Expand Down Expand Up @@ -71,7 +74,7 @@ def lower_items(self):
)

def __eq__(self, other):
if isinstance(other, collections.Mapping):
if isinstance(other, Mapping):
other = CaseInsensitiveDict(other)
else:
return NotImplemented
Expand Down

0 comments on commit 41eafd3

Please sign in to comment.