Skip to content

Commit

Permalink
Merge pull request donnemartin#160 from donnemartin/develop
Browse files Browse the repository at this point in the history
Add Python 3.7 support
  • Loading branch information
donnemartin authored Apr 6, 2019
2 parents 77f599e + 7935f7e commit f7518f1
Show file tree
Hide file tree
Showing 291 changed files with 58,596 additions and 7,743 deletions.
11 changes: 6 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,9 @@ def run(self):


def main():
python3 = sys.version_info[0] == 3
python34_or_35 = python3 and sys.version_info[1] in (4, 5)
if not python34_or_35:
sys.exit('gitsome currently requires Python 3.4 or 3.5')
if sys.version_info < (3, 4):
print('gitsome requires at least Python 3.4.')
sys.exit(1)
try:
if '--name' not in sys.argv:
print(logo)
Expand All @@ -88,6 +87,8 @@ def main():
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries :: Python Modules',
],
Expand All @@ -103,7 +104,7 @@ def main():
skw['install_requires'] = [
'numpydoc>=0.5,<1.0',
'ply>=3.4,<4.0',
'prompt-toolkit>=1.0.0,<1.1.0',
'prompt_toolkit>=2.0.0,<2.1.0',
'requests>=2.8.1,<3.0.0',
'colorama>=0.3.3,<1.0.0',
'click>=5.1,<7.0',
Expand Down
16 changes: 8 additions & 8 deletions tests/test_completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ def create_completer_event(self):

def _get_completions(self, command):
position = len(command)
result = set(self.completer.get_completions(
result = self.completer.get_completions(
Document(text=command, cursor_position=position),
self.completer_event))
self.completer_event)
return result

def verify_completions(self, commands, expected):
result = set()
result = []
for command in commands:
# Call the AWS CLI autocompleter
result.update(self._get_completions(command))
result.extend(self._get_completions(command))
result_texts = []
for item in result:
# Each result item is a Completion object,
Expand All @@ -59,13 +59,13 @@ def verify_completions(self, commands, expected):

def test_blank(self):
text = ''
expected = set([])
expected = []
result = self._get_completions(text)
assert result == expected

def test_no_completions(self):
text = 'foo'
expected = set([])
expected = []
result = self._get_completions(text)
assert result == expected

Expand Down Expand Up @@ -116,8 +116,8 @@ def test_build_completions_with_meta(self):
result = self.completer.build_completions_with_meta('git ad',
'ad',
['add'])
assert result[0].display_meta == 'Add file contents to the index.'
assert result[0].display_meta_text == 'Add file contents to the index.'
result = self.completer.build_completions_with_meta('git-alia',
'git-alia',
['git-alias'])
assert result[0].display_meta == 'Define, search and show aliases.'
assert result[0].display_meta_text == 'Define, search and show aliases.'
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# and then run "tox" from this directory.

[tox]
envlist = py34, py35
envlist = py34, py35, py36, py37

[testenv]
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
Expand Down
105 changes: 104 additions & 1 deletion xonsh/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,104 @@
__version__ = '0.2.2'
__version__ = "0.8.10"


# amalgamate exclude jupyter_kernel parser_table parser_test_table pyghooks
# amalgamate exclude winutils wizard pytest_plugin fs macutils pygments_cache
# amalgamate exclude jupyter_shell
import os as _os

if _os.getenv("XONSH_DEBUG", ""):
pass
else:
import sys as _sys

try:
from xonsh import __amalgam__

completer = __amalgam__
_sys.modules["xonsh.completer"] = __amalgam__
contexts = __amalgam__
_sys.modules["xonsh.contexts"] = __amalgam__
lazyasd = __amalgam__
_sys.modules["xonsh.lazyasd"] = __amalgam__
lazyjson = __amalgam__
_sys.modules["xonsh.lazyjson"] = __amalgam__
color_tools = __amalgam__
_sys.modules["xonsh.color_tools"] = __amalgam__
platform = __amalgam__
_sys.modules["xonsh.platform"] = __amalgam__
pretty = __amalgam__
_sys.modules["xonsh.pretty"] = __amalgam__
codecache = __amalgam__
_sys.modules["xonsh.codecache"] = __amalgam__
lazyimps = __amalgam__
_sys.modules["xonsh.lazyimps"] = __amalgam__
parser = __amalgam__
_sys.modules["xonsh.parser"] = __amalgam__
tokenize = __amalgam__
_sys.modules["xonsh.tokenize"] = __amalgam__
tools = __amalgam__
_sys.modules["xonsh.tools"] = __amalgam__
ansi_colors = __amalgam__
_sys.modules["xonsh.ansi_colors"] = __amalgam__
ast = __amalgam__
_sys.modules["xonsh.ast"] = __amalgam__
commands_cache = __amalgam__
_sys.modules["xonsh.commands_cache"] = __amalgam__
diff_history = __amalgam__
_sys.modules["xonsh.diff_history"] = __amalgam__
events = __amalgam__
_sys.modules["xonsh.events"] = __amalgam__
foreign_shells = __amalgam__
_sys.modules["xonsh.foreign_shells"] = __amalgam__
jobs = __amalgam__
_sys.modules["xonsh.jobs"] = __amalgam__
jsonutils = __amalgam__
_sys.modules["xonsh.jsonutils"] = __amalgam__
lexer = __amalgam__
_sys.modules["xonsh.lexer"] = __amalgam__
openpy = __amalgam__
_sys.modules["xonsh.openpy"] = __amalgam__
style_tools = __amalgam__
_sys.modules["xonsh.style_tools"] = __amalgam__
xontribs = __amalgam__
_sys.modules["xonsh.xontribs"] = __amalgam__
dirstack = __amalgam__
_sys.modules["xonsh.dirstack"] = __amalgam__
inspectors = __amalgam__
_sys.modules["xonsh.inspectors"] = __amalgam__
proc = __amalgam__
_sys.modules["xonsh.proc"] = __amalgam__
shell = __amalgam__
_sys.modules["xonsh.shell"] = __amalgam__
timings = __amalgam__
_sys.modules["xonsh.timings"] = __amalgam__
xonfig = __amalgam__
_sys.modules["xonsh.xonfig"] = __amalgam__
base_shell = __amalgam__
_sys.modules["xonsh.base_shell"] = __amalgam__
environ = __amalgam__
_sys.modules["xonsh.environ"] = __amalgam__
tracer = __amalgam__
_sys.modules["xonsh.tracer"] = __amalgam__
readline_shell = __amalgam__
_sys.modules["xonsh.readline_shell"] = __amalgam__
replay = __amalgam__
_sys.modules["xonsh.replay"] = __amalgam__
aliases = __amalgam__
_sys.modules["xonsh.aliases"] = __amalgam__
dumb_shell = __amalgam__
_sys.modules["xonsh.dumb_shell"] = __amalgam__
built_ins = __amalgam__
_sys.modules["xonsh.built_ins"] = __amalgam__
execer = __amalgam__
_sys.modules["xonsh.execer"] = __amalgam__
imphooks = __amalgam__
_sys.modules["xonsh.imphooks"] = __amalgam__
main = __amalgam__
_sys.modules["xonsh.main"] = __amalgam__
del __amalgam__
except ImportError:
pass
del _sys
del _os
# amalgamate end
3 changes: 3 additions & 0 deletions xonsh/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from xonsh.main import main

main()
Loading

0 comments on commit f7518f1

Please sign in to comment.