Brett Cannon
e7e1deef17
Issue # 17177: Stop using imp in turtledemo
2013-06-15 17:33:27 -04:00
Brett Cannon
b57a085c74
Issue #17177 : Stop using imp in zipfile
2013-06-15 17:32:30 -04:00
Brett Cannon
9529fbfd36
Issue #17177 : Stop using imp in a bunch of tests
2013-06-15 17:11:25 -04:00
Andrew Kuchling
8a2a902f88
Merge with 3.3
2013-06-15 15:10:08 -04:00
Brett Cannon
f15a59fdf3
Issue #17177 : Stop using imp in sysconfig
2013-06-15 14:32:11 -04:00
Brett Cannon
82d2107668
Issue #17177 : switch from imp.new_module to types.ModuleType for runpy
2013-06-15 14:27:21 -04:00
Brett Cannon
f4ba4ec160
Issue #17177 : Stop using imp in pydoc
2013-06-15 14:25:04 -04:00
Brett Cannon
df960682a5
Issue #17177 : Stop using imp with py_compile
2013-06-15 14:07:21 -04:00
Andrew Kuchling
53e5ea7951
#18113 : Objects associated to a curses.panel object with set_userptr() were leaked.
...
Reported by Atsuo Ishimoto.
2013-06-15 14:04:04 -04:00
Brett Cannon
cc39b1ed1d
merge w/ 3.3
2013-06-15 13:37:38 -04:00
Brett Cannon
27bbfdbc4c
Drop some dead imports of imp
2013-06-15 13:37:12 -04:00
Brett Cannon
4f4088eb6f
Issue #17177 : Stop using imp in multiprocessing
2013-06-15 13:23:01 -04:00
Brett Cannon
61c3556c14
Issue #17177 : Stop using imp in distutils
2013-06-15 12:59:53 -04:00
Brett Cannon
7822e123c4
Issue #17177 : stop using imp for compileall.
2013-06-14 23:04:02 -04:00
Brett Cannon
0b16b0d3f0
make test more robust under Windows
2013-06-14 22:50:57 -04:00
Brett Cannon
a38e81428a
Issue #18194 : Introduce importlib.util.cache_from_source() and
...
source_from_cache(), finishing the work introduced in changset
4134:9cacdb9d0c59.
2013-06-14 22:35:40 -04:00
Brett Cannon
589c4fffd2
Make it more obvious what things used in imp are snuck in through private APIs
2013-06-14 22:29:58 -04:00
Brett Cannon
a3c96154d2
Issue #17907 : touch up the code for imp.new_module().
2013-06-14 22:26:30 -04:00
Ethan Furman
6b3d64ab5d
Closes issue 17947. Adds PEP-0435 (Adding an Enum type to the Python standard library).
...
Missing files added.
News entry added.
2013-06-14 16:55:46 -07:00
Brett Cannon
05a647deed
Issue #18192 : Introduce importlib.util.MAGIC_NUMBER and document the
...
deprecation of imp.get_magic().
2013-06-14 19:02:34 -04:00
Brett Cannon
8c18da20f9
merge
2013-06-14 18:33:21 -04:00
Brett Cannon
33915eba7c
Issue #17222 : Raise FileExistsError when py_compile.compile would
...
overwrite a symlink or non-regular file with a regular file.
2013-06-14 18:33:00 -04:00
Ned Deily
7bff3cbe3d
Issue #18149 : Add filecmp.clear_cache() to manually clear the filecmp cache.
...
Patch by Mark Levitt
2013-06-14 15:19:11 -07:00
Brett Cannon
3fe35e6503
Issue #18193 : Add importlib.reload(), documenting (but not
...
implementing in code) the deprecation of imp.reload().
Thanks to Berker Peksag for the patch.
2013-06-14 15:04:26 -04:00
Brett Cannon
6f1057605b
Remove a dead import line.
...
Noticed by Serhly Storchaka.
2013-06-14 10:42:48 -04:00
Brett Cannon
58f2efb968
Move test_pep352 over to unittest.main()
2013-06-13 21:18:43 -04:00
Brett Cannon
0a140668fa
Issue #18200 : Update the stdlib (except tests) to use
...
ModuleNotFoundError.
2013-06-13 20:57:26 -04:00
Serhiy Storchaka
9702a17a6a
Issue #18048 : Merge test_pep263.py and test_coding.py into test_source_encoding.py.
2013-06-13 10:08:00 +03:00
Serhiy Storchaka
07c805d0fc
Issue #18048 : Rename test_coding.py to test_source_encoding.py.
2013-06-13 09:50:42 +03:00
Serhiy Storchaka
29f2d73068
Issue #18048 : Rename test_pep263.py to test_source_encoding.py.
2013-06-13 09:48:15 +03:00
Brett Cannon
e5b25df16d
Issue #15767 : Add an explicit test for raising ModuleNotFoundError
...
when None in sys.modules.
2013-06-12 23:38:50 -04:00
Brett Cannon
8f5ac5106e
Issue #15767 : Touch up ModuleNotFoundError usage by import.
...
Forgot to raise ModuleNotFoundError when None is found in sys.modules.
This led to introducing the C function PyErr_SetImportErrorSubclass()
to make setting ModuleNotFoundError easier.
Also updated the reference docs to mention ModuleNotFoundError
appropriately. Updated the docs for ModuleNotFoundError to mention the
None in sys.modules case.
Lastly, it was noticed that PyErr_SetImportError() was not setting an
exception when returning None in one case. That issue is now fixed.
2013-06-12 23:29:18 -04:00
Brett Cannon
3e9a9ae09d
Update various test modules to use unittest.main() for test discovery
...
instead of manually listing tests for test.support.run_unittest().
2013-06-12 21:25:59 -04:00
Brett Cannon
e382b5868a
Partially revert changeset #281857369a78 to make sure threads are
...
reaped in all situations.
2013-06-12 21:25:23 -04:00
Brett Cannon
c9a1bfed5d
Move test___all__ over to unittest.main() and use ModuleNotFoundError
2013-06-12 20:12:30 -04:00
Brett Cannon
603dcf2714
Spruce up test_xmlrpc by using ModuleNotFoundError and moving to
...
unittest.main().
2013-06-12 20:04:19 -04:00
Brett Cannon
d5b4e1d891
Move test_zipfile to unittest.main()
2013-06-12 19:57:19 -04:00
Brett Cannon
b1611e2772
Issue #15767 : Introduce ModuleNotFoundError, a subclass of
...
ImportError.
The exception is raised by import when a module could not be found.
Technically this is defined as no viable loader could be found for the
specified module. This includes ``from ... import`` statements so that
the module usage is consistent for all situations where import
couldn't find what was requested.
This should allow for the common idiom of::
try:
import something
except ImportError:
pass
to be updated to using ModuleNotFoundError and not accidentally mask
ImportError messages that should propagate (e.g. issues with a
loader).
This work was driven by the fact that the ``from ... import``
statement needed to be able to tell the difference between an
ImportError that simply couldn't find a module (and thus silence the
exception so that ceval can raise it) and an ImportError that
represented an actual problem.
2013-06-12 16:59:46 -04:00
Brett Cannon
638ce0779b
Move code from test_importhooks into test_zipimport.
2013-06-12 15:57:01 -04:00
Serhiy Storchaka
f15ffe0ee5
Add tests for issue #18183 .
2013-06-12 09:28:20 +03:00
Serhiy Storchaka
31b1c8bbde
Add tests for issue #18183 .
2013-06-12 09:20:44 +03:00
Roger Serwy
6d844c5db9
#18196 : merge with 3.3
2013-06-11 22:25:34 -05:00
Roger Serwy
f467521927
#18196 : Avoid displaying spurious SystemExit tracebacks.
2013-06-11 22:25:14 -05:00
Roger Serwy
c2efeb61b9
#5492 : merge with 3.3
2013-06-11 22:13:51 -05:00
Roger Serwy
036e84924a
#5492 : Avoid traceback when exiting IDLE caused by a race condition.
2013-06-11 22:13:17 -05:00
Brett Cannon
12d400db65
explanatory comment
2013-06-11 17:34:04 -04:00
Brett Cannon
865b2925dd
typo fix
2013-06-11 17:22:39 -04:00
Brett Cannon
68133fdcbe
Issue #18158 : delete test_importhooks. Redundant in the face of
...
test_importlib.
2013-06-11 17:12:30 -04:00
Brett Cannon
d5e6f2e200
Issue #18157 : stop using imp.load_module() in imp.
2013-06-11 17:09:36 -04:00
Roger Serwy
30b4131b41
#17511 : merge with 3.3.
2013-06-10 23:02:56 -05:00