Show More
@@ -19,12 +19,12 b' jobs:' | |||
|
19 | 19 | fail-fast: false |
|
20 | 20 | matrix: |
|
21 | 21 | os: [ubuntu-latest, windows-latest] |
|
22 |
python-version: [ |
|
|
22 | python-version: ["3.9", "3.10", "3.11"] | |
|
23 | 23 | deps: [test_extra] |
|
24 | 24 | # Test all on ubuntu, test ends on macos |
|
25 | 25 | include: |
|
26 | 26 | - os: macos-latest |
|
27 |
python-version: "3. |
|
|
27 | python-version: "3.9" | |
|
28 | 28 | deps: test_extra |
|
29 | 29 | - os: macos-latest |
|
30 | 30 | python-version: "3.11" |
@@ -39,13 +39,13 b' jobs:' | |||
|
39 | 39 | deps: test |
|
40 | 40 | # Installing optional dependencies stuff takes ages on PyPy |
|
41 | 41 | - os: ubuntu-latest |
|
42 |
python-version: "pypy-3. |
|
|
42 | python-version: "pypy-3.9" | |
|
43 | 43 | deps: test |
|
44 | 44 | - os: windows-latest |
|
45 |
python-version: "pypy-3. |
|
|
45 | python-version: "pypy-3.9" | |
|
46 | 46 | deps: test |
|
47 | 47 | - os: macos-latest |
|
48 |
python-version: "pypy-3. |
|
|
48 | python-version: "pypy-3.9" | |
|
49 | 49 | deps: test |
|
50 | 50 | |
|
51 | 51 | steps: |
@@ -26,10 +26,11 b' import sys' | |||
|
26 | 26 | #----------------------------------------------------------------------------- |
|
27 | 27 | |
|
28 | 28 | # Don't forget to also update setup.py when this changes! |
|
29 |
if sys.version_info < (3, |
|
|
29 | if sys.version_info < (3, 9): | |
|
30 | 30 | raise ImportError( |
|
31 | 31 | """ |
|
32 |
IPython 8+ supports Python 3. |
|
|
32 | IPython 8.13+ supports Python 3.9 and above, following NEP 29. | |
|
33 | IPython 8.0-8.12 supports Python 3.8 and above, following NEP 29. | |
|
33 | 34 | When using Python 2.7, please install IPython 5.x LTS Long Term Support version. |
|
34 | 35 | Python 3.3 and 3.4 were supported up to IPython 6.x. |
|
35 | 36 | Python 3.5 was supported with IPython 7.0 to 7.9. |
@@ -508,9 +508,6 b' def eval_node(node: Union[ast.AST, None], context: EvaluationContext):' | |||
|
508 | 508 | return all_true |
|
509 | 509 | if isinstance(node, ast.Constant): |
|
510 | 510 | return node.value |
|
511 | if isinstance(node, ast.Index): | |
|
512 | # deprecated since Python 3.9 | |
|
513 | return eval_node(node.value, context) # pragma: no cover | |
|
514 | 511 | if isinstance(node, ast.Tuple): |
|
515 | 512 | return tuple(eval_node(e, context) for e in node.elts) |
|
516 | 513 | if isinstance(node, ast.List): |
@@ -530,9 +527,6 b' def eval_node(node: Union[ast.AST, None], context: EvaluationContext):' | |||
|
530 | 527 | eval_node(node.upper, context), |
|
531 | 528 | eval_node(node.step, context), |
|
532 | 529 | ) |
|
533 | if isinstance(node, ast.ExtSlice): | |
|
534 | # deprecated since Python 3.9 | |
|
535 | return tuple([eval_node(dim, context) for dim in node.dims]) # pragma: no cover | |
|
536 | 530 | if isinstance(node, ast.UnaryOp): |
|
537 | 531 | value = eval_node(node.operand, context) |
|
538 | 532 | dunders = _find_dunder(node.op, UNARY_OP_DUNDERS) |
@@ -276,11 +276,11 b' class AsyncTest(TestCase):' | |||
|
276 | 276 | """ |
|
277 | 277 | ) |
|
278 | 278 | |
|
279 | if sys.version_info < (3, 9) and platform.python_implementation() != "PyPy": | |
|
280 | # new pgen parser in 3.9 does not raise MemoryError on too many nested | |
|
281 | # parens anymore | |
|
282 | 279 |
|
|
283 | with self.assertRaises(MemoryError): | |
|
280 | """ | |
|
281 | The pgen parser in 3.8 or before use to raise MemoryError on too many | |
|
282 | nested parens anymore""" | |
|
283 | ||
|
284 | 284 |
|
|
285 | 285 | |
|
286 | 286 | @skip_without('curio') |
@@ -713,12 +713,10 b' class TestModules(tt.TempFileMixin):' | |||
|
713 | 713 | class Negator(ast.NodeTransformer): |
|
714 | 714 | """Negates all number literals in an AST.""" |
|
715 | 715 | |
|
716 | # for python 3.7 and earlier | |
|
717 | 716 | def visit_Num(self, node): |
|
718 | 717 | node.n = -node.n |
|
719 | 718 | return node |
|
720 | 719 | |
|
721 | # for python 3.8+ | |
|
722 | 720 | def visit_Constant(self, node): |
|
723 | 721 | if isinstance(node.value, int): |
|
724 | 722 | return self.visit_Num(node) |
@@ -900,7 +898,6 b' class StringRejector(ast.NodeTransformer):' | |||
|
900 | 898 | not be executed by throwing an InputRejected. |
|
901 | 899 | """ |
|
902 | 900 | |
|
903 | # 3.8 only | |
|
904 | 901 | def visit_Constant(self, node): |
|
905 | 902 | if isinstance(node.value, str): |
|
906 | 903 | raise InputRejected("test") |
@@ -166,7 +166,6 b' def doctest_tb_sysexit():' | |||
|
166 | 166 | """ |
|
167 | 167 | |
|
168 | 168 | |
|
169 | if sys.version_info >= (3, 9): | |
|
170 | 169 |
|
|
171 | 170 | |
|
172 | 171 |
|
@@ -209,50 +208,6 b' if sys.version_info >= (3, 9):' | |||
|
209 | 208 |
|
|
210 | 209 |
|
|
211 | 210 | |
|
212 | else: | |
|
213 | # currently the only difference is | |
|
214 | # + mode = 'exit' | |
|
215 | ||
|
216 | def doctest_tb_sysexit_verbose_stack_data_06(): | |
|
217 | """ | |
|
218 | In [18]: %run simpleerr.py exit | |
|
219 | An exception has occurred, use %tb to see the full traceback. | |
|
220 | SystemExit: (1, 'Mode = exit') | |
|
221 | ||
|
222 | In [19]: %run simpleerr.py exit 2 | |
|
223 | An exception has occurred, use %tb to see the full traceback. | |
|
224 | SystemExit: (2, 'Mode = exit') | |
|
225 | ||
|
226 | In [23]: %xmode verbose | |
|
227 | Exception reporting mode: Verbose | |
|
228 | ||
|
229 | In [24]: %tb | |
|
230 | --------------------------------------------------------------------------- | |
|
231 | SystemExit Traceback (most recent call last) | |
|
232 | <BLANKLINE> | |
|
233 | ... | |
|
234 | 30 except IndexError: | |
|
235 | 31 mode = 'div' | |
|
236 | ---> 33 bar(mode) | |
|
237 | mode = 'exit' | |
|
238 | <BLANKLINE> | |
|
239 | ... in bar(mode='exit') | |
|
240 | ... except: | |
|
241 | ... stat = 1 | |
|
242 | ---> ... sysexit(stat, mode) | |
|
243 | mode = 'exit' | |
|
244 | stat = 2 | |
|
245 | ... else: | |
|
246 | ... raise ValueError('Unknown mode') | |
|
247 | <BLANKLINE> | |
|
248 | ... in sysexit(stat=2, mode='exit') | |
|
249 | 10 def sysexit(stat, mode): | |
|
250 | ---> 11 raise SystemExit(stat, f"Mode = {mode}") | |
|
251 | stat = 2 | |
|
252 | mode = 'exit' | |
|
253 | <BLANKLINE> | |
|
254 | SystemExit: (2, 'Mode = exit') | |
|
255 | """ | |
|
256 | 211 | |
|
257 | 212 | def test_run_cell(): |
|
258 | 213 | import textwrap |
@@ -568,7 +568,6 b' def test_render_signature_long():' | |||
|
568 | 568 | signature(long_function), |
|
569 | 569 | long_function.__name__, |
|
570 | 570 | ) |
|
571 | if sys.version_info >= (3, 9): | |
|
572 | 571 |
|
|
573 | 572 | long_function( |
|
574 | 573 | a_really_long_parameter: int, |
@@ -576,12 +575,5 b' long_function(' | |||
|
576 | 575 | let_us_make_sure_this_is_looong: Optional[str] = None, |
|
577 | 576 | ) -> bool\ |
|
578 | 577 | """ |
|
579 | else: | |
|
580 | expected = """\ | |
|
581 | long_function( | |
|
582 | a_really_long_parameter: int, | |
|
583 | and_another_long_one: bool = False, | |
|
584 | let_us_make_sure_this_is_looong: Union[str, NoneType] = None, | |
|
585 | ) -> bool\ | |
|
586 | """ | |
|
578 | ||
|
587 | 579 | assert sig == expected |
@@ -244,14 +244,13 b' bar()' | |||
|
244 | 244 | |
|
245 | 245 | import sys |
|
246 | 246 | |
|
247 |
if |
|
|
247 | if platform.python_implementation() != "PyPy": | |
|
248 | 248 | """ |
|
249 | 249 | New 3.9 Pgen Parser does not raise Memory error, except on failed malloc. |
|
250 | 250 | """ |
|
251 | 251 | class MemoryErrorTest(unittest.TestCase): |
|
252 | 252 | def test_memoryerror(self): |
|
253 | 253 | memoryerror_code = "(" * 200 + ")" * 200 |
|
254 | with tt.AssertPrints("MemoryError"): | |
|
255 | 254 |
|
|
256 | 255 | |
|
257 | 256 |
@@ -8,8 +8,8 b' environment:' | |||
|
8 | 8 | COLUMNS: 120 # Appveyor web viewer window width is 130 chars |
|
9 | 9 | |
|
10 | 10 | matrix: |
|
11 |
- PYTHON: "C:\\Python3 |
|
|
12 |
PYTHON_VERSION: "3. |
|
|
11 | - PYTHON: "C:\\Python39" | |
|
12 | PYTHON_VERSION: "3.9.x" | |
|
13 | 13 | PYTHON_ARCH: "32" |
|
14 | 14 | |
|
15 | 15 | init: |
@@ -2,7 +2,7 b'' | |||
|
2 | 2 | requires = ["setuptools >= 51.0.0"] |
|
3 | 3 | build-backend = "setuptools.build_meta" |
|
4 | 4 | [tool.mypy] |
|
5 |
python_version = 3. |
|
|
5 | python_version = 3.9 | |
|
6 | 6 | ignore_missing_imports = true |
|
7 | 7 | follow_imports = 'silent' |
|
8 | 8 | exclude = [ |
@@ -23,7 +23,7 b' import sys' | |||
|
23 | 23 | # |
|
24 | 24 | # This check is also made in IPython/__init__, don't forget to update both when |
|
25 | 25 | # changing Python version requirements. |
|
26 |
if sys.version_info < (3, |
|
|
26 | if sys.version_info < (3, 9): | |
|
27 | 27 | pip_message = 'This may be due to an out of date pip. Make sure you have pip >= 9.0.1.' |
|
28 | 28 | try: |
|
29 | 29 | import pip |
@@ -39,7 +39,8 b' if sys.version_info < (3, 8):' | |||
|
39 | 39 | |
|
40 | 40 | |
|
41 | 41 | error = """ |
|
42 | IPython 8+ supports Python 3.8 and above, following NEP 29. | |
|
42 | IPython 8.13+ supports Python 3.8 and above, following NEP 29. | |
|
43 | IPython 8.0-8.12 supports Python 3.8 and above, following NEP 29. | |
|
43 | 44 | When using Python 2.7, please install IPython 5.x LTS Long Term Support version. |
|
44 | 45 | Python 3.3 and 3.4 were supported up to IPython 6.x. |
|
45 | 46 | Python 3.5 was supported with IPython 7.0 to 7.9. |
General Comments 0
You need to be logged in to leave comments.
Login now