Skip to content
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

very small py3 compat changes #712

Merged
merged 2 commits into from
Sep 5, 2019
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
3 changes: 2 additions & 1 deletion src/rez/cli/_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from __future__ import print_function

import sys
import importlib
from argparse import _StoreTrueAction, SUPPRESS
from rez.cli._util import subcommands, LazyArgumentParser, _env_var_true
from rez.utils.logging_ import print_error
Expand Down Expand Up @@ -46,7 +47,7 @@ def __call__(self, parser_name, parser):

def get_module(self):
if self.module_name not in sys.modules:
__import__(self.module_name, globals(), locals(), [], -1)
importlib.import_module(self.module_name)
return sys.modules[self.module_name]


Expand Down
3 changes: 1 addition & 2 deletions src/rez/rex.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import sys
import pipes
import re
import UserDict
import inspect
import traceback
from string import Formatter
Expand Down Expand Up @@ -932,7 +931,7 @@ def get_value(self, key, args, kwds):
# Environment Classes
#===============================================================================

class EnvironmentDict(UserDict.DictMixin):
class EnvironmentDict(dict):
"""
Provides a mapping interface to `EnvironmentVariable` instances,
which provide an object-oriented interface for recording environment
Expand Down
3 changes: 1 addition & 2 deletions src/rez/utils/scope.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
from __future__ import print_function

from rez.utils.formatting import StringFormatMixin, StringFormatType
import UserDict
import sys


class RecursiveAttribute(UserDict.UserDict, StringFormatMixin):
class RecursiveAttribute(dict, StringFormatMixin):
"""An object that can have new attributes added recursively::

>>> a = RecursiveAttribute()
Expand Down