Hello community,
here is the log from the commit of package python-jupyter_console for
openSUSE:Factory checked in at 2018-10-18 15:36:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jupyter_console (Old)
and /work/SRC/openSUSE:Factory/.python-jupyter_console.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-jupyter_console"
Thu Oct 18 15:36:23 2018 rev:8 rq:642679 version:6.0.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-jupyter_console/python-jupyter_console.changes
2018-07-28 12:41:39.724571054 +0200
+++
/work/SRC/openSUSE:Factory/.python-jupyter_console.new/python-jupyter_console.changes
2018-10-18 15:37:19.466230182 +0200
@@ -1,0 +2,16 @@
+Tue Oct 16 01:56:19 UTC 2018 - Todd R <[email protected]>
+
+- Update to version 6.0.0
+ * Drop support for python 2
+ * Upgrade to prompt_toolkit 2.x
+- Don't build for python2 anymore since it isn't supported.
+
+-------------------------------------------------------------------
+Sun Oct 7 23:55:12 UTC 2018 - Todd R <[email protected]>
+
+- Use upstream builds of doc files.
+- Merge doc subpackage and tests into main spec file.
+- Use %license tag
+- Fix prompt_toolkit dependency.
+
+-------------------------------------------------------------------
Old:
----
jupyter_console-5.2.0.tar.gz
python-jupyter_console-doc.changes
python-jupyter_console-doc.spec
New:
----
jupyter-console.pdf
jupyter_console-6.0.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-jupyter_console.spec ++++++
--- /var/tmp/diff_new_pack.w8PZ8C/_old 2018-10-18 15:37:21.318228062 +0200
+++ /var/tmp/diff_new_pack.w8PZ8C/_new 2018-10-18 15:37:21.322228058 +0200
@@ -12,37 +12,51 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define skip_python2 1
Name: python-jupyter_console
-Version: 5.2.0
+Version: 6.0.0
Release: 0
Summary: Jupyter terminal console
License: BSD-3-Clause
Group: Development/Languages/Python
Url: https://github.com/jupyter/jupyter_console
-Source:
https://files.pythonhosted.org/packages/source/j/jupyter_console/jupyter_console-%{version}.tar.gz
-BuildRequires: fdupes
-BuildRequires: python-rpm-macros
+Source0:
https://files.pythonhosted.org/packages/source/j/jupyter_console/jupyter_console-%{version}.tar.gz
+Source1:
https://media.readthedocs.org/pdf/jupyter-console/v%{version}/jupyter-console.pdf
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
+BuildRequires: fdupes
+BuildRequires: python-rpm-macros
Requires: python-jupyter_client
Requires: python-jupyter_ipykernel
Requires: python-jupyter_ipython
-Recommends: python-prompt_toolkit >= 1.0.0
-Conflicts: python-prompt_toolkit >= 2
+Requires: python-prompt_toolkit >= 2
BuildArch: noarch
+
%python_subpackages
%description
A terminal-based console frontend for Jupter kernels.
This code is based on the single-process IPython terminal.
+%package -n %{name}-doc
+Summary: Documentation for %{name}
+Group: Documentation/Other
+Provides: %{python_module jupyter_console-doc = %{version}}
+
+%description -n %{name}-doc
+A terminal-based console frontend for Jupter kernels.
+This code is based on the single-process IPython terminal.
+
+This package provides the help files for %{name}.
+
%prep
%setup -q -n jupyter_console-%{version}
+cp %{SOURCE1} .
%build
%python_build
@@ -51,10 +65,18 @@
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
+# Tests require an active console
+# %%check
+# %%python_expand nosetests-%%{$python_bin_suffix} jupyter_console
+
%files %{python_files}
-%defattr(-,root,root,-)
-%doc CONTRIBUTING.md COPYING.md README.md
-%python3_only %{_bindir}/jupyter-console
+%doc CONTRIBUTING.md README.md
+%license COPYING.md
+%{_bindir}/jupyter-console
%{python_sitelib}/*
+%files -n %{name}-doc
+%license COPYING.md
+%doc jupyter-console.pdf
+
%changelog
++++++ jupyter_console-5.2.0.tar.gz -> jupyter_console-6.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_console-5.2.0/PKG-INFO
new/jupyter_console-6.0.0/PKG-INFO
--- old/jupyter_console-5.2.0/PKG-INFO 2017-08-21 12:37:54.000000000 +0200
+++ new/jupyter_console-6.0.0/PKG-INFO 2018-10-03 02:38:31.000000000 +0200
@@ -1,21 +1,19 @@
-Metadata-Version: 1.1
-Name: jupyter_console
-Version: 5.2.0
-Summary: Jupyter terminal console
-Home-page: https://jupyter.org
-Author: Jupyter Development Team
-Author-email: [email protected]
-License: BSD
-Description: An IPython-like terminal frontend for Jupyter kernels in any
language.
-Keywords: Interactive,Interpreter,Shell,Web
-Platform: Linux
-Platform: Mac OS X
-Platform: Windows
-Classifier: Intended Audience :: Developers
-Classifier: Intended Audience :: System Administrators
-Classifier: Intended Audience :: Science/Research
-Classifier: License :: OSI Approved :: BSD License
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.3
+Metadata-Version: 1.1
+Name: jupyter_console
+Version: 6.0.0
+Summary: Jupyter terminal console
+Home-page: https://jupyter.org
+Author: Jupyter Development Team
+Author-email: [email protected]
+License: BSD
+Description: An IPython-like terminal frontend for Jupyter kernels in any
language.
+Keywords: Interactive,Interpreter,Shell,Web
+Platform: Linux
+Platform: Mac OS X
+Platform: Windows
+Classifier: Intended Audience :: Developers
+Classifier: Intended Audience :: System Administrators
+Classifier: Intended Audience :: Science/Research
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_console-5.2.0/docs/changelog.rst
new/jupyter_console-6.0.0/docs/changelog.rst
--- old/jupyter_console-5.2.0/docs/changelog.rst 2017-08-21
12:27:33.000000000 +0200
+++ new/jupyter_console-6.0.0/docs/changelog.rst 2018-10-03
02:28:05.000000000 +0200
@@ -3,6 +3,14 @@
A summary of changes in Jupyter console releases.
+5.3
+---
+
+- Highlight matching parentheses. :ghpull:`147`
+- The config option ``JupyterConsoleApp.confirm_exit`` replaces
+ ``ZMQTerminalInteractiveShell.confirm_exit``, to avoid redundancy.
+ :ghpull:`141`.
+
5.2
---
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_console-5.2.0/docs/environment.yml
new/jupyter_console-6.0.0/docs/environment.yml
--- old/jupyter_console-5.2.0/docs/environment.yml 2016-09-12
17:49:27.000000000 +0200
+++ new/jupyter_console-6.0.0/docs/environment.yml 2018-10-03
02:28:05.000000000 +0200
@@ -9,3 +9,5 @@
- jupyter_client
- sphinx
- sphinx_rtd_theme
+ - pip:
+ - sphinxcontrib_github_alt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_console-5.2.0/jupyter_console/_version.py
new/jupyter_console-6.0.0/jupyter_console/_version.py
--- old/jupyter_console-5.2.0/jupyter_console/_version.py 2017-08-21
12:32:57.000000000 +0200
+++ new/jupyter_console-6.0.0/jupyter_console/_version.py 2018-10-03
02:38:27.000000000 +0200
@@ -1,10 +1,10 @@
-""" For beta/alpha/rc releases, the version number for a beta is X.Y.ZbN
+""" For beta/alpha/rc releases, the version number for a beta is X.Y.ZbN
**without dots between the last 'micro' number and b**. N is the number of
the beta released i.e. 1, 2, 3 ...
See PEP 440 https://www.python.org/dev/peps/pep-0440/
"""
-version_info = (5, 2, 0)
+version_info = (6, 0, 0)
__version__ = '.'.join(map(str, version_info[:3])) + ''.join(version_info[3:])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_console-5.2.0/jupyter_console/app.py
new/jupyter_console-6.0.0/jupyter_console/app.py
--- old/jupyter_console-5.2.0/jupyter_console/app.py 2017-01-31
14:34:48.000000000 +0100
+++ new/jupyter_console-6.0.0/jupyter_console/app.py 2018-10-03
02:28:05.000000000 +0200
@@ -112,6 +112,7 @@
self.shell = ZMQTerminalInteractiveShell.instance(parent=self,
manager=self.kernel_manager,
client=self.kernel_client,
+ confirm_exit=self.confirm_exit,
)
self.shell.own_kernel = not self.existing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_console-5.2.0/jupyter_console/ptshell.py
new/jupyter_console-6.0.0/jupyter_console/ptshell.py
--- old/jupyter_console-5.2.0/jupyter_console/ptshell.py 2017-08-17
14:55:43.000000000 +0200
+++ new/jupyter_console-6.0.0/jupyter_console/ptshell.py 2018-10-03
02:28:05.000000000 +0200
@@ -32,22 +32,29 @@
from prompt_toolkit.completion import Completer, Completion
from prompt_toolkit.document import Document
from prompt_toolkit.enums import DEFAULT_BUFFER, EditingMode
-from prompt_toolkit.filters import HasFocus, HasSelection, ViInsertMode,
EmacsInsertMode
+from prompt_toolkit.filters import (Condition, has_focus, has_selection,
+ vi_insert_mode, emacs_insert_mode, is_done)
from prompt_toolkit.history import InMemoryHistory
-from prompt_toolkit.shortcuts import create_prompt_application,
create_eventloop, create_output
-from prompt_toolkit.interface import CommandLineInterface
-from prompt_toolkit.key_binding.manager import KeyBindingManager
-from prompt_toolkit.key_binding.vi_state import InputMode
-from prompt_toolkit.key_binding.bindings.vi import ViStateFilter
-from prompt_toolkit.keys import Keys
-from prompt_toolkit.layout.lexers import PygmentsLexer
-from prompt_toolkit.styles import PygmentsStyle
+from prompt_toolkit.patch_stdout import patch_stdout
+from prompt_toolkit.shortcuts.prompt import PromptSession
+from prompt_toolkit.shortcuts import print_formatted_text
+from prompt_toolkit.key_binding import KeyBindings
+from prompt_toolkit.lexers import PygmentsLexer
+from prompt_toolkit.layout.processors import (ConditionalProcessor,
+
HighlightMatchingBracketProcessor)
+from prompt_toolkit.styles import merge_styles
+from prompt_toolkit.styles.pygments import (style_from_pygments_cls,
+ style_from_pygments_dict)
+from prompt_toolkit.formatted_text import PygmentsTokens
+from prompt_toolkit.output import ColorDepth
+from prompt_toolkit.utils import suspend_to_background_supported
from pygments.styles import get_style_by_name
from pygments.lexers import get_lexer_by_name
from pygments.util import ClassNotFound
from pygments.token import Token
+
def ask_yes_no(prompt, default=None, interrupt=None):
"""Asks a question and returns a boolean (y/n) answer.
@@ -61,11 +68,11 @@
Valid answers are: y/yes/n/no (match is not case sensitive)."""
- answers = {'y':True,'n':False,'yes':True,'no':False}
+ answers = {'y': True, 'n': False, 'yes': True, 'no': False}
ans = None
while ans not in answers.keys():
try:
- ans = input(prompt+' ').lower()
+ ans = input(prompt + ' ').lower()
if not ans: # response was an empty string
ans = default
except KeyboardInterrupt:
@@ -80,6 +87,7 @@
return answers[ans]
+
def get_pygments_lexer(name):
name = name.lower()
if name == 'ipython2':
@@ -107,13 +115,14 @@
return
content = self.jup_completer.complete_request(
- code=document.text,
- cursor_pos=document.cursor_position
+ code=document.text,
+ cursor_pos=document.cursor_position
)
start_pos = content['cursor_start'] - document.cursor_position
for m in content['matches']:
yield Completion(m, start_position=start_pos)
+
class ZMQTerminalInteractiveShell(SingletonConfigurable):
readline_use = False
@@ -206,7 +215,7 @@
"""
Callable object called via 'callable' image handler with one
argument, `data`, which is `msg["content"]["data"]` where
- `msg` is the message from iopub channel. For exmaple, you can
+ `msg` is the message from iopub channel. For example, you can
find base64 encoded PNG data as `data['image/png']`. If your function
can't handle the data supplied, it should return `False` to indicate
this.
@@ -238,16 +247,22 @@
"""
)
-
- confirm_exit = Bool(True, config=True,
+ # This is configurable on JupyterConsoleApp; this copy is not configurable
+ # to avoid a duplicate config option.
+ confirm_exit = Bool(True,
help="""Set to display confirmation dialog on exit.
You can always use 'exit' or 'quit', to force a
direct exit without any confirmation.
"""
)
+ highlight_matching_brackets = Bool(True,
+ help="Highlight matching brackets.",
+ ).tag(config=True)
+
manager = Instance('jupyter_client.KernelManager', allow_none=True)
client = Instance('jupyter_client.KernelClient', allow_none=True)
+
def _client_changed(self, name, old, new):
self.session_id = new.session.session
session_id = Unicode()
@@ -289,14 +304,14 @@
self.history_manager = ZMQHistoryManager(client=self.client)
self.configurables.append(self.history_manager)
- def get_prompt_tokens(self, cli):
+ def get_prompt_tokens(self):
return [
(Token.Prompt, 'In ['),
(Token.PromptNum, str(self.execution_count)),
(Token.Prompt, ']: '),
]
- def get_continuation_tokens(self, cli, width):
+ def get_continuation_tokens(self, width):
return [
(Token.Prompt, (' ' * (width - 2)) + ': '),
]
@@ -309,9 +324,12 @@
]
def print_out_prompt(self):
- self.pt_cli.print_tokens(self.get_out_prompt_tokens())
+ tokens = self.get_out_prompt_tokens()
+ print_formatted_text(PygmentsTokens(tokens), end='',
+ style = self.pt_cli.app.style)
kernel_info = {}
+
def init_kernel_info(self):
"""Wait for a kernel to be ready, and store kernel info"""
timeout = self.kernel_timeout
@@ -344,14 +362,13 @@
lambda: print('Out[%d]: ' % self.execution_count, end='')
return
- kbmanager = KeyBindingManager.for_prompt()
- insert_mode = ViInsertMode() | EmacsInsertMode()
- # Ctrl+J == Enter, seemingly
- @kbmanager.registry.add_binding(Keys.ControlJ,
- filter=(HasFocus(DEFAULT_BUFFER)
- & ~HasSelection()
- & insert_mode
- ))
+ kb = KeyBindings()
+ insert_mode = vi_insert_mode | emacs_insert_mode
+
+ @kb.add("enter", filter=(has_focus(DEFAULT_BUFFER)
+ & ~has_selection
+ & insert_mode
+ ))
def _(event):
b = event.current_buffer
d = b.document
@@ -366,19 +383,23 @@
more, indent = self.check_complete(d.text)
- if (not more) and b.accept_action.is_returnable:
- b.accept_action.validate_and_handle(event.cli, b)
+ if (not more) and b.accept_handler:
+ b.validate_and_handle()
else:
b.insert_text('\n' + indent)
- @kbmanager.registry.add_binding(Keys.ControlC,
filter=HasFocus(DEFAULT_BUFFER))
+ @kb.add("c-c", filter=has_focus(DEFAULT_BUFFER))
def _(event):
event.current_buffer.reset()
- @kbmanager.registry.add_binding(Keys.ControlBackslash,
filter=HasFocus(DEFAULT_BUFFER))
+ @kb.add("c-\\", filter=has_focus(DEFAULT_BUFFER))
def _(event):
raise EOFError
+ @kb.add("c-z", filter=Condition(lambda:
suspend_to_background_supported()))
+ def _(event):
+ event.cli.suspend_to_background()
+
# Pre-populate history from IPython's history database
history = InMemoryHistory()
last_cell = u""
@@ -387,7 +408,7 @@
# Ignore blank lines and consecutive duplicates
cell = cast_unicode_py2(cell.rstrip())
if cell and (cell != last_cell):
- history.append(cell)
+ history.append_string(cell)
style_overrides = {
Token.Prompt: '#009900',
@@ -411,34 +432,55 @@
Token.Name.Namespace: 'bold #2080D0',
})
style_overrides.update(self.highlighting_style_overrides)
- style = PygmentsStyle.from_defaults(pygments_style_cls=style_cls,
- style_dict=style_overrides)
+ style = merge_styles([
+ style_from_pygments_cls(style_cls),
+ style_from_pygments_dict(style_overrides),
+ ])
editing_mode = getattr(EditingMode, self.editing_mode.upper())
langinfo = self.kernel_info.get('language_info', {})
lexer = langinfo.get('pygments_lexer', langinfo.get('name', 'text'))
- app = create_prompt_application(multiline=True,
- editing_mode=editing_mode,
- lexer=PygmentsLexer(get_pygments_lexer(lexer)),
- get_prompt_tokens=self.get_prompt_tokens,
-
get_continuation_tokens=self.get_continuation_tokens,
- key_bindings_registry=kbmanager.registry,
- history=history,
- completer=JupyterPTCompleter(self.Completer),
- enable_history_search=True,
- style=style,
- )
- self._eventloop = create_eventloop()
- self.pt_cli = CommandLineInterface(app,
- eventloop=self._eventloop,
- output=create_output(true_color=self.true_color),
+ # If enabled in the settings, highlight matching brackets
+ # when the DEFAULT_BUFFER has the focus
+ input_processors = [ConditionalProcessor(
+ processor=HighlightMatchingBracketProcessor(chars='[](){}'),
+ filter=has_focus(DEFAULT_BUFFER) & ~is_done &
+ Condition(lambda: self.highlight_matching_brackets))
+ ]
+
+ self.pt_cli = PromptSession(
+ message=(lambda: PygmentsTokens(self.get_prompt_tokens())),
+ multiline=True,
+ editing_mode=editing_mode,
+ lexer=PygmentsLexer(get_pygments_lexer(lexer)),
+ prompt_continuation=(
+ lambda width, lineno, is_soft_wrap:
+ PygmentsTokens(self.get_continuation_tokens(width))
+ ),
+ key_bindings=kb,
+ history=history,
+ completer=JupyterPTCompleter(self.Completer),
+ enable_history_search=True,
+ style=style,
+ input_processors=input_processors,
+ color_depth=(ColorDepth.TRUE_COLOR if self.true_color else None),
+
)
def prompt_for_code(self):
- document = self.pt_cli.run(pre_run=self.pre_prompt,
- reset_current_buffer=True)
- return document.text
+ if self.next_input:
+ default = self.next_input
+ self.next_input = None
+ else:
+ default = ''
+
+ with patch_stdout(raw=True):
+ text = self.pt_cli.prompt(
+ default=default,
+# pre_run=self.pre_prompt,# reset_current_buffer=True,
+ )
+ return text
def init_io(self):
if sys.platform not in {'win32', 'cli'}:
@@ -451,7 +493,8 @@
if self.use_kernel_is_complete:
msg_id = self.client.is_complete(code)
try:
- return self.handle_is_complete_reply(msg_id,
timeout=self.kernel_is_complete_timeout)
+ return self.handle_is_complete_reply(msg_id,
+
timeout=self.kernel_is_complete_timeout)
except SyntaxError:
return False, ""
else:
@@ -474,10 +517,11 @@
# this. Adding a callable to pre_run_callables does what we need
# after the buffer is reset.
s = cast_unicode_py2(self.next_input)
+
def set_doc():
- self.pt_cli.application.buffer.document = Document(s)
+ self.pt_cli.app.buffer.document = Document(s)
if hasattr(self.pt_cli, 'pre_run_callables'):
- self.pt_cli.pre_run_callables.append(set_doc)
+ self.pt_cli.app.pre_run_callables.append(set_doc)
else:
# Older version of prompt_toolkit; it's OK to set the document
# directly here.
@@ -491,8 +535,8 @@
try:
code = self.prompt_for_code()
except EOFError:
- if (not self.confirm_exit) \
- or ask_yes_no('Do you really want to exit
([y]/n)?','y','n'):
+ if (not self.confirm_exit) or \
+ ask_yes_no('Do you really want to exit ([y]/n)?', 'y',
'n'):
self.ask_exit()
else:
@@ -514,10 +558,10 @@
self._eventloop.close()
if self.keepkernel and not self.own_kernel:
print('keeping kernel alive')
- elif self.keepkernel and self.own_kernel :
+ elif self.keepkernel and self.own_kernel:
print("owning kernel, cannot keep it alive")
self.client.shutdown()
- else :
+ else:
print("Shutting down kernel")
self.client.shutdown()
@@ -741,7 +785,7 @@
if not self.from_here(sub_msg):
sys.stdout.write(self.other_output_prefix)
sys.stdout.write('In [{}]:
'.format(content['execution_count']))
- sys.stdout.write(content['code']+'\n')
+ sys.stdout.write(content['code'] + '\n')
elif msg_type == 'clear_output':
if sub_msg["content"]["wait"]:
@@ -753,7 +797,6 @@
for frame in sub_msg["content"]["traceback"]:
print(frame, file=sys.stderr)
-
_imagemime = {
'image/png': 'png',
'image/jpeg': 'jpeg',
@@ -801,7 +844,7 @@
imageformat = self._imagemime[mime]
filename = 'tmp.{0}'.format(imageformat)
with NamedFileInTemporaryDirectory(filename) as f, \
- open(os.devnull, 'w') as devnull:
+ open(os.devnull, 'w') as devnull:
f.write(raw)
f.flush()
fmt = dict(file=f.name, format=imageformat)
@@ -816,7 +859,6 @@
res = True
return res
-
def handle_input_request(self, msg_id, timeout=0.1):
""" Method to capture raw_input
"""
@@ -826,10 +868,11 @@
if msg_id == req["parent_header"].get("msg_id"):
# wrap SIGINT handler
real_handler = signal.getsignal(signal.SIGINT)
- def double_int(sig,frame):
+
+ def double_int(sig, frame):
# call real handler (forwards sigint to kernel),
# then raise local interrupt, stopping local raw_input
- real_handler(sig,frame)
+ real_handler(sig, frame)
raise KeyboardInterrupt
signal.signal(signal.SIGINT, double_int)
content = req['content']
@@ -848,5 +891,6 @@
# only send stdin reply if there *was not* another request
# or execution finished while we were reading.
- if not (self.client.stdin_channel.msg_ready() or
self.client.shell_channel.msg_ready()):
+ if not (self.client.stdin_channel.msg_ready() or
+ self.client.shell_channel.msg_ready()):
self.client.input(raw_data)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_console-5.2.0/setup.cfg
new/jupyter_console-6.0.0/setup.cfg
--- old/jupyter_console-5.2.0/setup.cfg 2016-01-06 14:40:00.000000000 +0100
+++ new/jupyter_console-6.0.0/setup.cfg 2018-10-03 02:28:05.000000000 +0200
@@ -1,2 +1,9 @@
[bdist_wheel]
universal=1
+
+[flake8]
+max-line-length = 99
+;ignore = E128, E124, E251, W503
+
+[metadata]
+license_file = COPYING.md
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_console-5.2.0/setup.py
new/jupyter_console-6.0.0/setup.py
--- old/jupyter_console-5.2.0/setup.py 2016-05-12 14:30:46.000000000 +0200
+++ new/jupyter_console-6.0.0/setup.py 2018-10-03 02:28:05.000000000 +0200
@@ -15,13 +15,34 @@
import sys
-v = sys.version_info
-if v[:2] < (2,7) or (v[0] >= 3 and v[:2] < (3,3)):
- error = "ERROR: %s requires Python version 2.7 or 3.3 or above." % name
+
+if sys.version_info < (3, 5):
+ pip_message = 'This may be due to an out of date pip. Make sure you have
pip >= 9.0.1.'
+ try:
+ import pip
+ pip_version = tuple([int(x) for x in pip.__version__.split('.')[:3]])
+ if pip_version < (9, 0, 1) :
+ pip_message = 'Your pip version is out of date, please install pip
>= 9.0.1. '\
+ 'pip {} detected.'.format(pip.__version__)
+ else:
+ # pip is new enough - it must be something else
+ pip_message = ''
+ except Exception:
+ pass
+
+
+ error = """
+Jupyter_Console 6.0+ supports Python 3.5 and above.
+When using Python 2.7, please install and older version of Jupyter Console
+Python 3.3 and 3.4 were supported up to Jupyter Console 5.x.
+
+Python {py} detected.
+{pip}
+""".format(py=sys.version_info, pip=pip_message )
+
print(error, file=sys.stderr)
sys.exit(1)
-PY3 = (sys.version_info[0] >= 3)
#-----------------------------------------------------------------------------
# get on with it
@@ -65,9 +86,7 @@
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
- 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.3',
],
)
@@ -79,16 +98,19 @@
'jupyter_client',
'ipython',
'ipykernel', # bless IPython kernel for now
- 'prompt_toolkit>=1.0.0,<2.0.0',
+ 'prompt_toolkit>=2.0.0,<2.1.0',
'pygments',
]
extras_require = setuptools_args['extras_require'] = {
- 'test:python_version=="2.7"': ['mock'],
'test:sys_platform != "win32"': ['pexpect'],
+
}
+setuptools_args['python_requires'] = '>=3.5'
+
+
setuptools_args['entry_points'] = {
'console_scripts': [
'jupyter-console = jupyter_console.app:main',