-
Notifications
You must be signed in to change notification settings - Fork 36
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
Add support for python 3.10 #5379
Changes from all commits
175cb72
c135f73
7195e91
d1305dc
352c093
7fcb770
0e81a02
50ef662
963363b
cf8d65f
43d6b75
88f370a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
from six.moves import range | ||
|
||
ANSIBLE_HELP_OPTIONS_PREFIX='optional arguments:' | ||
ANSIBLE_HELP_OPTIONS_PREFIX = 'options:' | ||
_HELP_CACHE = os.path.join(os.path.dirname(__file__), 'help_cache') | ||
_AVAILABLE_HELP_CACHES = { | ||
'ansible -h': os.path.join(_HELP_CACHE, 'ansible.txt'), | ||
|
@@ -20,7 +20,7 @@ def _get_help_text(command): | |
with open(_AVAILABLE_HELP_CACHES[command], 'r', encoding='utf-8') as f: | ||
return f.read() | ||
else: | ||
return subprocess.check_output(command, shell=True) | ||
return subprocess.check_output(command, shell=True).decode('utf-8') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added this when playing around with removing the cache entirely as I noticed this returned a byte string previously. At the moment it looks like we never actually invoke this code since only the two ansible commands use this method, and definitely hit the cache. I think this is a safe change, but wanted to flag since it isn't directly related to any 3.10 compatibility. |
||
|
||
|
||
_LARGE_INDENT = ' ' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
def main(): | ||
patch_fabric_imports() | ||
import fabric.main | ||
return fabric.main.main() | ||
|
||
|
||
def patch_fabric_imports(): | ||
import collections | ||
from collections.abc import Mapping | ||
collections.Mapping = Mapping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like
nose
hasn't received an update since 2015. Is it time to remove it from our test stack here? (Not blocking this PR.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bigger topic, so I agree that it should not block this PR. My vote is to keep nose until pytest has a solution for pytest-dev/pytest#3834