##// END OF EJS Templates
Merge pull request #13658 from Carreau/mdf...
Matthias Bussonnier -
r27643:c97f6d2e merge
parent child Browse files
Show More
@@ -28,7 +28,7 b' import sys'
28 28 # Don't forget to also update setup.py when this changes!
29 29 if sys.version_info < (3, 8):
30 30 raise ImportError(
31 """
31 """
32 32 IPython 8+ supports Python 3.8 and above, following NEP 29.
33 33 When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
34 34 Python 3.3 and 3.4 were supported up to IPython 6.x.
@@ -40,7 +40,8 b' See IPython `README.rst` file for more information:'
40 40
41 41 https://github.com/ipython/ipython/blob/master/README.rst
42 42
43 """)
43 """
44 )
44 45
45 46 #-----------------------------------------------------------------------------
46 47 # Setup the top level names
@@ -40,7 +40,7 b' class IPyAutocall(object):'
40 40 self._ip = ip
41 41
42 42 def set_ip(self, ip):
43 """ Will be used to set _ip point to current ipython instance b/f call
43 """Will be used to set _ip point to current ipython instance b/f call
44 44
45 45 Override this method if you don't want this to happen.
46 46
@@ -589,7 +589,7 b' class Completer(Configurable):'
589 589
590 590 This will enable completion on elements of lists, results of function calls, etc.,
591 591 but can be unsafe because the code is actually evaluated on TAB.
592 """
592 """,
593 593 ).tag(config=True)
594 594
595 595 use_jedi = Bool(default_value=JEDI_INSTALLED,
@@ -166,7 +166,7 b' class HistoryAccessor(HistoryAccessorBase):'
166 166 in which case there will be no stored history, no SQLite connection,
167 167 and no background saving thread. This may be necessary in some
168 168 threaded environments where IPython is embedded.
169 """
169 """,
170 170 ).tag(config=True)
171 171
172 172 connection_options = Dict(
@@ -511,7 +511,7 b' class ExecutionMagics(Magics):'
511 511 """Run the named file inside IPython as a program.
512 512
513 513 Usage::
514
514
515 515 %run [-n -i -e -G]
516 516 [( -t [-N<N>] | -d [-b<N>] | -p [profile options] )]
517 517 ( -m mod | filename ) [args]
@@ -552,7 +552,7 b' class ExecutionMagics(Magics):'
552 552 *two* back slashes (e.g. ``\\\\*``) to suppress expansions.
553 553 To completely disable these expansions, you can use -G flag.
554 554
555 On Windows systems, the use of single quotes `'` when specifying
555 On Windows systems, the use of single quotes `'` when specifying
556 556 a file is not supported. Use double quotes `"`.
557 557
558 558 Options:
@@ -58,8 +58,8 b' def script_args(f):'
58 58 '--no-raise-error', action="store_false", dest='raise_error',
59 59 help="""Whether you should raise an error message in addition to
60 60 a stream on stderr if you get a nonzero exit code.
61 """
62 )
61 """,
62 ),
63 63 ]
64 64 for arg in args:
65 65 f = arg(f)
@@ -87,7 +87,8 b' g()'
87 87
88 88 #####
89 89
90 MULTILINE_SYSTEM_ASSIGN_AFTER_DEDENT = ("""\
90 MULTILINE_SYSTEM_ASSIGN_AFTER_DEDENT = (
91 """\
91 92 def test():
92 93 for i in range(1):
93 94 print(i)
@@ -547,7 +547,7 b' class TestSafeExecfileNonAsciiPath(unittest.TestCase):'
547 547 self.TESTDIR = join(self.BASETESTDIR, u"åäö")
548 548 os.mkdir(self.TESTDIR)
549 549 with open(
550 join(self.TESTDIR, u"åäötestscript.py"), "w", encoding="utf-8"
550 join(self.TESTDIR, "åäötestscript.py"), "w", encoding="utf-8"
551 551 ) as sfile:
552 552 sfile.write("pass\n")
553 553 self.oldpath = os.getcwd()
@@ -236,7 +236,8 b' def test_run_cell():'
236 236 if 4:
237 237 print "bar"
238 238
239 """)
239 """
240 )
240 241 # Simply verifies that this kind of input is run
241 242 ip.run_cell(complex)
242 243
@@ -448,7 +448,9 b' def test_multiline_time():'
448 448 ip = get_ipython()
449 449 ip.user_ns.pop('run', None)
450 450
451 ip.run_cell(dedent("""\
451 ip.run_cell(
452 dedent(
453 """\
452 454 %%time
453 455 a = "ho"
454 456 b = "hey"
@@ -122,7 +122,8 b' class PasteTestCase(TestCase):'
122 122 ip.user_ns.pop("x")
123 123
124 124 def test_paste_py_multi(self):
125 self.paste("""
125 self.paste(
126 """
126 127 >>> x = [1,2,3]
127 128 >>> y = []
128 129 >>> for i in x:
@@ -145,7 +146,8 b' class PasteTestCase(TestCase):'
145 146
146 147 def test_paste_email(self):
147 148 "Test pasting of email-quoted contents"
148 self.paste("""\
149 self.paste(
150 """\
149 151 >> def foo(x):
150 152 >> return x + 1
151 153 >> xx = foo(1.1)"""
@@ -154,7 +156,8 b' class PasteTestCase(TestCase):'
154 156
155 157 def test_paste_email2(self):
156 158 "Email again; some programs add a space also at each quoting level"
157 self.paste("""\
159 self.paste(
160 """\
158 161 > > def foo(x):
159 162 > > return x + 1
160 163 > > yy = foo(2.1) """
@@ -163,7 +166,8 b' class PasteTestCase(TestCase):'
163 166
164 167 def test_paste_email_py(self):
165 168 "Email quoting of interactive input"
166 self.paste("""\
169 self.paste(
170 """\
167 171 >> >>> def f(x):
168 172 >> ... return x+1
169 173 >> ...
@@ -108,7 +108,7 b' def test_list_profiles_in():'
108 108 for name in ("profile_foo", "profile_hello", "not_a_profile"):
109 109 Path(td / name).mkdir(parents=True)
110 110 if dec.unicode_paths:
111 Path(td / u"profile_ünicode").mkdir(parents=True)
111 Path(td / "profile_ünicode").mkdir(parents=True)
112 112
113 113 with open(td / "profile_file", "w", encoding="utf-8") as f:
114 114 f.write("I am not a profile directory")
@@ -66,7 +66,9 b' class ImportDenier(importlib.abc.MetaPathFinder):'
66 66 """
67 67 Importing %s disabled by IPython, which has
68 68 already imported an Incompatible QT Binding: %s
69 """ % (fullname, loaded_api()))
69 """
70 % (fullname, loaded_api())
71 )
70 72
71 73
72 74 ID = ImportDenier()
@@ -103,9 +103,9 b' class Audio(DisplayObject):'
103 103 See Also
104 104 --------
105 105 ipywidgets.Audio
106
107 AUdio widget with more more flexibility and options.
108
106
107 Audio widget with more more flexibility and options.
108
109 109 """
110 110 _read_flags = 'rb'
111 111
@@ -510,12 +510,10 b' class FileLinks(FileLink):'
510 510
511 511 self.recursive = recursive
512 512
513 def _get_display_formatter(self,
514 dirname_output_format,
515 fname_output_format,
516 fp_format,
517 fp_cleaner=None):
518 """ generate built-in formatter function
513 def _get_display_formatter(
514 self, dirname_output_format, fname_output_format, fp_format, fp_cleaner=None
515 ):
516 """generate built-in formatter function
519 517
520 518 this is used to define both the notebook and terminal built-in
521 519 formatters as they only differ by some wrapper text for each entry
@@ -31,7 +31,7 b' def no_op(*args, **kwargs):'
31 31
32 32
33 33 @onlyif_cmds_exist("latex", "dvipng")
34 @pytest.mark.parametrize("s, wrap", [(u"$$x^2$$", False), (u"x^2", True)])
34 @pytest.mark.parametrize("s, wrap", [("$$x^2$$", False), ("x^2", True)])
35 35 def test_latex_to_png_dvipng_runs(s, wrap):
36 36 """
37 37 Test that latex_to_png_dvipng just runs without error.
@@ -273,7 +273,7 b' def test_unicode_repr():'
273 273 p = pretty.pretty(c)
274 274 assert p == u
275 275 p = pretty.pretty([c])
276 assert p == u"[%s]" % u
276 assert p == "[%s]" % u
277 277
278 278
279 279 def test_basic_class():
@@ -38,7 +38,7 b' def ipfunc():'
38 38 ....: print(i, end=' ')
39 39 ....: print(i+1, end=' ')
40 40 ....:
41 0 1 1 2 2 3
41 0 1 1 2 2 3
42 42
43 43
44 44 It's OK to use '_' for the last result, but do NOT try to use IPython's
@@ -50,7 +50,7 b' def ipfunc():'
50 50
51 51 In [8]: print(repr(_))
52 52 'hi'
53
53
54 54 In [7]: 3+4
55 55 Out[7]: 7
56 56
@@ -60,7 +60,7 b' def ipfunc():'
60 60 In [9]: ipfunc()
61 61 Out[9]: 'ipfunc'
62 62 """
63 return 'ipfunc'
63 return "ipfunc"
64 64
65 65
66 66 def ipos():
@@ -470,11 +470,11 b' def strip_ansi(source):'
470 470
471 471 class EvalFormatter(Formatter):
472 472 """A String Formatter that allows evaluation of simple expressions.
473
473
474 474 Note that this version interprets a `:` as specifying a format string (as per
475 475 standard string formatting), so if slicing is required, you must explicitly
476 476 create a slice.
477
477
478 478 This is to be used in templating cases, such as the parallel batch
479 479 script templates, where simple arithmetic on arguments is useful.
480 480
@@ -690,8 +690,8 b' def compute_item_matrix(items, row_first=False, empty=None, *args, **kwargs) :'
690 690 return ([[_get_or_default(items, c * nrow + r, default=empty) for c in range(ncol)] for r in range(nrow)], info)
691 691
692 692
693 def columnize(items, row_first=False, separator=' ', displaywidth=80, spread=False):
694 """ Transform a list of strings into a single string with columns.
693 def columnize(items, row_first=False, separator=" ", displaywidth=80, spread=False):
694 """Transform a list of strings into a single string with columns.
695 695
696 696 Parameters
697 697 ----------
@@ -135,7 +135,7 b' Metadata'
135 135 ^^^^^^^^
136 136
137 137 We often want to provide frontends with guidance on how to display the data. To
138 support this, ``_repr_*_()`` methods (except `_repr_pretty_``?) can also return a ``(data, metadata)``
138 support this, ``_repr_*_()`` methods (except ``_repr_pretty_``?) can also return a ``(data, metadata)``
139 139 tuple where ``metadata`` is a dictionary containing arbitrary key-value pairs for
140 140 the frontend to interpret. An example use case is ``_repr_jpeg_()``, which can
141 141 be set to return a jpeg image and a ``{'height': 400, 'width': 600}`` dictionary
@@ -17,9 +17,9 b' interactively. Its main components are:'
17 17 * A powerful interactive Python shell.
18 18
19 19
20 .. image:: ./_images/ipython-6-screenshot.png
21 :alt: Screenshot of IPython 6.0
22 :align: center
20 .. image:: ./_images/ipython-6-screenshot.png
21 :alt: Screenshot of IPython 6.0
22 :align: center
23 23
24 24
25 25 * A `Jupyter <https://jupyter.org/>`_ kernel to work with Python code in Jupyter
@@ -51,9 +51,9 b' Pull requests (226):'
51 51 * `542 <https://github.com/ipython/ipython/issues/542>`_: issue 440
52 52 * `533 <https://github.com/ipython/ipython/issues/533>`_: Remove unused configobj and validate libraries from externals.
53 53 * `538 <https://github.com/ipython/ipython/issues/538>`_: fix various tests on Windows
54 * `540 <https://github.com/ipython/ipython/issues/540>`_: support `-pylab` flag with deprecation warning
54 * `540 <https://github.com/ipython/ipython/issues/540>`_: support ``-pylab`` flag with deprecation warning
55 55 * `537 <https://github.com/ipython/ipython/issues/537>`_: Docs update
56 * `536 <https://github.com/ipython/ipython/issues/536>`_: `setup.py install` depends on setuptools on Windows
56 * `536 <https://github.com/ipython/ipython/issues/536>`_: ``setup.py install`` depends on setuptools on Windows
57 57 * `480 <https://github.com/ipython/ipython/issues/480>`_: Get help mid-command
58 58 * `462 <https://github.com/ipython/ipython/issues/462>`_: Str and Bytes traitlets
59 59 * `534 <https://github.com/ipython/ipython/issues/534>`_: Handle unicode properly in IPython.zmq.iostream
@@ -916,7 +916,7 b' Pull Requests (687):'
916 916 * :ghpull:`4444`: Css cleaning
917 917 * :ghpull:`4523`: Use username and password for MongoDB on ShiningPanda
918 918 * :ghpull:`4510`: Update whatsnew from PR files
919 * :ghpull:`4441`: add `setup.py jsversion`
919 * :ghpull:`4441`: add ``setup.py jsversion``
920 920 * :ghpull:`4518`: Fix for race condition in url file decoding.
921 921 * :ghpull:`4497`: don't automatically unpack datetime objects in the message spec
922 922 * :ghpull:`4506`: wait for empty queues as well as load-balanced tasks
@@ -1050,7 +1050,7 b' Pull Requests (687):'
1050 1050 * :ghpull:`4214`: engine ID metadata should be unicode, not bytes
1051 1051 * :ghpull:`4232`: no highlight if no language specified
1052 1052 * :ghpull:`4218`: Fix display of SyntaxError when .py file is modified
1053 * :ghpull:`4207`: add `setup.py css` command
1053 * :ghpull:`4207`: add ``setup.py css`` command
1054 1054 * :ghpull:`4224`: clear previous callbacks on execute
1055 1055 * :ghpull:`4180`: Iptest refactoring
1056 1056 * :ghpull:`4105`: JS output area misaligned
@@ -81,7 +81,7 b' New features'
81 81 :mod:`IPython.kernel`, :mod:`IPython.kernel.core`, :mod:`traitlets.config`,
82 82 :mod:`IPython.tools` and :mod:`IPython.testing`.
83 83
84 * As part of merging in the `ipython1-dev` stuff, the `setup.py` script and
84 * As part of merging in the `ipython1-dev` stuff, the ``setup.py`` script and
85 85 friends have been completely refactored. Now we are checking for
86 86 dependencies using the approach that matplotlib uses.
87 87
@@ -161,7 +161,7 b' Backwards incompatible changes'
161 161 `'basic'` to `'b'`.
162 162
163 163 * IPython has a larger set of dependencies if you want all of its capabilities.
164 See the `setup.py` script for details.
164 See the ``setup.py`` script for details.
165 165
166 166 * The constructors for :class:`IPython.kernel.client.MultiEngineClient` and
167 167 :class:`IPython.kernel.client.TaskClient` no longer take the (ip,port) tuple.
@@ -16,9 +16,6 b' IPython 8.3.0'
16 16 - :ghpull:`13600`, ``pre_run_*``-hooks will now have a ``cell_id`` attribute on
17 17 the info object when frontend provide it.
18 18
19 - :ghpull:`13624`, fixed :kbd:`End` key being broken after accepting an
20 autosuggestion.
21
22 19 .. _version 8.2.0:
23 20
24 21 IPython 8.2.0
@@ -519,8 +516,8 b' Automatic Vi prompt stripping'
519 516
520 517 When pasting code into IPython, it will strip the leading prompt characters if
521 518 there are any. For example, you can paste the following code into the console -
522 it will still work, even though each line is prefixed with prompts (`In`,
523 `Out`)::
519 it will still work, even though each line is prefixed with prompts (``In``,
520 ``Out``)::
524 521
525 522 In [1]: 2 * 2 == 4
526 523 Out[1]: True
@@ -615,7 +612,7 b' who did a fantastic job at updating our code base, migrating to pytest, pushing'
615 612 our coverage, and fixing a large number of bugs. I highly recommend contacting
616 613 them if you need help with C++ and Python projects.
617 614
618 You can find all relevant issues and PRs with the SDG 2021 tag `<https://github.com/ipython/ipython/issues?q=label%3A%22Numfocus+SDG+2021%22+>`__
615 You can find all relevant issues and PRs with `the SDG 2021 tag <https://github.com/ipython/ipython/issues?q=label%3A%22Numfocus+SDG+2021%22+>`__
619 616
620 617 Removing support for older Python versions
621 618 ------------------------------------------
@@ -45,3 +45,4 b' addopts = --durations=10'
45 45 --ignore=IPython/utils/version.py
46 46 doctest_optionflags = NORMALIZE_WHITESPACE ELLIPSIS
47 47 ipdoctest_optionflags = NORMALIZE_WHITESPACE ELLIPSIS
48 asyncio_mode = strict
@@ -52,7 +52,9 b' See IPython `README.rst` file for more information:'
52 52
53 53 Python {py} detected.
54 54 {pip}
55 """.format(py=sys.version_info, pip=pip_message )
55 """.format(
56 py=sys.version_info, pip=pip_message
57 )
56 58
57 59 print(error, file=sys.stderr)
58 60 sys.exit(1)
General Comments 0
You need to be logged in to leave comments. Login now