From 3fe1c2746ebdacbca5d53f9cb2e1322d6d7608d4 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Jun 01 2020 12:24:55 +0000 Subject: Update to 7.15.0 (#1841983) --- diff --git a/ipython.spec b/ipython.spec index 51baf70..1c261f0 100644 --- a/ipython.spec +++ b/ipython.spec @@ -2,8 +2,8 @@ %bcond_without doc Name: ipython -Version: 7.14.0 -Release: 6%{?dist} +Version: 7.15.0 +Release: 1%{?dist} Summary: An enhanced interactive Python shell # See bug #603178 for a quick overview for the choice of licenses @@ -13,15 +13,6 @@ License: (BSD and MIT and Python) and GPLv2+ URL: http://ipython.org/ Source0: %pypi_source -# test_embed_svg_url needs internet connection -# https://github.com/ipython/ipython/issues/12281 -Patch0: remove-a-part-of-a-test-which-needs-internet.patch -# Temporarily remove tests not compatible with the latest Python 3.9.0a6 -Patch1: remove-tests-not-compatible-with-Python-3.9.0a6.patch -# Temporarily remove tests not compatible with the latest Python 3.9.0b1 -# Already fixed upstream: https://github.com/ipython/ipython/commit/7432f3c8d7179034975725d95879bb00e17defeb#diff-bbf32c098874ada0fe3a6e139fc35e34 -Patch2: remove-tests-not-compatible-with-Python-3.9.0b1.patch - BuildArch: noarch BuildRequires: python3-devel @@ -256,6 +247,9 @@ popd %changelog +* Mon Jun 01 2020 Lumír Balhar - 7.15.0-1 +- Update to 7.15.0 (#1841983) + * Mon May 25 2020 Miro Hrončok - 7.14.0-6 - Rebuilt for Python 3.9 diff --git a/remove-a-part-of-a-test-which-needs-internet.patch b/remove-a-part-of-a-test-which-needs-internet.patch deleted file mode 100644 index 0c1d427..0000000 --- a/remove-a-part-of-a-test-which-needs-internet.patch +++ /dev/null @@ -1,29 +0,0 @@ -From f75c754e2fa82a1cb24a79ca691adf3c167a1633 Mon Sep 17 00:00:00 2001 -From: Lumir Balhar -Date: Mon, 4 May 2020 08:53:00 +0200 -Subject: [PATCH] Remove a part of a test which needs internet - ---- - IPython/core/tests/test_display.py | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -diff --git a/IPython/core/tests/test_display.py b/IPython/core/tests/test_display.py -index 04c9325..cdc7272 100644 ---- a/IPython/core/tests/test_display.py -+++ b/IPython/core/tests/test_display.py -@@ -106,11 +106,7 @@ def test_embed_svg_url(): - svg = display.SVG(url=url + 'z') - nt.assert_true(svg._repr_svg_().startswith(' -Date: Tue, 5 May 2020 16:38:43 +0200 -Subject: [PATCH] Remove tests not compatible with Python 3.9.0a6 - ---- - IPython/core/tests/test_async_helpers.py | 7 +- - IPython/core/tests/test_debugger.py | 98 ++---------------------- - IPython/core/tests/test_oinspect.py | 44 +++-------- - IPython/core/tests/test_ultratb.py | 33 ++++---- - 4 files changed, 29 insertions(+), 153 deletions(-) - -diff --git a/IPython/core/tests/test_async_helpers.py b/IPython/core/tests/test_async_helpers.py -index 86a516c..a7c7963 100644 ---- a/IPython/core/tests/test_async_helpers.py -+++ b/IPython/core/tests/test_async_helpers.py -@@ -1,5 +1,5 @@ - """ --Test for async helpers. -+Test for async helpers. - - Should only trigger on python 3.5+ or will have syntax errors. - """ -@@ -275,11 +275,6 @@ class AsyncTest(TestCase): - await sleep(0.1) - """ - ) -- -- def test_memory_error(self): -- with self.assertRaises(MemoryError): -- iprc("(" * 200 + ")" * 200) -- - @skip_without('curio') - def test_autoawait_curio(self): - iprc("%autoawait curio") -diff --git a/IPython/core/tests/test_debugger.py b/IPython/core/tests/test_debugger.py -index 7f3720a..338fe12 100644 ---- a/IPython/core/tests/test_debugger.py -+++ b/IPython/core/tests/test_debugger.py -@@ -60,7 +60,7 @@ def test_longer_repr(): - from reprlib import repr as trepr # Py 3 - except ImportError: - from repr import repr as trepr # Py 2 -- -+ - a = '1234567890'* 7 - ar = "'1234567890123456789012345678901234567890123456789012345678901234567890'" - a_trunc = "'123456789012...8901234567890'" -@@ -72,97 +72,9 @@ def test_longer_repr(): - debugger.Tracer() - nt.assert_equal(trepr(a), ar) - --def test_ipdb_magics(): -- '''Test calling some IPython magics from ipdb. -- -- First, set up some test functions and classes which we can inspect. -- -- >>> class ExampleClass(object): -- ... """Docstring for ExampleClass.""" -- ... def __init__(self): -- ... """Docstring for ExampleClass.__init__""" -- ... pass -- ... def __str__(self): -- ... return "ExampleClass()" -- -- >>> def example_function(x, y, z="hello"): -- ... """Docstring for example_function.""" -- ... pass -- -- >>> old_trace = sys.gettrace() -- -- Create a function which triggers ipdb. -- -- >>> def trigger_ipdb(): -- ... a = ExampleClass() -- ... debugger.Pdb().set_trace() -- -- >>> with PdbTestInput([ -- ... 'pdef example_function', -- ... 'pdoc ExampleClass', -- ... 'up', -- ... 'down', -- ... 'list', -- ... 'pinfo a', -- ... 'll', -- ... 'continue', -- ... ]): -- ... trigger_ipdb() -- --Return-- -- None -- > (3)trigger_ipdb() -- 1 def trigger_ipdb(): -- 2 a = ExampleClass() -- ----> 3 debugger.Pdb().set_trace() -- -- ipdb> pdef example_function -- example_function(x, y, z='hello') -- ipdb> pdoc ExampleClass -- Class docstring: -- Docstring for ExampleClass. -- Init docstring: -- Docstring for ExampleClass.__init__ -- ipdb> up -- > (11)() -- 7 'pinfo a', -- 8 'll', -- 9 'continue', -- 10 ]): -- ---> 11 trigger_ipdb() -- -- ipdb> down -- None -- > (3)trigger_ipdb() -- 1 def trigger_ipdb(): -- 2 a = ExampleClass() -- ----> 3 debugger.Pdb().set_trace() -- -- ipdb> list -- 1 def trigger_ipdb(): -- 2 a = ExampleClass() -- ----> 3 debugger.Pdb().set_trace() -- -- ipdb> pinfo a -- Type: ExampleClass -- String form: ExampleClass() -- Namespace: Local... -- Docstring: Docstring for ExampleClass. -- Init docstring: Docstring for ExampleClass.__init__ -- ipdb> ll -- 1 def trigger_ipdb(): -- 2 a = ExampleClass() -- ----> 3 debugger.Pdb().set_trace() -- -- ipdb> continue -- -- Restore previous trace function, e.g. for coverage.py -- -- >>> sys.settrace(old_trace) -- ''' -- - def test_ipdb_magics2(): - '''Test ipdb with a very short function. -- -+ - >>> old_trace = sys.gettrace() - - >>> def bar(): -@@ -179,9 +91,9 @@ def test_ipdb_magics2(): - ----> 2 pass - - ipdb> continue -- -- Restore previous trace function, e.g. for coverage.py -- -+ -+ Restore previous trace function, e.g. for coverage.py -+ - >>> sys.settrace(old_trace) - ''' - -diff --git a/IPython/core/tests/test_oinspect.py b/IPython/core/tests/test_oinspect.py -index 8bdcfad..eba51fd 100644 ---- a/IPython/core/tests/test_oinspect.py -+++ b/IPython/core/tests/test_oinspect.py -@@ -74,7 +74,7 @@ def test_find_file_decorated1(): - @noop1 - def f(x): - "My docstring" -- -+ - match_pyfiles(oinspect.find_file(f), os.path.abspath(__file__)) - nt.assert_equal(f.__doc__, "My docstring") - -@@ -90,10 +90,10 @@ def test_find_file_decorated2(): - @noop2 - def f(x): - "My docstring 2" -- -+ - match_pyfiles(oinspect.find_file(f), os.path.abspath(__file__)) - nt.assert_equal(f.__doc__, "My docstring 2") -- -+ - - def test_find_file_magic(): - run = ip.find_line_magic('run') -@@ -234,43 +234,19 @@ def test_definition_kwonlyargs(): - i = inspector.info(f_kwarg, oname='f_kwarg') # analysis:ignore - nt.assert_equal(i['definition'], "f_kwarg(pos, *, kwonly)") - --def test_getdoc(): -- class A(object): -- """standard docstring""" -- pass -- -- class B(object): -- """standard docstring""" -- def getdoc(self): -- return "custom docstring" -- -- class C(object): -- """standard docstring""" -- def getdoc(self): -- return None -- -- a = A() -- b = B() -- c = C() -- -- nt.assert_equal(oinspect.getdoc(a), "standard docstring") -- nt.assert_equal(oinspect.getdoc(b), "custom docstring") -- nt.assert_equal(oinspect.getdoc(c), "standard docstring") -- -- - def test_empty_property_has_no_source(): - i = inspector.info(property(), detail_level=1) - nt.assert_is(i['source'], None) - - - def test_property_sources(): -- import posixpath -+ import posixpath - # A simple adder whose source and signature stays - # the same across Python distributions - def simple_add(a, b): - "Adds two numbers" - return a + b -- -+ - class A(object): - @property - def foo(self): -@@ -279,7 +255,7 @@ def test_property_sources(): - foo = foo.setter(lambda self, v: setattr(self, 'bar', v)) - - dname = property(posixpath.dirname) -- adder = property(simple_add) -+ adder = property(simple_add) - - i = inspector.info(A.foo, detail_level=1) - nt.assert_in('def foo(self):', i['source']) -@@ -287,7 +263,7 @@ def test_property_sources(): - - i = inspector.info(A.dname, detail_level=1) - nt.assert_in('def dirname(p)', i['source']) -- -+ - i = inspector.info(A.adder, detail_level=1) - nt.assert_in('def simple_add(a, b)', i['source']) - -@@ -359,11 +335,11 @@ def test_pinfo_docstring_if_detail_and_no_source(): - def bar(self): - """ This is a docstring for Foo.bar """ - pass -- ''' -- -+ ''' -+ - ip.run_cell(obj_def) - ip.run_cell('foo = Foo()') -- -+ - with AssertNotPrints("Source:"): - with AssertPrints('Docstring:'): - ip._inspect('pinfo', 'foo', detail_level=0) -diff --git a/IPython/core/tests/test_ultratb.py b/IPython/core/tests/test_ultratb.py -index 3ab0ce3..c7139ef 100644 ---- a/IPython/core/tests/test_ultratb.py -+++ b/IPython/core/tests/test_ultratb.py -@@ -57,24 +57,24 @@ def recursionlimit(frames): - class ChangedPyFileTest(unittest.TestCase): - def test_changing_py_file(self): - """Traceback produced if the line where the error occurred is missing? -- -+ - https://github.com/ipython/ipython/issues/1456 - """ - with TemporaryDirectory() as td: - fname = os.path.join(td, "foo.py") - with open(fname, "w") as f: - f.write(file_1) -- -+ - with prepended_to_syspath(td): - ip.run_cell("import foo") -- -+ - with tt.AssertPrints("ZeroDivisionError"): - ip.run_cell("foo.f()") -- -+ - # Make the file shorter, so the line of the error is missing. - with open(fname, "w") as f: - f.write(file_2) -- -+ - # For some reason, this was failing on the *second* call after - # changing the file, so we call f() twice. - with tt.AssertNotPrints("Internal Python error", channel='stderr'): -@@ -98,27 +98,27 @@ class NonAsciiTest(unittest.TestCase): - fname = os.path.join(td, u"fooé.py") - with open(fname, "w") as f: - f.write(file_1) -- -+ - with prepended_to_syspath(td): - ip.run_cell("import foo") -- -+ - with tt.AssertPrints("ZeroDivisionError"): - ip.run_cell("foo.f()") -- -+ - def test_iso8859_5(self): - with TemporaryDirectory() as td: - fname = os.path.join(td, 'dfghjkl.py') - - with io.open(fname, 'w', encoding='iso-8859-5') as f: - f.write(iso_8859_5_file) -- -+ - with prepended_to_syspath(td): - ip.run_cell("from dfghjkl import fail") -- -+ - with tt.AssertPrints("ZeroDivisionError"): - with tt.AssertPrints(u'дбИЖ', suppress=False): - ip.run_cell('fail()') -- -+ - def test_nonascii_msg(self): - cell = u"raise Exception('é')" - expected = u"Exception('é')" -@@ -173,12 +173,12 @@ class IndentationErrorTest(unittest.TestCase): - with tt.AssertPrints("IndentationError"): - with tt.AssertPrints("zoon()", suppress=False): - ip.run_cell(indentationerror_file) -- -+ - with TemporaryDirectory() as td: - fname = os.path.join(td, "foo.py") - with open(fname, "w") as f: - f.write(indentationerror_file) -- -+ - with tt.AssertPrints("IndentationError"): - with tt.AssertPrints("zoon()", suppress=False): - ip.magic('run %s' % fname) -@@ -253,13 +253,6 @@ bar() - ip.showsyntaxerror() - - --class MemoryErrorTest(unittest.TestCase): -- def test_memoryerror(self): -- memoryerror_code = "(" * 200 + ")" * 200 -- with tt.AssertPrints("MemoryError"): -- ip.run_cell(memoryerror_code) -- -- - class Python3ChainedExceptionsTest(unittest.TestCase): - DIRECT_CAUSE_ERROR_CODE = """ - try: --- -2.26.2 - diff --git a/remove-tests-not-compatible-with-Python-3.9.0b1.patch b/remove-tests-not-compatible-with-Python-3.9.0b1.patch deleted file mode 100644 index 651d3e9..0000000 --- a/remove-tests-not-compatible-with-Python-3.9.0b1.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 0f57f9fe79fc8b5b070bb92c77dd1feb739c92bc Mon Sep 17 00:00:00 2001 -From: Lumir Balhar -Date: Wed, 20 May 2020 08:26:07 +0200 -Subject: [PATCH] remove tests not compatible with python 3.9.0b1 - ---- - IPython/core/tests/test_oinspect.py | 32 ----------------------------- - 1 file changed, 32 deletions(-) - -diff --git a/IPython/core/tests/test_oinspect.py b/IPython/core/tests/test_oinspect.py -index eba51fd..f59c62f 100644 ---- a/IPython/core/tests/test_oinspect.py -+++ b/IPython/core/tests/test_oinspect.py -@@ -381,35 +381,3 @@ def test_render_signature_short(): - short_fun.__name__, - ) - nt.assert_equal(sig, 'short_fun(a=1)') -- -- --def test_render_signature_long(): -- from typing import Optional -- -- def long_function( -- a_really_long_parameter: int, -- and_another_long_one: bool = False, -- let_us_make_sure_this_is_looong: Optional[str] = None, -- ) -> bool: pass -- -- sig = oinspect._render_signature( -- signature(long_function), -- long_function.__name__, -- ) -- nt.assert_in(sig, [ -- # Python >=3.7 -- '''\ --long_function( -- a_really_long_parameter: int, -- and_another_long_one: bool = False, -- let_us_make_sure_this_is_looong: Union[str, NoneType] = None, --) -> bool\ --''', # Python <=3.6 -- '''\ --long_function( -- a_really_long_parameter:int, -- and_another_long_one:bool=False, -- let_us_make_sure_this_is_looong:Union[str, NoneType]=None, --) -> bool\ --''', -- ]) --- -2.26.2 - diff --git a/sources b/sources index 1858eab..e931a31 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ipython-7.14.0.tar.gz) = 412829d521711e5cb678b8db169d5b8958d742a07c165a656f7e40c776f21f6e436e8116f31e349da555d500c582d3797c846ac0d7efa8c3f2ea11e87fbfc8c6 +SHA512 (ipython-7.15.0.tar.gz) = 46b09a8b6e5611d7b11b26aac475e7b823b00653ea6a3bf1a66d294cef22762b38e63c79f1e4e9bea0fe3e6423b058a2a692dc544c082dca37b9bb91c816cd22