Hello community,
here is the log from the commit of package python3-jupyter_core for
openSUSE:Factory checked in at 2016-05-25 21:27:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-jupyter_core (Old)
and /work/SRC/openSUSE:Factory/.python3-jupyter_core.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-jupyter_core"
Changes:
--------
---
/work/SRC/openSUSE:Factory/python3-jupyter_core/python3-jupyter_core-doc.changes
2016-02-18 12:36:48.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.python3-jupyter_core.new/python3-jupyter_core-doc.changes
2016-05-25 21:27:06.000000000 +0200
@@ -1,0 +2,16 @@
+Mon May 9 20:06:17 UTC 2016 - [email protected]
+
+- Update to 4.1.0
+ - Add ``jupyter.py`` module, so that :command:`python -m jupyter` always
works.
+ - Add prototype ``jupyter troubleshoot`` command for displaying environment
info.
+ - Ensure directory containing ``jupyter`` executable is included when
dispatching subcommands.
+ - Unicode fixes for Legacy Python.
+
+-------------------------------------------------------------------
+Sun May 8 07:12:12 UTC 2016 - [email protected]
+
+- specfile:
+ * updated source url to files.pythonhosted.org
+
+
+-------------------------------------------------------------------
---
/work/SRC/openSUSE:Factory/python3-jupyter_core/python3-jupyter_core.changes
2016-02-17 12:23:35.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.python3-jupyter_core.new/python3-jupyter_core.changes
2016-05-25 21:27:06.000000000 +0200
@@ -1,0 +2,16 @@
+Mon May 9 20:06:17 UTC 2016 - [email protected]
+
+- Update to 4.1.0
+ - Add ``jupyter.py`` module, so that :command:`python -m jupyter` always
works.
+ - Add prototype ``jupyter troubleshoot`` command for displaying environment
info.
+ - Ensure directory containing ``jupyter`` executable is included when
dispatching subcommands.
+ - Unicode fixes for Legacy Python.
+
+-------------------------------------------------------------------
+Sun May 8 07:12:10 UTC 2016 - [email protected]
+
+- specfile:
+ * updated source url to files.pythonhosted.org
+
+
+-------------------------------------------------------------------
Old:
----
jupyter_core-4.0.6.tar.gz
New:
----
jupyter_core-4.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-jupyter_core-doc.spec ++++++
--- /var/tmp/diff_new_pack.THDUFR/_old 2016-05-25 21:27:07.000000000 +0200
+++ /var/tmp/diff_new_pack.THDUFR/_new 2016-05-25 21:27:07.000000000 +0200
@@ -23,15 +23,15 @@
%endif
Name: python3-jupyter_core-doc
-Version: 4.0.6
+Version: 4.1.0
Release: 0
Summary: Documentation for python3-jupyter_core
License: BSD-3-Clause
Group: Development/Languages/Python
Url: http://jupyter.org
Source:
https://pypi.python.org/packages/source/j/jupyter_core/jupyter_core-%{version}.tar.gz
-BuildRequires: python3-jupyter_core
BuildRequires: python3-Sphinx
+BuildRequires: python3-jupyter_core
%if %{build_pdf}
BuildRequires: python3-Sphinx-latex
%endif
@@ -43,6 +43,7 @@
%package html
Summary: HTML documentation for python3-jupyter_core
+Group: Development/Languages/Python
Recommends: python3-jupyter_core = %{version}
%description html
@@ -50,6 +51,7 @@
%package pdf
Summary: PDF documentation for python3-jupyter_core
+Group: Development/Languages/Python
Recommends: python3-jupyter_core = %{version}
%description pdf
++++++ python3-jupyter_core.spec ++++++
--- /var/tmp/diff_new_pack.THDUFR/_old 2016-05-25 21:27:07.000000000 +0200
+++ /var/tmp/diff_new_pack.THDUFR/_new 2016-05-25 21:27:07.000000000 +0200
@@ -17,16 +17,16 @@
Name: python3-jupyter_core
-Version: 4.0.6
+Version: 4.1.0
Release: 0
Summary: Base package on which Jupyter projects rely
License: BSD-3-Clause
Group: Development/Languages/Python
Url: http://jupyter.org
-Source:
https://pypi.python.org/packages/source/j/jupyter_core/jupyter_core-%{version}.tar.gz
+Source:
https://files.pythonhosted.org/packages/source/j/jupyter_core/jupyter_core-%{version}.tar.gz
BuildRequires: python3-devel >= 3.3
-BuildRequires: python3-setuptools
BuildRequires: python3-ipython_genutils
+BuildRequires: python3-setuptools
BuildRequires: python3-traitlets
# Test requirements
BuildRequires: python3-mock
@@ -74,10 +74,13 @@
done
%check
-# test_migrate requires files not found in the package
pushd jupyter_core/tests
+# test_migrate requires files not found in the package
rm test_migrate.py
-PYTHONPATH=%{buildroot}%{python3_sitelib} py.test
+ln -s %{buildroot}%{_bindir}/jupyter-%{py3_ver} ./jupyter
+export "PATH=%{buildroot}%{_bindir}:./:$PATH"
+# test_not_on_path removes the environment variables needed to make the tests
work
+PYTHONPATH=%{buildroot}%{python3_sitelib} py.test -k "not test_not_on_path"
popd
%post
@@ -94,13 +97,16 @@
%defattr(-,root,root,-)
%doc CONTRIBUTING.md COPYING.md README.md
%{_bindir}/jupyter
-%{_bindir}/jupyter3
-%{_bindir}/jupyter-%{py3_ver}
-%ghost %{_sysconfdir}/alternatives/jupyter
%{_bindir}/jupyter-migrate
+%{_bindir}/jupyter3
%{_bindir}/jupyter3-migrate
+%{_bindir}/jupyter-%{py3_ver}
%{_bindir}/jupyter-migrate-%{py3_ver}
+%ghost %{_sysconfdir}/alternatives/jupyter
%ghost %{_sysconfdir}/alternatives/jupyter-migrate
-%{python3_sitelib}/*
+%{python3_sitelib}/jupyter.py
+%{python3_sitelib}/__pycache__/jupyter.*.pyc
+%{python3_sitelib}/jupyter_core/
+%{python3_sitelib}/jupyter_core-%{version}-*.egg-info
%changelog
++++++ jupyter_core-4.0.6.tar.gz -> jupyter_core-4.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-4.0.6/PKG-INFO
new/jupyter_core-4.1.0/PKG-INFO
--- old/jupyter_core-4.0.6/PKG-INFO 2015-09-18 10:23:31.000000000 +0200
+++ new/jupyter_core-4.1.0/PKG-INFO 2016-03-08 14:07:39.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: jupyter_core
-Version: 4.0.6
+Version: 4.1.0
Summary: Jupyter core package. A base package on which Jupyter projects rely.
Home-page: http://jupyter.org
Author: Jupyter Development Team
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-4.0.6/docs/changelog.rst
new/jupyter_core-4.1.0/docs/changelog.rst
--- old/jupyter_core-4.0.6/docs/changelog.rst 2015-09-18 10:19:33.000000000
+0200
+++ new/jupyter_core-4.1.0/docs/changelog.rst 2016-03-08 14:06:27.000000000
+0100
@@ -1,6 +1,21 @@
Changes in jupyter-core
=======================
+4.1
+---
+
+4.1.0
+~~~~~
+
+`on
+GitHub <https://github.com/jupyter/jupyter_core/releases/tag/4.1>`__
+
+- Add ``jupyter.py`` module, so that :command:`python -m jupyter` always works.
+- Add prototype ``jupyter troubleshoot`` command for displaying environment
info.
+- Ensure directory containing ``jupyter`` executable is included when
dispatching subcommands.
+- Unicode fixes for Legacy Python.
+
+
4.0
---
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-4.0.6/jupyter.py
new/jupyter_core-4.1.0/jupyter.py
--- old/jupyter_core-4.0.6/jupyter.py 1970-01-01 01:00:00.000000000 +0100
+++ new/jupyter_core-4.1.0/jupyter.py 2016-02-12 11:37:57.000000000 +0100
@@ -0,0 +1,4 @@
+"""Launch the root jupyter command"""
+if __name__ == '__main__':
+ from jupyter_core.command import main
+ main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-4.0.6/jupyter_core/command.py
new/jupyter_core-4.1.0/jupyter_core/command.py
--- old/jupyter_core-4.0.6/jupyter_core/command.py 2015-09-17
09:28:33.000000000 +0200
+++ new/jupyter_core-4.1.0/jupyter_core/command.py 2016-02-23
16:16:17.000000000 +0100
@@ -56,6 +56,7 @@
return parser
+
def list_subcommands():
"""List all jupyter subcommands
@@ -64,10 +65,9 @@
Returns a list of jupyter's subcommand names, without the `jupyter-`
prefix.
Nested children (e.g. jupyter-sub-subsub) are not included.
"""
- path = os.environ.get('PATH') or os.defpath
subcommand_tuples = set()
# construct a set of `('foo', 'bar') from `jupyter-foo-bar`
- for d in path.split(os.pathsep):
+ for d in _path_with_self():
try:
names = os.listdir(d)
except OSError:
@@ -93,7 +93,7 @@
Python provides execvp on Windows, but its behavior is problematic (Python
bug#9148).
"""
if sys.platform.startswith('win'):
- p = Popen([cmd] + argv[1:])
+ p = Popen([cmd] + argv[1:], shell=True)
# Don't raise KeyboardInterrupt in the parent process.
# Set this after spawning, to avoid subprocess inheriting handler.
import signal
@@ -104,7 +104,24 @@
os.execvp(cmd, argv)
+def _path_with_self():
+ """Ensure `jupyter`'s dir is on PATH"""
+ script = sys.argv[0]
+ bindir = os.path.dirname(script)
+ path_list = (os.environ.get('PATH') or os.defpath).split(os.pathsep)
+ if (os.path.isdir(bindir)
+ and bindir not in path_list
+ and os.access(script, os.X_OK) # only if it's a script
+ ):
+ # ensure executable's dir is on PATH
+ # avoids missing subcommands when jupyter is run via absolute path
+ path_list.append(bindir)
+ os.environ['PATH'] = os.pathsep.join(path_list)
+ return path_list
+
+
def main():
+ _path_with_self() # ensure executable is on PATH
if len(sys.argv) > 1 and not sys.argv[1].startswith('-'):
# Don't parse if a subcommand is given
# Avoids argparse gobbling up args passed to subcommand, such as `-h`.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-4.0.6/jupyter_core/migrate.py
new/jupyter_core-4.1.0/jupyter_core/migrate.py
--- old/jupyter_core-4.0.6/jupyter_core/migrate.py 2015-09-18
10:22:43.000000000 +0200
+++ new/jupyter_core-4.1.0/jupyter_core/migrate.py 2016-01-29
08:21:30.000000000 +0100
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
"""Migrating IPython < 4.0 to Jupyter
This *copies* configuration and resources to their new locations in Jupyter
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jupyter_core-4.0.6/jupyter_core/tests/test_command.py
new/jupyter_core-4.1.0/jupyter_core/tests/test_command.py
--- old/jupyter_core-4.0.6/jupyter_core/tests/test_command.py 2015-07-14
19:07:29.000000000 +0200
+++ new/jupyter_core-4.1.0/jupyter_core/tests/test_command.py 2016-01-29
08:21:30.000000000 +0100
@@ -7,7 +7,7 @@
import pytest
try:
- from unitteset.mock import patch
+ from unittest.mock import patch
except ImportError:
# py2
from mock import patch
@@ -76,6 +76,7 @@
with pytest.raises(CalledProcessError):
output = get_jupyter_output('nonexistant-subcommand')
[email protected](sys, 'argv', [__file__] + sys.argv[1:])
def test_subcommand_list(tmpdir):
a = tmpdir.mkdir("a")
for cmd in ('jupyter-foo-bar',
@@ -98,3 +99,19 @@
'xyz',
'yo-eyropa-ganymyde-callysto',
]
+
+def test_not_on_path(tmpdir):
+ a = tmpdir.mkdir("a")
+ jupyter = a.join('jupyter')
+ jupyter.write(
+ 'from jupyter_core import command; command.main()'
+ )
+ jupyter.chmod(0o700)
+ witness_cmd = 'jupyter-witness'
+ if sys.platform == 'win32':
+ witness_cmd += '.py'
+ witness = a.join(witness_cmd)
+ witness.write('#!%s\n%s\n' % (sys.executable, 'print("WITNESS ME")'))
+ witness.chmod(0o700)
+ out = check_output([sys.executable, str(jupyter), 'witness'], env={'PATH':
''})
+ assert b'WITNESS' in out
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jupyter_core-4.0.6/jupyter_core/tests/test_migrate.py
new/jupyter_core-4.1.0/jupyter_core/tests/test_migrate.py
--- old/jupyter_core-4.0.6/jupyter_core/tests/test_migrate.py 2015-06-25
22:44:46.000000000 +0200
+++ new/jupyter_core-4.1.0/jupyter_core/tests/test_migrate.py 2016-01-29
08:21:30.000000000 +0100
@@ -1,4 +1,5 @@
"""Test config file migration"""
+# coding: utf-8
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
@@ -36,7 +37,7 @@
@pytest.fixture
def td(request):
"""Fixture for a temporary directory"""
- td = mkdtemp()
+ td = mkdtemp(u'μnïcø∂e')
request.addfinalizer(lambda : shutil.rmtree(td))
return td
@@ -215,5 +216,3 @@
migrate()
assert os.path.exists(env['JUPYTER_CONFIG_DIR'])
assert os.path.exists(env['JUPYTER_DATA_DIR'])
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-4.0.6/jupyter_core/troubleshoot.py
new/jupyter_core-4.1.0/jupyter_core/troubleshoot.py
--- old/jupyter_core-4.0.6/jupyter_core/troubleshoot.py 1970-01-01
01:00:00.000000000 +0100
+++ new/jupyter_core-4.1.0/jupyter_core/troubleshoot.py 2016-03-08
14:06:27.000000000 +0100
@@ -0,0 +1,104 @@
+#!/usr/bin/env python
+"""
+display environment information that isfrequently
+used to troubleshoot installations of Jupyter or IPython
+"""
+
+# import argparse
+import os
+import platform
+import subprocess
+import sys
+
+
+# def get_args():
+# """
+# TODO: output in JSON or xml? maybe?
+# """
+# pass
+
+def subs(cmd):
+ """
+ get data from commands that we need to run outside of python
+ """
+ try:
+ stdout = subprocess.check_output(cmd)
+ return stdout.decode('utf-8', 'replace').strip()
+ except (OSError, subprocess.CalledProcessError):
+ return None
+
+
+def get_data():
+ """
+ returns a dict of various user environment data
+ """
+ env = {}
+ env['path'] = os.environ.get('PATH')
+ env['sys_path'] = sys.path
+ env['sys_exe'] = sys.executable
+ env['sys_version'] = sys.version
+ env['platform'] = platform.platform()
+ # FIXME: which on Windows?
+ if sys.platform == 'win32':
+ env['where'] = subs(['where', 'jupyter'])
+ env['which'] = None
+ else:
+ env['which'] = subs(['which', '-a', 'jupyter'])
+ env['where'] = None
+ env['pip'] = subs(['pip', 'list'])
+ env['conda'] = subs(['conda', 'list'])
+ return env
+
+
+def main():
+ """
+ print out useful info
+ """
+ #pylint: disable=superfluous-parens
+ # args = get_args()
+ environment_data = get_data()
+
+ print('$PATH:')
+ for directory in environment_data['path'].split(':'):
+ print('\t' + directory)
+
+ print('\n' + 'sys.path:')
+ for directory in environment_data['sys_path']:
+ print('\t' + directory)
+
+ print('\n' + 'sys.executable:')
+ print('\t' + environment_data['sys_exe'])
+
+ print('\n' + 'sys.version:')
+ if '\n' in environment_data['sys_version']:
+ for data in environment_data['sys_version'].split('\n'):
+ print('\t' + data)
+ else:
+ print('\t' + environment_data['sys_version'])
+
+ print('\n' + 'platform.platform():')
+ print('\t' + environment_data['platform'])
+
+ if environment_data['which']:
+ print('\n' + 'which -a jupyter:')
+ for line in environment_data['which'].split('\n'):
+ print('\t' + line)
+
+ if environment_data['where']:
+ print('\n' + 'where jupyter:')
+ for line in environment_data['where'].split('\n'):
+ print('\t' + line)
+
+ if environment_data['pip']:
+ print('\n' + 'pip list:')
+ for package in environment_data['pip'].split('\n'):
+ print('\t' + package)
+
+ if environment_data['conda']:
+ print('\n' + 'conda list:')
+ for package in environment_data['conda'].split('\n'):
+ print('\t' + package)
+
+
+if __name__ == '__main__':
+ main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-4.0.6/jupyter_core/version.py
new/jupyter_core-4.1.0/jupyter_core/version.py
--- old/jupyter_core-4.0.6/jupyter_core/version.py 2015-09-18
10:23:00.000000000 +0200
+++ new/jupyter_core-4.1.0/jupyter_core/version.py 2016-03-08
14:07:01.000000000 +0100
@@ -1,6 +1,6 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
-version_info = (4, 0, 6)
+version_info = (4, 1, 0)
__version__ = '.'.join(map(str, version_info))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_core-4.0.6/setup.py
new/jupyter_core-4.1.0/setup.py
--- old/jupyter_core-4.0.6/setup.py 2015-09-16 14:01:43.000000000 +0200
+++ new/jupyter_core-4.1.0/setup.py 2016-03-07 11:57:50.000000000 +0100
@@ -51,6 +51,7 @@
packages = ['jupyter_core',
'jupyter_core.utils',
'jupyter_core.tests'],
+ py_modules = ['jupyter'],
package_data = package_data,
scripts = glob(pjoin('scripts', '*')),
description = "Jupyter core package. A base package on which
Jupyter projects rely.",
@@ -86,6 +87,7 @@
'console_scripts': [
'jupyter = jupyter_core.command:main',
'jupyter-migrate = jupyter_core.migrate:main',
+ 'jupyter-troubleshoot = jupyter_core.troubleshoot:main',
]
}