From wcass at salesforce.com Fri Sep 27 10:09:18 2019 From: wcass at salesforce.com (Wayne Cass) Date: Fri, 27 Sep 2019 15:09:18 +0100 Subject: [Python-porting] obsolete Python 2 builtin Message-ID: Hi I understood, that by using: from future.builtins.disabled import * I would get NameError: obsolete Python 2 builtin apply is disabled, for modules, which are not compatible with Python3.X BUT I am getting: Traceback (most recent call last): File "/Users/wcass/.pyenv/versions/3.6.0/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/Users/wcass/.pyenv/versions/3.6.0/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/Users/wcass/.pyenv/versions/3.6.0/lib/python3.6/unittest/__main__.py", line 18, in main(module=None) File "/Users/wcass/.pyenv/versions/3.6.0/lib/python3.6/unittest/main.py", line 93, in __init__ self.parseArgs(argv) File "/Users/wcass/.pyenv/versions/3.6.0/lib/python3.6/unittest/main.py", line 140, in parseArgs self.createTests() File "/Users/wcass/.pyenv/versions/3.6.0/lib/python3.6/unittest/main.py", line 147, in createTests self.module) File "/Users/wcass/.pyenv/versions/3.6.0/lib/python3.6/unittest/loader.py", line 219, in loadTestsFromNames suites = [self.loadTestsFromName(name, module) for name in names] File "/Users/wcass/.pyenv/versions/3.6.0/lib/python3.6/unittest/loader.py", line 219, in suites = [self.loadTestsFromName(name, module) for name in names] File "/Users/wcass/.pyenv/versions/3.6.0/lib/python3.6/unittest/loader.py", line 153, in loadTestsFromName module = __import__(module_name) ValueError: Empty module name wcass-ltm4:py3 wcass$ Then trying to test imports options. Python 3.6.0 (default, Aug 17 2019, 16:20:52) [GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.46.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from future.builtins.disabled import * Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'future' >>> >>> from future import * Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'future' >>> >>> from __future__ import print_function >>> >>> from __future__ import * File "", line 1 SyntaxError: future feature * is not defined >>> So looking for any help/suggestions on how to get this import working: from future.builtins.disabled import * lastly is this a valid import on Python3.6? thanks for any help you can offer. -------- Wayne -------------- next part -------------- An HTML attachment was scrubbed... URL: