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

Fall back to system modules if vendorized ones do not exist #2169

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions integration/concurrency.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import codecs

from invoke.vendor.six.moves.queue import Queue
from invoke.vendor.six.moves import zip_longest
try:
from invoke.vendor.six.moves.queue import Queue
from invoke.vendor.six.moves import zip_longest
except ImportError:
from six.moves.queue import Queue
from six.moves import zip_longest

from invoke.util import ExceptionHandlingThread
from pytest import skip
Expand Down
5 changes: 4 additions & 1 deletion tests/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
import re
import sys

from invoke.vendor.lexicon import Lexicon
try:
from invoke.vendor.lexicon import Lexicon
except ImportError:
from lexicon import Lexicon
from pytest_relaxed import trap

from fabric.main import make_program
Expand Down
5 changes: 4 additions & 1 deletion tests/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
from os.path import join, expanduser

from paramiko.config import SSHConfig
from invoke.vendor.lexicon import Lexicon
try:
from invoke.vendor.lexicon import Lexicon
except ImportError:
from lexicon import Lexicon

from fabric import Config
from fabric.util import get_local_user
Expand Down
3 changes: 2 additions & 1 deletion tests/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

try:
from invoke.vendor.six import b
from invoke.vendor.lexicon import Lexicon
except ImportError:
from six import b
from lexicon import Lexicon
import errno
from os.path import join
import socket
Expand All @@ -15,7 +17,6 @@
import pytest # for mark
from pytest import skip, param
from pytest_relaxed import raises
from invoke.vendor.lexicon import Lexicon

from invoke.config import Config as InvokeConfig
from invoke.exceptions import ThreadException
Expand Down