Skip to content

Commit

Permalink
ModuleNotFoundError: No module named 'imp' knipknap#232
Browse files Browse the repository at this point in the history
  • Loading branch information
oduvan committed Feb 17, 2024
1 parent 9d5b035 commit 5f3f26c
Show file tree
Hide file tree
Showing 13 changed files with 66 additions and 26 deletions.
7 changes: 5 additions & 2 deletions Exscript/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@
Logging to memory.
"""
from __future__ import print_function, absolute_import, unicode_literals
from future import standard_library
standard_library.install_aliases()
try:
from future import standard_library
standard_library.install_aliases()
except ModuleNotFoundError:
pass
from builtins import filter
from builtins import str
from builtins import object
Expand Down
7 changes: 5 additions & 2 deletions Exscript/protocols/dummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@
A client that talks to a :class:`Exscript.emulators.VirtualDevice`.
"""
from __future__ import absolute_import, unicode_literals
from future import standard_library
standard_library.install_aliases()
try:
from future import standard_library
standard_library.install_aliases()
except ModuleNotFoundError:
pass
from builtins import str
from ..emulators import VirtualDevice
from .protocol import Protocol
Expand Down
7 changes: 5 additions & 2 deletions Exscript/protocols/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@
An abstract base class for all protocols.
"""
from __future__ import absolute_import, unicode_literals
from future import standard_library
standard_library.install_aliases()
try:
from future import standard_library
standard_library.install_aliases()
except ModuleNotFoundError:
pass
from builtins import object
import re
import sys
Expand Down
7 changes: 5 additions & 2 deletions Exscript/protocols/telnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@
The Telnet protocol.
"""
from __future__ import absolute_import, unicode_literals
from future import standard_library
standard_library.install_aliases()
try:
from future import standard_library
standard_library.install_aliases()
except ModuleNotFoundError:
pass
from ..util.tty import get_terminal_size
from . import telnetlib
from .protocol import Protocol
Expand Down
7 changes: 5 additions & 2 deletions Exscript/protocols/telnetlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@
"""
from __future__ import print_function
from future import standard_library
standard_library.install_aliases()
try:
from future import standard_library
standard_library.install_aliases()
except ModuleNotFoundError:
pass
from builtins import chr
from builtins import bytes
from builtins import range
Expand Down
7 changes: 5 additions & 2 deletions Exscript/servers/httpd.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@
A threaded HTTP server with support for HTTP/Digest authentication.
"""
from __future__ import print_function
from future import standard_library
standard_library.install_aliases()
try:
from future import standard_library
standard_library.install_aliases()
except ModuleNotFoundError:
pass
import sys
import time
import urllib.request, urllib.parse, urllib.error
Expand Down
7 changes: 5 additions & 2 deletions Exscript/util/collections.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from __future__ import unicode_literals, absolute_import
from future import standard_library
standard_library.install_aliases()
try:
from future import standard_library
standard_library.install_aliases()
except ModuleNotFoundError:
pass
from builtins import str
from builtins import chr
from builtins import range
Expand Down
7 changes: 5 additions & 2 deletions Exscript/util/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@
"""
from __future__ import print_function, absolute_import
from builtins import str
from future import standard_library
standard_library.install_aliases()
try:
from future import standard_library
standard_library.install_aliases()
except ModuleNotFoundError:
pass
import sys
import re
import os
Expand Down
7 changes: 5 additions & 2 deletions Exscript/util/interact.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@
Tools for interacting with the user on the command line.
"""
from __future__ import print_function, absolute_import
from future import standard_library
standard_library.install_aliases()
try:
from future import standard_library
standard_library.install_aliases()
except ModuleNotFoundError:
pass
from builtins import input
from builtins import str
from builtins import object
Expand Down
7 changes: 5 additions & 2 deletions Exscript/util/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@
Working with URLs (as used in URL formatted hostnames).
"""
from __future__ import unicode_literals, absolute_import
from future import standard_library
standard_library.install_aliases()
try:
from future import standard_library
standard_library.install_aliases()
except ModuleNotFoundError:
pass
from builtins import str
from builtins import chr
from builtins import range
Expand Down
7 changes: 5 additions & 2 deletions tests/Exscript/protocols/ProtocolTest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
from future import standard_library
standard_library.install_aliases()
try:
from future import standard_library
standard_library.install_aliases()
except ModuleNotFoundError:
pass
from builtins import str
import sys
import unittest
Expand Down
8 changes: 6 additions & 2 deletions tests/Exscript/workqueue/JobTest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
from future import standard_library
standard_library.install_aliases()
try:
from future import standard_library
standard_library.install_aliases()
except ModuleNotFoundError:
pass
except Module
import sys
import unittest
import re
Expand Down
7 changes: 5 additions & 2 deletions tests/Exscript/workqueue/PipelineTest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
from future import standard_library
standard_library.install_aliases()
try:
from future import standard_library
standard_library.install_aliases()
except ModuleNotFoundError:
pass
from builtins import next
import sys
import unittest
Expand Down

0 comments on commit 5f3f26c

Please sign in to comment.