##// END OF EJS Templates
crashhandler: Cast rptdir to Path (#14578)...
M Bussonnier -
r28963:d7eebae4 merge
parent child Browse files
Show More
@@ -1,236 +1,248
1 # encoding: utf-8
1 # encoding: utf-8
2 """sys.excepthook for IPython itself, leaves a detailed report on disk.
2 """sys.excepthook for IPython itself, leaves a detailed report on disk.
3
3
4 Authors:
4 Authors:
5
5
6 * Fernando Perez
6 * Fernando Perez
7 * Brian E. Granger
7 * Brian E. Granger
8 """
8 """
9
9
10 #-----------------------------------------------------------------------------
10 #-----------------------------------------------------------------------------
11 # Copyright (C) 2001-2007 Fernando Perez. <fperez@colorado.edu>
11 # Copyright (C) 2001-2007 Fernando Perez. <fperez@colorado.edu>
12 # Copyright (C) 2008-2011 The IPython Development Team
12 # Copyright (C) 2008-2011 The IPython Development Team
13 #
13 #
14 # Distributed under the terms of the BSD License. The full license is in
14 # Distributed under the terms of the BSD License. The full license is in
15 # the file COPYING, distributed as part of this software.
15 # the file COPYING, distributed as part of this software.
16 #-----------------------------------------------------------------------------
16 #-----------------------------------------------------------------------------
17
17
18 #-----------------------------------------------------------------------------
18 #-----------------------------------------------------------------------------
19 # Imports
19 # Imports
20 #-----------------------------------------------------------------------------
20 #-----------------------------------------------------------------------------
21
21
22 import sys
22 import sys
23 import traceback
23 import traceback
24 from pprint import pformat
24 from pprint import pformat
25 from pathlib import Path
25 from pathlib import Path
26
26
27 import builtins as builtin_mod
28
27 from IPython.core import ultratb
29 from IPython.core import ultratb
30 from IPython.core.application import Application
28 from IPython.core.release import author_email
31 from IPython.core.release import author_email
29 from IPython.utils.sysinfo import sys_info
32 from IPython.utils.sysinfo import sys_info
30 from IPython.utils.py3compat import input
31
33
32 from IPython.core.release import __version__ as version
34 from IPython.core.release import __version__ as version
33
35
34 from typing import Optional
36 from typing import Optional, Dict
37 import types
35
38
36 #-----------------------------------------------------------------------------
39 #-----------------------------------------------------------------------------
37 # Code
40 # Code
38 #-----------------------------------------------------------------------------
41 #-----------------------------------------------------------------------------
39
42
40 # Template for the user message.
43 # Template for the user message.
41 _default_message_template = """\
44 _default_message_template = """\
42 Oops, {app_name} crashed. We do our best to make it stable, but...
45 Oops, {app_name} crashed. We do our best to make it stable, but...
43
46
44 A crash report was automatically generated with the following information:
47 A crash report was automatically generated with the following information:
45 - A verbatim copy of the crash traceback.
48 - A verbatim copy of the crash traceback.
46 - A copy of your input history during this session.
49 - A copy of your input history during this session.
47 - Data on your current {app_name} configuration.
50 - Data on your current {app_name} configuration.
48
51
49 It was left in the file named:
52 It was left in the file named:
50 \t'{crash_report_fname}'
53 \t'{crash_report_fname}'
51 If you can email this file to the developers, the information in it will help
54 If you can email this file to the developers, the information in it will help
52 them in understanding and correcting the problem.
55 them in understanding and correcting the problem.
53
56
54 You can mail it to: {contact_name} at {contact_email}
57 You can mail it to: {contact_name} at {contact_email}
55 with the subject '{app_name} Crash Report'.
58 with the subject '{app_name} Crash Report'.
56
59
57 If you want to do it now, the following command will work (under Unix):
60 If you want to do it now, the following command will work (under Unix):
58 mail -s '{app_name} Crash Report' {contact_email} < {crash_report_fname}
61 mail -s '{app_name} Crash Report' {contact_email} < {crash_report_fname}
59
62
60 In your email, please also include information about:
63 In your email, please also include information about:
61 - The operating system under which the crash happened: Linux, macOS, Windows,
64 - The operating system under which the crash happened: Linux, macOS, Windows,
62 other, and which exact version (for example: Ubuntu 16.04.3, macOS 10.13.2,
65 other, and which exact version (for example: Ubuntu 16.04.3, macOS 10.13.2,
63 Windows 10 Pro), and whether it is 32-bit or 64-bit;
66 Windows 10 Pro), and whether it is 32-bit or 64-bit;
64 - How {app_name} was installed: using pip or conda, from GitHub, as part of
67 - How {app_name} was installed: using pip or conda, from GitHub, as part of
65 a Docker container, or other, providing more detail if possible;
68 a Docker container, or other, providing more detail if possible;
66 - How to reproduce the crash: what exact sequence of instructions can one
69 - How to reproduce the crash: what exact sequence of instructions can one
67 input to get the same crash? Ideally, find a minimal yet complete sequence
70 input to get the same crash? Ideally, find a minimal yet complete sequence
68 of instructions that yields the crash.
71 of instructions that yields the crash.
69
72
70 To ensure accurate tracking of this issue, please file a report about it at:
73 To ensure accurate tracking of this issue, please file a report about it at:
71 {bug_tracker}
74 {bug_tracker}
72 """
75 """
73
76
74 _lite_message_template = """
77 _lite_message_template = """
75 If you suspect this is an IPython {version} bug, please report it at:
78 If you suspect this is an IPython {version} bug, please report it at:
76 https://github.com/ipython/ipython/issues
79 https://github.com/ipython/ipython/issues
77 or send an email to the mailing list at {email}
80 or send an email to the mailing list at {email}
78
81
79 You can print a more detailed traceback right now with "%tb", or use "%debug"
82 You can print a more detailed traceback right now with "%tb", or use "%debug"
80 to interactively debug it.
83 to interactively debug it.
81
84
82 Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
85 Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
83 {config}Application.verbose_crash=True
86 {config}Application.verbose_crash=True
84 """
87 """
85
88
86
89
87 class CrashHandler(object):
90 class CrashHandler:
88 """Customizable crash handlers for IPython applications.
91 """Customizable crash handlers for IPython applications.
89
92
90 Instances of this class provide a :meth:`__call__` method which can be
93 Instances of this class provide a :meth:`__call__` method which can be
91 used as a ``sys.excepthook``. The :meth:`__call__` signature is::
94 used as a ``sys.excepthook``. The :meth:`__call__` signature is::
92
95
93 def __call__(self, etype, evalue, etb)
96 def __call__(self, etype, evalue, etb)
94 """
97 """
95
98
96 message_template = _default_message_template
99 message_template = _default_message_template
97 section_sep = '\n\n'+'*'*75+'\n\n'
100 section_sep = '\n\n'+'*'*75+'\n\n'
101 info: Dict[str, Optional[str]]
98
102
99 def __init__(
103 def __init__(
100 self,
104 self,
101 app,
105 app: Application,
102 contact_name: Optional[str] = None,
106 contact_name: Optional[str] = None,
103 contact_email: Optional[str] = None,
107 contact_email: Optional[str] = None,
104 bug_tracker: Optional[str] = None,
108 bug_tracker: Optional[str] = None,
105 show_crash_traceback: bool = True,
109 show_crash_traceback: bool = True,
106 call_pdb: bool = False,
110 call_pdb: bool = False,
107 ):
111 ):
108 """Create a new crash handler
112 """Create a new crash handler
109
113
110 Parameters
114 Parameters
111 ----------
115 ----------
112 app : Application
116 app : Application
113 A running :class:`Application` instance, which will be queried at
117 A running :class:`Application` instance, which will be queried at
114 crash time for internal information.
118 crash time for internal information.
115 contact_name : str
119 contact_name : str
116 A string with the name of the person to contact.
120 A string with the name of the person to contact.
117 contact_email : str
121 contact_email : str
118 A string with the email address of the contact.
122 A string with the email address of the contact.
119 bug_tracker : str
123 bug_tracker : str
120 A string with the URL for your project's bug tracker.
124 A string with the URL for your project's bug tracker.
121 show_crash_traceback : bool
125 show_crash_traceback : bool
122 If false, don't print the crash traceback on stderr, only generate
126 If false, don't print the crash traceback on stderr, only generate
123 the on-disk report
127 the on-disk report
124 call_pdb
128 call_pdb
125 Whether to call pdb on crash
129 Whether to call pdb on crash
126
130
127 Attributes
131 Attributes
128 ----------
132 ----------
129 These instances contain some non-argument attributes which allow for
133 These instances contain some non-argument attributes which allow for
130 further customization of the crash handler's behavior. Please see the
134 further customization of the crash handler's behavior. Please see the
131 source for further details.
135 source for further details.
132
136
133 """
137 """
134 self.crash_report_fname = "Crash_report_%s.txt" % app.name
138 self.crash_report_fname = "Crash_report_%s.txt" % app.name
135 self.app = app
139 self.app = app
136 self.call_pdb = call_pdb
140 self.call_pdb = call_pdb
137 #self.call_pdb = True # dbg
141 #self.call_pdb = True # dbg
138 self.show_crash_traceback = show_crash_traceback
142 self.show_crash_traceback = show_crash_traceback
139 self.info = dict(app_name = app.name,
143 self.info = dict(app_name = app.name,
140 contact_name = contact_name,
144 contact_name = contact_name,
141 contact_email = contact_email,
145 contact_email = contact_email,
142 bug_tracker = bug_tracker,
146 bug_tracker = bug_tracker,
143 crash_report_fname = self.crash_report_fname)
147 crash_report_fname = self.crash_report_fname)
144
148
145
149 def __call__(
146 def __call__(self, etype, evalue, etb):
150 self,
151 etype: type[BaseException],
152 evalue: BaseException,
153 etb: types.TracebackType,
154 ) -> None:
147 """Handle an exception, call for compatible with sys.excepthook"""
155 """Handle an exception, call for compatible with sys.excepthook"""
148
156
149 # do not allow the crash handler to be called twice without reinstalling it
157 # do not allow the crash handler to be called twice without reinstalling it
150 # this prevents unlikely errors in the crash handling from entering an
158 # this prevents unlikely errors in the crash handling from entering an
151 # infinite loop.
159 # infinite loop.
152 sys.excepthook = sys.__excepthook__
160 sys.excepthook = sys.__excepthook__
153
161
154 # Report tracebacks shouldn't use color in general (safer for users)
162 # Report tracebacks shouldn't use color in general (safer for users)
155 color_scheme = 'NoColor'
163 color_scheme = 'NoColor'
156
164
157 # Use this ONLY for developer debugging (keep commented out for release)
165 # Use this ONLY for developer debugging (keep commented out for release)
158 #color_scheme = 'Linux' # dbg
166 # color_scheme = 'Linux' # dbg
159 try:
167 ipython_dir = getattr(self.app, "ipython_dir", None)
160 rptdir = self.app.ipython_dir
168 if ipython_dir is not None:
161 except:
169 assert isinstance(ipython_dir, str)
170 rptdir = Path(ipython_dir)
171 else:
162 rptdir = Path.cwd()
172 rptdir = Path.cwd()
163 if rptdir is None or not Path.is_dir(rptdir):
173 if not rptdir.is_dir():
164 rptdir = Path.cwd()
174 rptdir = Path.cwd()
165 report_name = rptdir / self.crash_report_fname
175 report_name = rptdir / self.crash_report_fname
166 # write the report filename into the instance dict so it can get
176 # write the report filename into the instance dict so it can get
167 # properly expanded out in the user message template
177 # properly expanded out in the user message template
168 self.crash_report_fname = report_name
178 self.crash_report_fname = str(report_name)
169 self.info['crash_report_fname'] = report_name
179 self.info["crash_report_fname"] = str(report_name)
170 TBhandler = ultratb.VerboseTB(
180 TBhandler = ultratb.VerboseTB(
171 color_scheme=color_scheme,
181 color_scheme=color_scheme,
172 long_header=1,
182 long_header=True,
173 call_pdb=self.call_pdb,
183 call_pdb=self.call_pdb,
174 )
184 )
175 if self.call_pdb:
185 if self.call_pdb:
176 TBhandler(etype,evalue,etb)
186 TBhandler(etype,evalue,etb)
177 return
187 return
178 else:
188 else:
179 traceback = TBhandler.text(etype,evalue,etb,context=31)
189 traceback = TBhandler.text(etype,evalue,etb,context=31)
180
190
181 # print traceback to screen
191 # print traceback to screen
182 if self.show_crash_traceback:
192 if self.show_crash_traceback:
183 print(traceback, file=sys.stderr)
193 print(traceback, file=sys.stderr)
184
194
185 # and generate a complete report on disk
195 # and generate a complete report on disk
186 try:
196 try:
187 report = open(report_name, "w", encoding="utf-8")
197 report = open(report_name, "w", encoding="utf-8")
188 except:
198 except:
189 print('Could not create crash report on disk.', file=sys.stderr)
199 print('Could not create crash report on disk.', file=sys.stderr)
190 return
200 return
191
201
192 with report:
202 with report:
193 # Inform user on stderr of what happened
203 # Inform user on stderr of what happened
194 print('\n'+'*'*70+'\n', file=sys.stderr)
204 print('\n'+'*'*70+'\n', file=sys.stderr)
195 print(self.message_template.format(**self.info), file=sys.stderr)
205 print(self.message_template.format(**self.info), file=sys.stderr)
196
206
197 # Construct report on disk
207 # Construct report on disk
198 report.write(self.make_report(traceback))
208 report.write(self.make_report(str(traceback)))
199
209
200 input("Hit <Enter> to quit (your terminal may close):")
210 builtin_mod.input("Hit <Enter> to quit (your terminal may close):")
201
211
202 def make_report(self,traceback):
212 def make_report(self, traceback: str) -> str:
203 """Return a string containing a crash report."""
213 """Return a string containing a crash report."""
204
214
205 sec_sep = self.section_sep
215 sec_sep = self.section_sep
206
216
207 report = ['*'*75+'\n\n'+'IPython post-mortem report\n\n']
217 report = ['*'*75+'\n\n'+'IPython post-mortem report\n\n']
208 rpt_add = report.append
218 rpt_add = report.append
209 rpt_add(sys_info())
219 rpt_add(sys_info())
210
220
211 try:
221 try:
212 config = pformat(self.app.config)
222 config = pformat(self.app.config)
213 rpt_add(sec_sep)
223 rpt_add(sec_sep)
214 rpt_add('Application name: %s\n\n' % self.app_name)
224 rpt_add("Application name: %s\n\n" % self.app.name)
215 rpt_add('Current user configuration structure:\n\n')
225 rpt_add("Current user configuration structure:\n\n")
216 rpt_add(config)
226 rpt_add(config)
217 except:
227 except:
218 pass
228 pass
219 rpt_add(sec_sep+'Crash traceback:\n\n' + traceback)
229 rpt_add(sec_sep+'Crash traceback:\n\n' + traceback)
220
230
221 return ''.join(report)
231 return ''.join(report)
222
232
223
233
224 def crash_handler_lite(etype, evalue, tb):
234 def crash_handler_lite(
235 etype: type[BaseException], evalue: BaseException, tb: types.TracebackType
236 ) -> None:
225 """a light excepthook, adding a small message to the usual traceback"""
237 """a light excepthook, adding a small message to the usual traceback"""
226 traceback.print_exception(etype, evalue, tb)
238 traceback.print_exception(etype, evalue, tb)
227
239
228 from IPython.core.interactiveshell import InteractiveShell
240 from IPython.core.interactiveshell import InteractiveShell
229 if InteractiveShell.initialized():
241 if InteractiveShell.initialized():
230 # we are in a Shell environment, give %magic example
242 # we are in a Shell environment, give %magic example
231 config = "%config "
243 config = "%config "
232 else:
244 else:
233 # we are not in a shell, show generic config
245 # we are not in a shell, show generic config
234 config = "c."
246 config = "c."
235 print(_lite_message_template.format(email=author_email, config=config, version=version), file=sys.stderr)
247 print(_lite_message_template.format(email=author_email, config=config, version=version), file=sys.stderr)
236
248
@@ -1,143 +1,143
1 # encoding: utf-8
1 # encoding: utf-8
2 """
2 """
3 Utilities for getting information about IPython and the system it's running in.
3 Utilities for getting information about IPython and the system it's running in.
4 """
4 """
5
5
6 #-----------------------------------------------------------------------------
6 #-----------------------------------------------------------------------------
7 # Copyright (C) 2008-2011 The IPython Development Team
7 # Copyright (C) 2008-2011 The IPython Development Team
8 #
8 #
9 # Distributed under the terms of the BSD License. The full license is in
9 # Distributed under the terms of the BSD License. The full license is in
10 # the file COPYING, distributed as part of this software.
10 # the file COPYING, distributed as part of this software.
11 #-----------------------------------------------------------------------------
11 #-----------------------------------------------------------------------------
12
12
13 #-----------------------------------------------------------------------------
13 #-----------------------------------------------------------------------------
14 # Imports
14 # Imports
15 #-----------------------------------------------------------------------------
15 #-----------------------------------------------------------------------------
16
16
17 import os
17 import os
18 import platform
18 import platform
19 import pprint
19 import pprint
20 import sys
20 import sys
21 import subprocess
21 import subprocess
22
22
23 from pathlib import Path
23 from pathlib import Path
24
24
25 from IPython.core import release
25 from IPython.core import release
26 from IPython.utils import _sysinfo, encoding
26 from IPython.utils import _sysinfo, encoding
27
27
28 #-----------------------------------------------------------------------------
28 #-----------------------------------------------------------------------------
29 # Code
29 # Code
30 #-----------------------------------------------------------------------------
30 #-----------------------------------------------------------------------------
31
31
32 def pkg_commit_hash(pkg_path: str) -> tuple[str, str]:
32 def pkg_commit_hash(pkg_path: str) -> tuple[str, str]:
33 """Get short form of commit hash given directory `pkg_path`
33 """Get short form of commit hash given directory `pkg_path`
34
34
35 We get the commit hash from (in order of preference):
35 We get the commit hash from (in order of preference):
36
36
37 * IPython.utils._sysinfo.commit
37 * IPython.utils._sysinfo.commit
38 * git output, if we are in a git repository
38 * git output, if we are in a git repository
39
39
40 If these fail, we return a not-found placeholder tuple
40 If these fail, we return a not-found placeholder tuple
41
41
42 Parameters
42 Parameters
43 ----------
43 ----------
44 pkg_path : str
44 pkg_path : str
45 directory containing package
45 directory containing package
46 only used for getting commit from active repo
46 only used for getting commit from active repo
47
47
48 Returns
48 Returns
49 -------
49 -------
50 hash_from : str
50 hash_from : str
51 Where we got the hash from - description
51 Where we got the hash from - description
52 hash_str : str
52 hash_str : str
53 short form of hash
53 short form of hash
54 """
54 """
55 # Try and get commit from written commit text file
55 # Try and get commit from written commit text file
56 if _sysinfo.commit:
56 if _sysinfo.commit:
57 return "installation", _sysinfo.commit
57 return "installation", _sysinfo.commit
58
58
59 # maybe we are in a repository
59 # maybe we are in a repository
60 proc = subprocess.Popen('git rev-parse --short HEAD'.split(' '),
60 proc = subprocess.Popen('git rev-parse --short HEAD'.split(' '),
61 stdout=subprocess.PIPE,
61 stdout=subprocess.PIPE,
62 stderr=subprocess.PIPE,
62 stderr=subprocess.PIPE,
63 cwd=pkg_path)
63 cwd=pkg_path)
64 repo_commit, _ = proc.communicate()
64 repo_commit, _ = proc.communicate()
65 if repo_commit:
65 if repo_commit:
66 return 'repository', repo_commit.strip().decode('ascii')
66 return 'repository', repo_commit.strip().decode('ascii')
67 return '(none found)', '<not found>'
67 return '(none found)', '<not found>'
68
68
69
69
70 def pkg_info(pkg_path: str) -> dict:
70 def pkg_info(pkg_path: str) -> dict:
71 """Return dict describing the context of this package
71 """Return dict describing the context of this package
72
72
73 Parameters
73 Parameters
74 ----------
74 ----------
75 pkg_path : str
75 pkg_path : str
76 path containing __init__.py for package
76 path containing __init__.py for package
77
77
78 Returns
78 Returns
79 -------
79 -------
80 context : dict
80 context : dict
81 with named parameters of interest
81 with named parameters of interest
82 """
82 """
83 src, hsh = pkg_commit_hash(pkg_path)
83 src, hsh = pkg_commit_hash(pkg_path)
84 return dict(
84 return dict(
85 ipython_version=release.version,
85 ipython_version=release.version,
86 ipython_path=pkg_path,
86 ipython_path=pkg_path,
87 commit_source=src,
87 commit_source=src,
88 commit_hash=hsh,
88 commit_hash=hsh,
89 sys_version=sys.version,
89 sys_version=sys.version,
90 sys_executable=sys.executable,
90 sys_executable=sys.executable,
91 sys_platform=sys.platform,
91 sys_platform=sys.platform,
92 platform=platform.platform(),
92 platform=platform.platform(),
93 os_name=os.name,
93 os_name=os.name,
94 default_encoding=encoding.DEFAULT_ENCODING,
94 default_encoding=encoding.DEFAULT_ENCODING,
95 )
95 )
96
96
97 def get_sys_info() -> dict:
97 def get_sys_info() -> dict:
98 """Return useful information about IPython and the system, as a dict."""
98 """Return useful information about IPython and the system, as a dict."""
99 path = Path(__file__, "..").resolve().parent
99 path = Path(__file__, "..").resolve().parent
100 return pkg_info(str(path))
100 return pkg_info(str(path))
101
101
102 def sys_info():
102 def sys_info() -> str:
103 """Return useful information about IPython and the system, as a string.
103 """Return useful information about IPython and the system, as a string.
104
104
105 Examples
105 Examples
106 --------
106 --------
107 ::
107 ::
108
108
109 In [2]: print(sys_info())
109 In [2]: print(sys_info())
110 {'commit_hash': '144fdae', # random
110 {'commit_hash': '144fdae', # random
111 'commit_source': 'repository',
111 'commit_source': 'repository',
112 'ipython_path': '/home/fperez/usr/lib/python2.6/site-packages/IPython',
112 'ipython_path': '/home/fperez/usr/lib/python2.6/site-packages/IPython',
113 'ipython_version': '0.11.dev',
113 'ipython_version': '0.11.dev',
114 'os_name': 'posix',
114 'os_name': 'posix',
115 'platform': 'Linux-2.6.35-22-generic-i686-with-Ubuntu-10.10-maverick',
115 'platform': 'Linux-2.6.35-22-generic-i686-with-Ubuntu-10.10-maverick',
116 'sys_executable': '/usr/bin/python',
116 'sys_executable': '/usr/bin/python',
117 'sys_platform': 'linux2',
117 'sys_platform': 'linux2',
118 'sys_version': '2.6.6 (r266:84292, Sep 15 2010, 15:52:39) \\n[GCC 4.4.5]'}
118 'sys_version': '2.6.6 (r266:84292, Sep 15 2010, 15:52:39) \\n[GCC 4.4.5]'}
119 """
119 """
120 return pprint.pformat(get_sys_info())
120 return pprint.pformat(get_sys_info())
121
121
122
122
123 def num_cpus():
123 def num_cpus():
124 """DEPRECATED
124 """DEPRECATED
125
125
126 Return the effective number of CPUs in the system as an integer.
126 Return the effective number of CPUs in the system as an integer.
127
127
128 This cross-platform function makes an attempt at finding the total number of
128 This cross-platform function makes an attempt at finding the total number of
129 available CPUs in the system, as returned by various underlying system and
129 available CPUs in the system, as returned by various underlying system and
130 python calls.
130 python calls.
131
131
132 If it can't find a sensible answer, it returns 1 (though an error *may* make
132 If it can't find a sensible answer, it returns 1 (though an error *may* make
133 it return a large positive number that's actually incorrect).
133 it return a large positive number that's actually incorrect).
134 """
134 """
135 import warnings
135 import warnings
136
136
137 warnings.warn(
137 warnings.warn(
138 "`num_cpus` is deprecated since IPython 8.0. Use `os.cpu_count` instead.",
138 "`num_cpus` is deprecated since IPython 8.0. Use `os.cpu_count` instead.",
139 DeprecationWarning,
139 DeprecationWarning,
140 stacklevel=2,
140 stacklevel=2,
141 )
141 )
142
142
143 return os.cpu_count() or 1
143 return os.cpu_count() or 1
@@ -1,385 +1,397
1 [build-system]
1 [build-system]
2 requires = ["setuptools>=61.2"]
2 requires = ["setuptools>=61.2"]
3 # We need access to the 'setupbase' module at build time.
3 # We need access to the 'setupbase' module at build time.
4 # Hence we declare a custom build backend.
4 # Hence we declare a custom build backend.
5 build-backend = "_build_meta" # just re-exports setuptools.build_meta definitions
5 build-backend = "_build_meta" # just re-exports setuptools.build_meta definitions
6 backend-path = ["."]
6 backend-path = ["."]
7
7
8 [project]
8 [project]
9 name = "ipython"
9 name = "ipython"
10 description = "IPython: Productive Interactive Computing"
10 description = "IPython: Productive Interactive Computing"
11 keywords = ["Interactive", "Interpreter", "Shell", "Embedding"]
11 keywords = ["Interactive", "Interpreter", "Shell", "Embedding"]
12 classifiers = [
12 classifiers = [
13 "Framework :: IPython",
13 "Framework :: IPython",
14 "Framework :: Jupyter",
14 "Framework :: Jupyter",
15 "Intended Audience :: Developers",
15 "Intended Audience :: Developers",
16 "Intended Audience :: Science/Research",
16 "Intended Audience :: Science/Research",
17 "License :: OSI Approved :: BSD License",
17 "License :: OSI Approved :: BSD License",
18 "Programming Language :: Python",
18 "Programming Language :: Python",
19 "Programming Language :: Python :: 3",
19 "Programming Language :: Python :: 3",
20 "Programming Language :: Python :: 3 :: Only",
20 "Programming Language :: Python :: 3 :: Only",
21 "Topic :: System :: Shells",
21 "Topic :: System :: Shells",
22 ]
22 ]
23 requires-python = ">=3.10"
23 requires-python = ">=3.10"
24 dependencies = [
24 dependencies = [
25 'colorama; sys_platform == "win32"',
25 'colorama; sys_platform == "win32"',
26 "decorator",
26 "decorator",
27 "exceptiongroup; python_version<'3.11'",
27 "exceptiongroup; python_version<'3.11'",
28 "jedi>=0.16",
28 "jedi>=0.16",
29 "matplotlib-inline",
29 "matplotlib-inline",
30 'pexpect>4.3; sys_platform != "win32" and sys_platform != "emscripten"',
30 'pexpect>4.3; sys_platform != "win32" and sys_platform != "emscripten"',
31 "prompt_toolkit>=3.0.41,<3.1.0",
31 "prompt_toolkit>=3.0.41,<3.1.0",
32 "pygments>=2.4.0",
32 "pygments>=2.4.0",
33 "stack_data",
33 "stack_data",
34 "traitlets>=5.13.0",
34 "traitlets>=5.13.0",
35 "typing_extensions>=4.6; python_version<'3.12'",
35 "typing_extensions>=4.6; python_version<'3.12'",
36 ]
36 ]
37 dynamic = ["authors", "license", "version"]
37 dynamic = ["authors", "license", "version"]
38
38
39 [project.entry-points."pygments.lexers"]
39 [project.entry-points."pygments.lexers"]
40 ipythonconsole = "IPython.lib.lexers:IPythonConsoleLexer"
40 ipythonconsole = "IPython.lib.lexers:IPythonConsoleLexer"
41 ipython = "IPython.lib.lexers:IPythonLexer"
41 ipython = "IPython.lib.lexers:IPythonLexer"
42 ipython3 = "IPython.lib.lexers:IPython3Lexer"
42 ipython3 = "IPython.lib.lexers:IPython3Lexer"
43
43
44 [project.scripts]
44 [project.scripts]
45 ipython = "IPython:start_ipython"
45 ipython = "IPython:start_ipython"
46 ipython3 = "IPython:start_ipython"
46 ipython3 = "IPython:start_ipython"
47
47
48 [project.readme]
48 [project.readme]
49 file = "long_description.rst"
49 file = "long_description.rst"
50 content-type = "text/x-rst"
50 content-type = "text/x-rst"
51
51
52 [project.urls]
52 [project.urls]
53 Homepage = "https://ipython.org"
53 Homepage = "https://ipython.org"
54 Documentation = "https://ipython.readthedocs.io/"
54 Documentation = "https://ipython.readthedocs.io/"
55 Funding = "https://numfocus.org/"
55 Funding = "https://numfocus.org/"
56 Source = "https://github.com/ipython/ipython"
56 Source = "https://github.com/ipython/ipython"
57 Tracker = "https://github.com/ipython/ipython/issues"
57 Tracker = "https://github.com/ipython/ipython/issues"
58
58
59 [project.optional-dependencies]
59 [project.optional-dependencies]
60 black = [
60 black = [
61 "black",
61 "black",
62 ]
62 ]
63 doc = [
63 doc = [
64 "docrepr",
64 "docrepr",
65 "exceptiongroup",
65 "exceptiongroup",
66 "intersphinx_registry",
66 "intersphinx_registry",
67 "ipykernel",
67 "ipykernel",
68 "ipython[test]",
68 "ipython[test]",
69 "matplotlib",
69 "matplotlib",
70 "setuptools>=18.5",
70 "setuptools>=18.5",
71 "sphinx-rtd-theme",
71 "sphinx-rtd-theme",
72 "sphinx>=1.3",
72 "sphinx>=1.3",
73 "sphinxcontrib-jquery",
73 "sphinxcontrib-jquery",
74 "tomli ; python_version<'3.11'",
74 "tomli ; python_version<'3.11'",
75 "typing_extensions",
75 "typing_extensions",
76 ]
76 ]
77 kernel = [
77 kernel = [
78 "ipykernel",
78 "ipykernel",
79 ]
79 ]
80 nbconvert = [
80 nbconvert = [
81 "nbconvert",
81 "nbconvert",
82 ]
82 ]
83 nbformat = [
83 nbformat = [
84 "nbformat",
84 "nbformat",
85 ]
85 ]
86 notebook = [
86 notebook = [
87 "ipywidgets",
87 "ipywidgets",
88 "notebook",
88 "notebook",
89 ]
89 ]
90 parallel = [
90 parallel = [
91 "ipyparallel",
91 "ipyparallel",
92 ]
92 ]
93 qtconsole = [
93 qtconsole = [
94 "qtconsole",
94 "qtconsole",
95 ]
95 ]
96 terminal = []
96 terminal = []
97 test = [
97 test = [
98 "pytest",
98 "pytest",
99 "pytest-asyncio<0.22",
99 "pytest-asyncio<0.22",
100 "testpath",
100 "testpath",
101 "pickleshare",
101 "pickleshare",
102 "packaging",
102 "packaging",
103 ]
103 ]
104 test_extra = [
104 test_extra = [
105 "ipython[test]",
105 "ipython[test]",
106 "curio",
106 "curio",
107 "matplotlib!=3.2.0",
107 "matplotlib!=3.2.0",
108 "nbformat",
108 "nbformat",
109 "numpy>=1.23",
109 "numpy>=1.23",
110 "pandas",
110 "pandas",
111 "trio",
111 "trio",
112 ]
112 ]
113 matplotlib = [
113 matplotlib = [
114 "matplotlib"
114 "matplotlib"
115 ]
115 ]
116 all = [
116 all = [
117 "ipython[black,doc,kernel,nbconvert,nbformat,notebook,parallel,qtconsole,matplotlib]",
117 "ipython[black,doc,kernel,nbconvert,nbformat,notebook,parallel,qtconsole,matplotlib]",
118 "ipython[test,test_extra]",
118 "ipython[test,test_extra]",
119 ]
119 ]
120
120
121 [tool.mypy]
121 [tool.mypy]
122 python_version = "3.10"
122 python_version = "3.10"
123 ignore_missing_imports = true
123 ignore_missing_imports = true
124 follow_imports = 'silent'
124 follow_imports = 'silent'
125 exclude = [
125 exclude = [
126 'test_\.+\.py',
126 'test_\.+\.py',
127 'IPython.utils.tests.test_wildcard',
127 'IPython.utils.tests.test_wildcard',
128 'testing',
128 'testing',
129 'tests',
129 'tests',
130 'PyColorize.py',
130 'PyColorize.py',
131 '_process_win32_controller.py',
131 '_process_win32_controller.py',
132 'IPython/core/application.py',
132 'IPython/core/application.py',
133 'IPython/core/profileapp.py',
133 'IPython/core/profileapp.py',
134 'IPython/lib/deepreload.py',
134 'IPython/lib/deepreload.py',
135 'IPython/sphinxext/ipython_directive.py',
135 'IPython/sphinxext/ipython_directive.py',
136 'IPython/terminal/ipapp.py',
136 'IPython/terminal/ipapp.py',
137 'IPython/utils/_process_win32.py',
137 'IPython/utils/_process_win32.py',
138 'IPython/utils/path.py',
138 'IPython/utils/path.py',
139 ]
139 ]
140 disallow_untyped_defs = true
140 # check_untyped_defs = true
141 # disallow_untyped_calls = true
142 # disallow_untyped_decorators = true
141 # ignore_errors = false
143 # ignore_errors = false
142 # ignore_missing_imports = false
144 # ignore_missing_imports = false
143 # disallow_untyped_calls = true
144 disallow_incomplete_defs = true
145 disallow_incomplete_defs = true
145 # check_untyped_defs = true
146 disallow_untyped_defs = true
146 # disallow_untyped_decorators = true
147 warn_redundant_casts = true
147 warn_redundant_casts = true
148
148
149 [[tool.mypy.overrides]]
149 [[tool.mypy.overrides]]
150 module = [
150 module = [
151 "IPython.core.crashhandler",
152 ]
153 check_untyped_defs = true
154 disallow_incomplete_defs = true
155 disallow_untyped_calls = true
156 disallow_untyped_decorators = true
157 disallow_untyped_defs = true
158 ignore_errors = false
159 ignore_missing_imports = false
160
161 [[tool.mypy.overrides]]
162 module = [
151 "IPython.utils.text",
163 "IPython.utils.text",
152 ]
164 ]
153 disallow_untyped_defs = true
165 disallow_untyped_defs = true
154 check_untyped_defs = false
166 check_untyped_defs = false
155 disallow_untyped_decorators = true
167 disallow_untyped_decorators = true
156
168
157 [[tool.mypy.overrides]]
169 [[tool.mypy.overrides]]
158 module = [
170 module = [
159 ]
171 ]
160 disallow_untyped_defs = false
172 disallow_untyped_defs = false
161 ignore_errors = true
173 ignore_errors = true
162 ignore_missing_imports = true
174 ignore_missing_imports = true
163 disallow_untyped_calls = false
175 disallow_untyped_calls = false
164 disallow_incomplete_defs = false
176 disallow_incomplete_defs = false
165 check_untyped_defs = false
177 check_untyped_defs = false
166 disallow_untyped_decorators = false
178 disallow_untyped_decorators = false
167
179
180
168 # gloabl ignore error
181 # gloabl ignore error
169 [[tool.mypy.overrides]]
182 [[tool.mypy.overrides]]
170 module = [
183 module = [
171 "IPython",
184 "IPython",
172 "IPython.conftest",
185 "IPython.conftest",
173 "IPython.core.alias",
186 "IPython.core.alias",
174 "IPython.core.async_helpers",
187 "IPython.core.async_helpers",
175 "IPython.core.autocall",
188 "IPython.core.autocall",
176 "IPython.core.builtin_trap",
189 "IPython.core.builtin_trap",
177 "IPython.core.compilerop",
190 "IPython.core.compilerop",
178 "IPython.core.completer",
191 "IPython.core.completer",
179 "IPython.core.completerlib",
192 "IPython.core.completerlib",
180 "IPython.core.crashhandler",
181 "IPython.core.debugger",
193 "IPython.core.debugger",
182 "IPython.core.display",
194 "IPython.core.display",
183 "IPython.core.display_functions",
195 "IPython.core.display_functions",
184 "IPython.core.display_trap",
196 "IPython.core.display_trap",
185 "IPython.core.displayhook",
197 "IPython.core.displayhook",
186 "IPython.core.displaypub",
198 "IPython.core.displaypub",
187 "IPython.core.events",
199 "IPython.core.events",
188 "IPython.core.excolors",
200 "IPython.core.excolors",
189 "IPython.core.extensions",
201 "IPython.core.extensions",
190 "IPython.core.formatters",
202 "IPython.core.formatters",
191 "IPython.core.getipython",
203 "IPython.core.getipython",
192 "IPython.core.guarded_eval",
204 "IPython.core.guarded_eval",
193 "IPython.core.history",
205 "IPython.core.history",
194 "IPython.core.historyapp",
206 "IPython.core.historyapp",
195 "IPython.core.hooks",
207 "IPython.core.hooks",
196 "IPython.core.inputsplitter",
208 "IPython.core.inputsplitter",
197 "IPython.core.inputtransformer",
209 "IPython.core.inputtransformer",
198 "IPython.core.inputtransformer2",
210 "IPython.core.inputtransformer2",
199 "IPython.core.interactiveshell",
211 "IPython.core.interactiveshell",
200 "IPython.core.logger",
212 "IPython.core.logger",
201 "IPython.core.macro",
213 "IPython.core.macro",
202 "IPython.core.magic",
214 "IPython.core.magic",
203 "IPython.core.magic_arguments",
215 "IPython.core.magic_arguments",
204 "IPython.core.magics.ast_mod",
216 "IPython.core.magics.ast_mod",
205 "IPython.core.magics.auto",
217 "IPython.core.magics.auto",
206 "IPython.core.magics.basic",
218 "IPython.core.magics.basic",
207 "IPython.core.magics.code",
219 "IPython.core.magics.code",
208 "IPython.core.magics.config",
220 "IPython.core.magics.config",
209 "IPython.core.magics.display",
221 "IPython.core.magics.display",
210 "IPython.core.magics.execution",
222 "IPython.core.magics.execution",
211 "IPython.core.magics.extension",
223 "IPython.core.magics.extension",
212 "IPython.core.magics.history",
224 "IPython.core.magics.history",
213 "IPython.core.magics.logging",
225 "IPython.core.magics.logging",
214 "IPython.core.magics.namespace",
226 "IPython.core.magics.namespace",
215 "IPython.core.magics.osm",
227 "IPython.core.magics.osm",
216 "IPython.core.magics.packaging",
228 "IPython.core.magics.packaging",
217 "IPython.core.magics.pylab",
229 "IPython.core.magics.pylab",
218 "IPython.core.magics.script",
230 "IPython.core.magics.script",
219 "IPython.core.oinspect",
231 "IPython.core.oinspect",
220 "IPython.core.page",
232 "IPython.core.page",
221 "IPython.core.payload",
233 "IPython.core.payload",
222 "IPython.core.payloadpage",
234 "IPython.core.payloadpage",
223 "IPython.core.prefilter",
235 "IPython.core.prefilter",
224 "IPython.core.profiledir",
236 "IPython.core.profiledir",
225 "IPython.core.prompts",
237 "IPython.core.prompts",
226 "IPython.core.pylabtools",
238 "IPython.core.pylabtools",
227 "IPython.core.shellapp",
239 "IPython.core.shellapp",
228 "IPython.core.splitinput",
240 "IPython.core.splitinput",
229 "IPython.core.ultratb",
241 "IPython.core.ultratb",
230 "IPython.extensions.autoreload",
242 "IPython.extensions.autoreload",
231 "IPython.extensions.storemagic",
243 "IPython.extensions.storemagic",
232 "IPython.external.qt_for_kernel",
244 "IPython.external.qt_for_kernel",
233 "IPython.external.qt_loaders",
245 "IPython.external.qt_loaders",
234 "IPython.lib.backgroundjobs",
246 "IPython.lib.backgroundjobs",
235 "IPython.lib.clipboard",
247 "IPython.lib.clipboard",
236 "IPython.lib.demo",
248 "IPython.lib.demo",
237 "IPython.lib.display",
249 "IPython.lib.display",
238 "IPython.lib.editorhooks",
250 "IPython.lib.editorhooks",
239 "IPython.lib.guisupport",
251 "IPython.lib.guisupport",
240 "IPython.lib.latextools",
252 "IPython.lib.latextools",
241 "IPython.lib.lexers",
253 "IPython.lib.lexers",
242 "IPython.lib.pretty",
254 "IPython.lib.pretty",
243 "IPython.paths",
255 "IPython.paths",
244 "IPython.sphinxext.ipython_console_highlighting",
256 "IPython.sphinxext.ipython_console_highlighting",
245 "IPython.terminal.debugger",
257 "IPython.terminal.debugger",
246 "IPython.terminal.embed",
258 "IPython.terminal.embed",
247 "IPython.terminal.interactiveshell",
259 "IPython.terminal.interactiveshell",
248 "IPython.terminal.magics",
260 "IPython.terminal.magics",
249 "IPython.terminal.prompts",
261 "IPython.terminal.prompts",
250 "IPython.terminal.pt_inputhooks",
262 "IPython.terminal.pt_inputhooks",
251 "IPython.terminal.pt_inputhooks.asyncio",
263 "IPython.terminal.pt_inputhooks.asyncio",
252 "IPython.terminal.pt_inputhooks.glut",
264 "IPython.terminal.pt_inputhooks.glut",
253 "IPython.terminal.pt_inputhooks.gtk",
265 "IPython.terminal.pt_inputhooks.gtk",
254 "IPython.terminal.pt_inputhooks.gtk3",
266 "IPython.terminal.pt_inputhooks.gtk3",
255 "IPython.terminal.pt_inputhooks.gtk4",
267 "IPython.terminal.pt_inputhooks.gtk4",
256 "IPython.terminal.pt_inputhooks.osx",
268 "IPython.terminal.pt_inputhooks.osx",
257 "IPython.terminal.pt_inputhooks.pyglet",
269 "IPython.terminal.pt_inputhooks.pyglet",
258 "IPython.terminal.pt_inputhooks.qt",
270 "IPython.terminal.pt_inputhooks.qt",
259 "IPython.terminal.pt_inputhooks.tk",
271 "IPython.terminal.pt_inputhooks.tk",
260 "IPython.terminal.pt_inputhooks.wx",
272 "IPython.terminal.pt_inputhooks.wx",
261 "IPython.terminal.ptutils",
273 "IPython.terminal.ptutils",
262 "IPython.terminal.shortcuts",
274 "IPython.terminal.shortcuts",
263 "IPython.terminal.shortcuts.auto_match",
275 "IPython.terminal.shortcuts.auto_match",
264 "IPython.terminal.shortcuts.auto_suggest",
276 "IPython.terminal.shortcuts.auto_suggest",
265 "IPython.terminal.shortcuts.filters",
277 "IPython.terminal.shortcuts.filters",
266 "IPython.utils._process_cli",
278 "IPython.utils._process_cli",
267 "IPython.utils._process_common",
279 "IPython.utils._process_common",
268 "IPython.utils._process_emscripten",
280 "IPython.utils._process_emscripten",
269 "IPython.utils._process_posix",
281 "IPython.utils._process_posix",
270 "IPython.utils.capture",
282 "IPython.utils.capture",
271 "IPython.utils.coloransi",
283 "IPython.utils.coloransi",
272 "IPython.utils.contexts",
284 "IPython.utils.contexts",
273 "IPython.utils.data",
285 "IPython.utils.data",
274 "IPython.utils.decorators",
286 "IPython.utils.decorators",
275 "IPython.utils.dir2",
287 "IPython.utils.dir2",
276 "IPython.utils.encoding",
288 "IPython.utils.encoding",
277 "IPython.utils.frame",
289 "IPython.utils.frame",
278 "IPython.utils.generics",
290 "IPython.utils.generics",
279 "IPython.utils.importstring",
291 "IPython.utils.importstring",
280 "IPython.utils.io",
292 "IPython.utils.io",
281 "IPython.utils.ipstruct",
293 "IPython.utils.ipstruct",
282 "IPython.utils.module_paths",
294 "IPython.utils.module_paths",
283 "IPython.utils.openpy",
295 "IPython.utils.openpy",
284 "IPython.utils.process",
296 "IPython.utils.process",
285 "IPython.utils.py3compat",
297 "IPython.utils.py3compat",
286 "IPython.utils.sentinel",
298 "IPython.utils.sentinel",
287 "IPython.utils.shimmodule",
299 "IPython.utils.shimmodule",
288 "IPython.utils.strdispatch",
300 "IPython.utils.strdispatch",
289 "IPython.utils.sysinfo",
301 "IPython.utils.sysinfo",
290 "IPython.utils.syspathcontext",
302 "IPython.utils.syspathcontext",
291 "IPython.utils.tempdir",
303 "IPython.utils.tempdir",
292 "IPython.utils.terminal",
304 "IPython.utils.terminal",
293 "IPython.utils.timing",
305 "IPython.utils.timing",
294 "IPython.utils.tokenutil",
306 "IPython.utils.tokenutil",
295 "IPython.utils.tz",
307 "IPython.utils.tz",
296 "IPython.utils.ulinecache",
308 "IPython.utils.ulinecache",
297 "IPython.utils.version",
309 "IPython.utils.version",
298 "IPython.utils.wildcard",
310 "IPython.utils.wildcard",
299
311
300 ]
312 ]
301 disallow_untyped_defs = false
313 disallow_untyped_defs = false
302 ignore_errors = true
314 ignore_errors = true
303 ignore_missing_imports = true
315 ignore_missing_imports = true
304 disallow_untyped_calls = false
316 disallow_untyped_calls = false
305 disallow_incomplete_defs = false
317 disallow_incomplete_defs = false
306 check_untyped_defs = false
318 check_untyped_defs = false
307 disallow_untyped_decorators = false
319 disallow_untyped_decorators = false
308
320
309 [tool.pytest.ini_options]
321 [tool.pytest.ini_options]
310 addopts = [
322 addopts = [
311 "--durations=10",
323 "--durations=10",
312 "-pIPython.testing.plugin.pytest_ipdoctest",
324 "-pIPython.testing.plugin.pytest_ipdoctest",
313 "--ipdoctest-modules",
325 "--ipdoctest-modules",
314 "--ignore=docs",
326 "--ignore=docs",
315 "--ignore=examples",
327 "--ignore=examples",
316 "--ignore=htmlcov",
328 "--ignore=htmlcov",
317 "--ignore=ipython_kernel",
329 "--ignore=ipython_kernel",
318 "--ignore=ipython_parallel",
330 "--ignore=ipython_parallel",
319 "--ignore=results",
331 "--ignore=results",
320 "--ignore=tmp",
332 "--ignore=tmp",
321 "--ignore=tools",
333 "--ignore=tools",
322 "--ignore=traitlets",
334 "--ignore=traitlets",
323 "--ignore=IPython/core/tests/daft_extension",
335 "--ignore=IPython/core/tests/daft_extension",
324 "--ignore=IPython/sphinxext",
336 "--ignore=IPython/sphinxext",
325 "--ignore=IPython/terminal/pt_inputhooks",
337 "--ignore=IPython/terminal/pt_inputhooks",
326 "--ignore=IPython/__main__.py",
338 "--ignore=IPython/__main__.py",
327 "--ignore=IPython/external/qt_for_kernel.py",
339 "--ignore=IPython/external/qt_for_kernel.py",
328 "--ignore=IPython/html/widgets/widget_link.py",
340 "--ignore=IPython/html/widgets/widget_link.py",
329 "--ignore=IPython/html/widgets/widget_output.py",
341 "--ignore=IPython/html/widgets/widget_output.py",
330 "--ignore=IPython/terminal/console.py",
342 "--ignore=IPython/terminal/console.py",
331 "--ignore=IPython/utils/_process_cli.py",
343 "--ignore=IPython/utils/_process_cli.py",
332 "--ignore=IPython/utils/_process_posix.py",
344 "--ignore=IPython/utils/_process_posix.py",
333 "--ignore=IPython/utils/_process_win32.py",
345 "--ignore=IPython/utils/_process_win32.py",
334 "--ignore=IPython/utils/_process_win32_controller.py",
346 "--ignore=IPython/utils/_process_win32_controller.py",
335 "--ignore=IPython/utils/daemonize.py",
347 "--ignore=IPython/utils/daemonize.py",
336 "--ignore=IPython/utils/eventful.py",
348 "--ignore=IPython/utils/eventful.py",
337 "--ignore=IPython/kernel",
349 "--ignore=IPython/kernel",
338 "--ignore=IPython/consoleapp.py",
350 "--ignore=IPython/consoleapp.py",
339 "--ignore=IPython/core/inputsplitter.py",
351 "--ignore=IPython/core/inputsplitter.py",
340 "--ignore=IPython/lib/kernel.py",
352 "--ignore=IPython/lib/kernel.py",
341 "--ignore=IPython/utils/jsonutil.py",
353 "--ignore=IPython/utils/jsonutil.py",
342 "--ignore=IPython/utils/localinterfaces.py",
354 "--ignore=IPython/utils/localinterfaces.py",
343 "--ignore=IPython/utils/log.py",
355 "--ignore=IPython/utils/log.py",
344 "--ignore=IPython/utils/signatures.py",
356 "--ignore=IPython/utils/signatures.py",
345 "--ignore=IPython/utils/traitlets.py",
357 "--ignore=IPython/utils/traitlets.py",
346 "--ignore=IPython/utils/version.py"
358 "--ignore=IPython/utils/version.py"
347 ]
359 ]
348 doctest_optionflags = [
360 doctest_optionflags = [
349 "NORMALIZE_WHITESPACE",
361 "NORMALIZE_WHITESPACE",
350 "ELLIPSIS"
362 "ELLIPSIS"
351 ]
363 ]
352 ipdoctest_optionflags = [
364 ipdoctest_optionflags = [
353 "NORMALIZE_WHITESPACE",
365 "NORMALIZE_WHITESPACE",
354 "ELLIPSIS"
366 "ELLIPSIS"
355 ]
367 ]
356 asyncio_mode = "strict"
368 asyncio_mode = "strict"
357
369
358 [tool.pyright]
370 [tool.pyright]
359 pythonPlatform="All"
371 pythonPlatform="All"
360
372
361 [tool.setuptools]
373 [tool.setuptools]
362 zip-safe = false
374 zip-safe = false
363 platforms = ["Linux", "Mac OSX", "Windows"]
375 platforms = ["Linux", "Mac OSX", "Windows"]
364 license-files = ["LICENSE"]
376 license-files = ["LICENSE"]
365 include-package-data = false
377 include-package-data = false
366
378
367 [tool.setuptools.packages.find]
379 [tool.setuptools.packages.find]
368 exclude = ["setupext"]
380 exclude = ["setupext"]
369 namespaces = false
381 namespaces = false
370
382
371 [tool.setuptools.package-data]
383 [tool.setuptools.package-data]
372 "IPython" = ["py.typed"]
384 "IPython" = ["py.typed"]
373 "IPython.core" = ["profile/README*"]
385 "IPython.core" = ["profile/README*"]
374 "IPython.core.tests" = ["*.png", "*.jpg", "daft_extension/*.py"]
386 "IPython.core.tests" = ["*.png", "*.jpg", "daft_extension/*.py"]
375 "IPython.lib.tests" = ["*.wav"]
387 "IPython.lib.tests" = ["*.wav"]
376 "IPython.testing.plugin" = ["*.txt"]
388 "IPython.testing.plugin" = ["*.txt"]
377
389
378 [tool.setuptools.dynamic]
390 [tool.setuptools.dynamic]
379 version = {attr = "IPython.core.release.__version__"}
391 version = {attr = "IPython.core.release.__version__"}
380
392
381 [tool.coverage.run]
393 [tool.coverage.run]
382 omit = [
394 omit = [
383 # omit everything in /tmp as we run tempfile
395 # omit everything in /tmp as we run tempfile
384 "/tmp/*",
396 "/tmp/*",
385 ]
397 ]
General Comments 0
You need to be logged in to leave comments. Login now