Brett Cannon
3008bc0f4a
Issue #24492 : make sure that ``from ... import ...` raises an
ImportError if __name__ is not defined on a package.
Thanks to Armin Rigo for the bug report and diagnosing the cause.
11 years ago
Berker Peksag
ce643913a9
Issue #9517 : Move script_helper to the support package.
Patch by Christie Wilson.
11 years ago
Eric Snow
32439d6eb6
Issue #23911 : Move path-based bootstrap code to a separate frozen module.
11 years ago
Berker Peksag
30912f3db0
Issue #21483 : Skip test_timestamp_overflow on NFS.
Patch by Isaac Schwabacher.
11 years ago
Brett Cannon
f299abdafa
Issue #23731 : Implement PEP 488.
The concept of .pyo files no longer exists. Now .pyc files have an
optional `opt-` tag which specifies if any extra optimizations beyond
the peepholer were applied.
11 years ago
Antoine Pitrou
0373a106a1
Issue #17636 : Circular imports involving relative imports are now supported.
12 years ago
Victor Stinner
047b7ae566
Issue #22390 : Remove files created by tests
12 years ago
Serhiy Storchaka
344f8316fd
Issue #19593 : Use specific asserts in importlib tests.
12 years ago
Eric Snow
b523f8433a
Implement PEP 451 (ModuleSpec).
13 years ago
Brett Cannon
9e5aba29e2
remove dead import
13 years ago
Victor Stinner
e8785ff82a
Close #18754 : Run Python child processes in isolated more in the test suite.
13 years ago
Victor Stinner
ab5a58d827
test_import.test_module_with_large_stack(): unload the test module
Ensure that the module is unloaded to be able to run the test more than once,
and to not leak memory.
13 years ago
Benjamin Peterson
05ab7028ba
remove duplicate test from test_import ( closes #19122 )
13 years ago
Victor Stinner
14e461d5b9
Close #11619 : The parser and the import machinery do not encode Unicode
filenames anymore on Windows.
13 years ago
Brett Cannon
7e0a18158f
Make test_import more robust and stop using assertRaisesRegexp().
13 years ago
Brett Cannon
a79e4fb38d
Issue #18342 : Use the repr of a module name for ``from ... import
...`` when an ImportError occurs.
Other cases had already been switched over to using the repr.
Thanks to Tomasz Maćkowiak for the patch.
13 years ago
Brett Cannon
a53cca3fea
Issue #18351 : Fix various issues with
importlib._bootstrap._get_sourcefile().
Thanks to its only use by the C API, it was never properly tested
until now.
Thanks to Neal Norwitz for discovering the bug and Madison May for the patch.
13 years ago
Brett Cannon
fc4b5b9a42
Move test_import over to unittest.main().
13 years ago
Brett Cannon
679ecb565b
Issue #15767 : back out 8a0ed9f63c6e, finishing the removal of
ModuleNotFoundError.
13 years ago
Brett Cannon
e4f41deccf
Issue #17177 : The imp module is pending deprecation.
To make sure there is no issue with code that is both Python 2 and 3
compatible, there are no plans to remove the module any sooner than
Python 4 (unless the community moves to Python 3 solidly before then).
13 years ago
Brett Cannon
a3c96154d2
Issue #17907 : touch up the code for imp.new_module().
13 years ago
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.
13 years ago
Brett Cannon
997487d5d7
Issue #7732 : Move an imp.find_module test from test_import to
test_imp.
13 years ago
Benjamin Peterson
7d110042c5
raise an ImportError (rather than fatal) when __import__ is not found in __builtins__ ( closes #17867 )
13 years ago
Nick Coghlan
f1465f0535
Close #17731 : Clean up properly in test_import
13 years ago
Ezio Melotti
e015b6b1fc
#11420 : make test suite pass with -B/DONTWRITEBYTECODE set. Initial patch by Thomas Wouters.
13 years ago
Ezio Melotti
c28f6fa505
#11420 : make test suite pass with -B/DONTWRITEBYTECODE set. Initial patch by Thomas Wouters.
13 years ago
Mark Dickinson
9fade768c8
Issue #13863 : fix incorrect .pyc timestamps on Windows / NTFS (apparently due to buggy fstat)
14 years ago
Nick Coghlan
62b4136277
Fix broken test and replace redundant generator with a tuple
14 years ago
Nick Coghlan
33b0fc2304
No reason to use a generator here
14 years ago
Nick Coghlan
c71b4c7198
Issue #6074 : Actually delete the source file in the test as intended
14 years ago
Nick Coghlan
11d752e374
Remove unused import
14 years ago
Nick Coghlan
eb8d627bbd
Issue #6074 : Apply an appropriate fix for importlib based imports
14 years ago
Nick Coghlan
097708aef6
Issue #6074 : Actually delete the source file in the test as intended
14 years ago
Nick Coghlan
34937ce249
Issue #6074 : Forward port Windows read-only source file fix from 2.7
14 years ago
Nick Coghlan
b48c028ca7
Issue #6074 : Restore the long-broken support for running with read-only source files on Windows
14 years ago
Benjamin Peterson
d388c4e02f
use modern conditional syntax
14 years ago
Nick Coghlan
5d0612411e
Issue #15828 : Restore support for C extension modules in imp.load_module()
14 years ago
Nick Coghlan
91b9f139bc
Issue #15828 : Restore support for C extension modules in imp.load_module()
14 years ago
Nick Coghlan
a508770e20
Close #2501 : Permission bits are once again correctly copied from the source file to the cached bytecode file. Test by Eric Snow.
14 years ago
Brett Cannon
7385adc84c
Issue #15715 : Ignore failed imports triggered by the use of fromlist.
When the fromlist argument is specified for __import__() and the
attribute doesn't already exist, an import is attempted. If that fails
(e.g. module doesn't exist), the ImportError will now be silenced (for
backwards-compatibility). This *does not* affect
``from ... import ...`` statements.
Thanks to Eric Snow for the patch and Simon Feltman for reporting the
regression.
14 years ago
Nick Coghlan
336d9ac6bd
Issue #15425 : Don't rely on the assumption that the current working directory is on sys.path (this will hopefully appease the XP buildbots)
14 years ago
Nick Coghlan
42c0766a53
Close #15486 : Simplify the mechanism used to remove importlib frames from tracebacks when they just introduce irrelevant noise
14 years ago
Nick Coghlan
5ee9892406
Close #15425 : Eliminate more importlib related traceback noise
14 years ago
Jason R. Coombs
d0118e16a1
Restored test by specifying that the symlink links to a target (currently required for Windows symlinks). See issue15093 for details.
14 years ago
Brett Cannon
86ae981da9
Fix an import from the importlib.test move.
14 years ago
Brett Cannon
6ee9695270
Issue #15091 : Call importlib.invalidate_caches() and reactivate a test
of importing a symlinked package.
14 years ago
Brett Cannon
ba52586f76
Running the importlib tests from test_import is redundant as there is
no difference anymore between __import__ and importlib.__import__.
14 years ago
Nick Coghlan
be7e49fd82
Close #15386 : There was a loophole that meant importlib.machinery and imp would sometimes reference an uninitialised copy of importlib._bootstrap
14 years ago
Antoine Pitrou
1a689189d2
Issue #15338 : skip test_UNC_path when the current user doesn't have enough permissions to access the path.
14 years ago