##// END OF EJS Templates
Drop Python 3.9...
Matthias Bussonnier -
Show More
@@ -17,10 +17,10 b' jobs:'
17 strategy:
17 strategy:
18 matrix:
18 matrix:
19 os: [ubuntu-latest]
19 os: [ubuntu-latest]
20 python-version: ["3.9"]
20 python-version: ["3.10"]
21 include:
21 include:
22 - os: macos-latest
22 - os: macos-latest
23 python-version: "3.9"
23 python-version: "3.10"
24
24
25 steps:
25 steps:
26 - uses: actions/checkout@v3
26 - uses: actions/checkout@v3
@@ -19,12 +19,12 b' jobs:'
19 fail-fast: false
19 fail-fast: false
20 matrix:
20 matrix:
21 os: [ubuntu-latest, windows-latest]
21 os: [ubuntu-latest, windows-latest]
22 python-version: ["3.9", "3.10", "3.11"]
22 python-version: ["3.10", "3.11", "3.12"]
23 deps: [test_extra]
23 deps: [test_extra]
24 # Test all on ubuntu, test ends on macos
24 # Test all on ubuntu, test ends on macos
25 include:
25 include:
26 - os: macos-latest
26 - os: macos-latest
27 python-version: "3.9"
27 python-version: "3.10"
28 deps: test_extra
28 deps: test_extra
29 - os: macos-latest
29 - os: macos-latest
30 python-version: "3.11"
30 python-version: "3.11"
@@ -35,17 +35,17 b' jobs:'
35 deps: test
35 deps: test
36 # Tests latest development Python version
36 # Tests latest development Python version
37 - os: ubuntu-latest
37 - os: ubuntu-latest
38 python-version: "3.12-dev"
38 python-version: "3.13-dev"
39 deps: test
39 deps: test
40 # Installing optional dependencies stuff takes ages on PyPy
40 # Installing optional dependencies stuff takes ages on PyPy
41 - os: ubuntu-latest
41 - os: ubuntu-latest
42 python-version: "pypy-3.9"
42 python-version: "pypy-3.10"
43 deps: test
43 deps: test
44 - os: windows-latest
44 - os: windows-latest
45 python-version: "pypy-3.9"
45 python-version: "pypy-3.10"
46 deps: test
46 deps: test
47 - os: macos-latest
47 - os: macos-latest
48 python-version: "pypy-3.9"
48 python-version: "pypy-3.10"
49 deps: test
49 deps: test
50
50
51 steps:
51 steps:
@@ -26,9 +26,10 b' import sys'
26 #-----------------------------------------------------------------------------
26 #-----------------------------------------------------------------------------
27
27
28 # Don't forget to also update setup.py when this changes!
28 # Don't forget to also update setup.py when this changes!
29 if sys.version_info < (3, 9):
29 if sys.version_info < (3, 10):
30 raise ImportError(
30 raise ImportError(
31 """
31 """
32 IPython 8.19+ supports Python 3.10 and above, following SPEC0.
32 IPython 8.13+ supports Python 3.9 and above, following NEP 29.
33 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.
34 IPython 8.0-8.12 supports Python 3.8 and above, following NEP 29.
34 When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
35 When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
@@ -28,9 +28,6 b' import warnings'
28
28
29 from typing import Any, Optional, Dict, Union, List, Tuple
29 from typing import Any, Optional, Dict, Union, List, Tuple
30
30
31 if sys.version_info <= (3, 10):
32 from typing_extensions import TypeAlias
33 else:
34 from typing import TypeAlias
31 from typing import TypeAlias
35
32
36 # IPython's own
33 # IPython's own
@@ -3,13 +3,15 b' Test for async helpers.'
3
3
4 Should only trigger on python 3.5+ or will have syntax errors.
4 Should only trigger on python 3.5+ or will have syntax errors.
5 """
5 """
6 import platform
7 from itertools import chain, repeat
6 from itertools import chain, repeat
8 from textwrap import dedent, indent
7 from textwrap import dedent, indent
8 from typing import TYPE_CHECKING
9 from unittest import TestCase
9 from unittest import TestCase
10
11 import pytest
12
13 from IPython.core.async_helpers import _should_be_async
10 from IPython.testing.decorators import skip_without
14 from IPython.testing.decorators import skip_without
11 import sys
12 from typing import TYPE_CHECKING
13
15
14 if TYPE_CHECKING:
16 if TYPE_CHECKING:
15 from IPython import get_ipython
17 from IPython import get_ipython
@@ -17,10 +19,13 b' if TYPE_CHECKING:'
17 ip = get_ipython()
19 ip = get_ipython()
18
20
19
21
20 iprc = lambda x: ip.run_cell(dedent(x)).raise_error()
22 def iprc(x):
21 iprc_nr = lambda x: ip.run_cell(dedent(x))
23 return ip.run_cell(dedent(x)).raise_error()
24
25
26 def iprc_nr(x):
27 return ip.run_cell(dedent(x))
22
28
23 from IPython.core.async_helpers import _should_be_async
24
29
25 class AsyncTest(TestCase):
30 class AsyncTest(TestCase):
26 def test_should_be_async(self):
31 def test_should_be_async(self):
@@ -283,7 +288,11 b' class AsyncTest(TestCase):'
283
288
284 iprc("(" * 200 + ")" * 200)
289 iprc("(" * 200 + ")" * 200)
285
290
286 @skip_without('curio')
291 @pytest.mark.xfail(reason="fail on curio 1.6 and before on Python 3.12")
292 @pytest.mark.skip(
293 reason="skip_without(curio) fails on 3.12 for now even with other skip so must uncond skip"
294 )
295 # @skip_without("curio")
287 def test_autoawait_curio(self):
296 def test_autoawait_curio(self):
288 iprc("%autoawait curio")
297 iprc("%autoawait curio")
289
298
@@ -322,7 +322,7 b' class InputSplitterTestCase(unittest.TestCase):'
322
322
323 @pytest.mark.xfail(
323 @pytest.mark.xfail(
324 reason="Bug in python 3.9.8 – bpo 45738",
324 reason="Bug in python 3.9.8 – bpo 45738",
325 condition=sys.version_info in [(3, 9, 8, "final", 0), (3, 11, 0, "alpha", 2)],
325 condition=sys.version_info in [(3, 11, 0, "alpha", 2)],
326 raises=SystemError,
326 raises=SystemError,
327 strict=True,
327 strict=True,
328 )
328 )
@@ -319,8 +319,7 b' examples = ['
319 None,
319 None,
320 marks=pytest.mark.xfail(
320 marks=pytest.mark.xfail(
321 reason="Bug in python 3.9.8 – bpo 45738",
321 reason="Bug in python 3.9.8 – bpo 45738",
322 condition=sys.version_info
322 condition=sys.version_info in [(3, 11, 0, "alpha", 2)],
323 in [(3, 9, 8, "final", 0), (3, 11, 0, "alpha", 2)],
324 raises=SystemError,
323 raises=SystemError,
325 strict=True,
324 strict=True,
326 ),
325 ),
@@ -338,7 +337,7 b' def test_check_complete_param(code, expected, number):'
338 @pytest.mark.xfail(platform.python_implementation() == "PyPy", reason="fail on pypy")
337 @pytest.mark.xfail(platform.python_implementation() == "PyPy", reason="fail on pypy")
339 @pytest.mark.xfail(
338 @pytest.mark.xfail(
340 reason="Bug in python 3.9.8 – bpo 45738",
339 reason="Bug in python 3.9.8 – bpo 45738",
341 condition=sys.version_info in [(3, 9, 8, "final", 0), (3, 11, 0, "alpha", 2)],
340 condition=sys.version_info in [(3, 11, 0, "alpha", 2)],
342 raises=SystemError,
341 raises=SystemError,
343 strict=True,
342 strict=True,
344 )
343 )
@@ -64,7 +64,7 b' def test_inspect_getfile_raises_exception():'
64 """Check oinspect.find_file/getsource/find_source_lines expectations"""
64 """Check oinspect.find_file/getsource/find_source_lines expectations"""
65 with pytest.raises(TypeError):
65 with pytest.raises(TypeError):
66 inspect.getfile(type)
66 inspect.getfile(type)
67 with pytest.raises(OSError if sys.version_info >= (3, 10) else TypeError):
67 with pytest.raises(OSError):
68 inspect.getfile(SourceModuleMainTest)
68 inspect.getfile(SourceModuleMainTest)
69
69
70
70
@@ -140,7 +140,7 b' def test_pprint_heap_allocated_type():'
140 """
140 """
141 Test that pprint works for heap allocated types.
141 Test that pprint works for heap allocated types.
142 """
142 """
143 module_name = "xxlimited" if sys.version_info < (3, 10) else "xxlimited_35"
143 module_name = "xxlimited_35"
144 expected_output = (
144 expected_output = (
145 "xxlimited.Null" if sys.version_info < (3, 10, 6) else "xxlimited_35.Null"
145 "xxlimited.Null" if sys.version_info < (3, 10, 6) else "xxlimited_35.Null"
146 )
146 )
@@ -3,7 +3,7 b' requires = ["setuptools >= 51.0.0"]'
3 build-backend = "setuptools.build_meta"
3 build-backend = "setuptools.build_meta"
4
4
5 [tool.mypy]
5 [tool.mypy]
6 python_version = 3.9
6 python_version = 3.10
7 ignore_missing_imports = true
7 ignore_missing_imports = true
8 follow_imports = 'silent'
8 follow_imports = 'silent'
9 exclude = [
9 exclude = [
@@ -26,7 +26,7 b' classifiers ='
26
26
27 [options]
27 [options]
28 packages = find:
28 packages = find:
29 python_requires = >=3.9
29 python_requires = >=3.10
30 zip_safe = False
30 zip_safe = False
31 install_requires =
31 install_requires =
32 colorama; sys_platform == "win32"
32 colorama; sys_platform == "win32"
@@ -80,7 +80,7 b' test_extra ='
80 curio
80 curio
81 matplotlib!=3.2.0
81 matplotlib!=3.2.0
82 nbformat
82 nbformat
83 numpy>=1.22
83 numpy>=1.23
84 pandas
84 pandas
85 trio
85 trio
86 all =
86 all =
@@ -23,7 +23,7 b' import sys'
23 #
23 #
24 # This check is also made in IPython/__init__, don't forget to update both when
24 # This check is also made in IPython/__init__, don't forget to update both when
25 # changing Python version requirements.
25 # changing Python version requirements.
26 if sys.version_info < (3, 9):
26 if sys.version_info < (3, 10):
27 pip_message = 'This may be due to an out of date pip. Make sure you have pip >= 9.0.1.'
27 pip_message = 'This may be due to an out of date pip. Make sure you have pip >= 9.0.1.'
28 try:
28 try:
29 import pip
29 import pip
@@ -39,6 +39,7 b' if sys.version_info < (3, 9):'
39
39
40
40
41 error = """
41 error = """
42 IPython 8.19+ supports Python 3.10 and above, following SPEC0
42 IPython 8.13+ supports Python 3.9 and above, following NEP 29.
43 IPython 8.13+ supports Python 3.9 and above, following NEP 29.
43 IPython 8.0-8.12 supports Python 3.8 and above, following NEP 29.
44 IPython 8.0-8.12 supports Python 3.8 and above, following NEP 29.
44 When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
45 When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
General Comments 0
You need to be logged in to leave comments. Login now