summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_import
Commit message (Collapse)AuthorAgeFilesLines
* bpo-37032: Add CodeType.replace() method (GH-13542)Victor Stinner2019-05-241-7/+1
|
* bpo-36540: PEP 570 -- Implementation (GH-12701)Pablo Galindo2019-04-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains the implementation of PEP570: Python positional-only parameters. * Update Grammar/Grammar with new typedarglist and varargslist * Regenerate grammar files * Update and regenerate AST related files * Update code object * Update marshal.c * Update compiler and symtable * Regenerate importlib files * Update callable objects * Implement positional-only args logic in ceval.c * Regenerate frozen data * Update standard library to account for positional-only args * Add test file for positional-only args * Update other test files to account for positional-only args * Add News entry * Update inspect module and related tests
* bpo-36085: Enable better DLL resolution on Windows (GH-12302)Steve Dower2019-03-291-0/+48
|
* bpo-33237: Improve AttributeError message for partially initialized module. ↵Serhiy Storchaka2018-10-303-0/+17
| | | | (GH-6398)
* Revert "bpo-33671: Add support.MS_WINDOWS and support.MACOS (GH-7800)" (GH-7919)Victor Stinner2018-06-261-2/+2
| | | This reverts commit 8fbbdf0c3107c3052659e166f73990b466eacbb0.
* bpo-33671: Add support.MS_WINDOWS and support.MACOS (GH-7800)Victor Stinner2018-06-221-2/+2
| | | | | | | | * Add support.MS_WINDOWS: True if Python is running on Microsoft Windows. * Add support.MACOS: True if Python is running on Apple macOS. * Replace support.is_android with support.ANDROID * Replace support.is_jython with support.JYTHON * Cleanup code to initialize unix_shell
* bpo-33465: Use an unlikely to be built-in C extension in a test (#6797)Barry Warsaw2018-05-151-5/+6
|
* bpo-33053: -m now adds *starting* directory to sys.path (GH-6231)Nick Coghlan2018-03-251-4/+7
| | | | | | | | | | | | Historically, -m added the empty string as sys.path zero, meaning it resolved imports against the current working directory, the same way -c and the interactive prompt do. This changes the sys.path initialisation to add the *starting* working directory as sys.path[0] instead, such that changes to the working directory while the program is running will have no effect on imports when using the -m switch.
* bpo-32932: More revealing error message when non-str objects in __all__ ↵Xiang Zhang2018-03-241-0/+21
| | | | (GH-5848)
* closes bpo-31650: PEP 552 (Deterministic pycs) implementation (#4575)Benjamin Peterson2017-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Python now supports checking bytecode cache up-to-dateness with a hash of the source contents rather than volatile source metadata. See the PEP for details. While a fairly straightforward idea, quite a lot of code had to be modified due to the pervasiveness of pyc implementation details in the codebase. Changes in this commit include: - The core changes to importlib to understand how to read, validate, and regenerate hash-based pycs. - Support for generating hash-based pycs in py_compile and compileall. - Modifications to our siphash implementation to support passing a custom key. We then expose it to importlib through _imp. - Updates to all places in the interpreter, standard library, and tests that manually generate or parse pyc files to grok the new format. - Support in the interpreter command line code for long options like --check-hash-based-pycs. - Tests and documentation for all of the above.
* bpo-31492: Fix assertion failures in case of a module with a bad __name__ ↵Oren Milman2017-09-191-0/+12
| | | | attribute. (#3620)
* bpo-31286, bpo-30024: Fixed stack usage in absolute imports with (#3217)Serhiy Storchaka2017-08-291-0/+17
| | | binding a submodule to a name.
* bpo-30876: Relative import from unloaded package now reimports the package ↵Serhiy Storchaka2017-07-123-3/+21
| | | | | | | | | (#2639) instead of failing with SystemError. Relative import from non-package now fails with ImportError rather than SystemError.
* bpo-30814: Fixed a race condition when import a submodule from a package. ↵Serhiy Storchaka2017-07-063-0/+30
| | | | (#2580)
* Fix skipping test_UNC_path on AppVeyor due to a different error being raised ↵Segev Finer2017-06-021-1/+1
| | | | | | (#1920) We get `ERROR_BAD_NETPATH` (53) on AppVeyor which is translated to ENOENT (2).
* bpo-30024: Circular imports involving absolute imports with binding (#1264)Serhiy Storchaka2017-05-093-0/+8
| | | a submodule to a name are now supported.
* bpo-29693: Fix for DeprecationWarning in test_import (#421)Anish Shah2017-03-031-2/+2
| | | Patch by Anish Shah.
* use select instead of _opcode for import test (#372)Benjamin Peterson2017-03-011-5/+5
|
* weaken test_from_import_missing_attr_has_name_and_path regular expression (#371)Benjamin Peterson2017-03-011-1/+1
| | | Windows uses backslashes for separators.
* bpo-29546: Improve from-import error message with location (#103)Matthias Bussonnier2017-02-221-1/+13
| | | | bpo-29546: Improve from-import error message with location
* bpo-29546: Set 'path' on ImportError for ``from ... import ...`` (GH-91)Matthias Bussonnier2017-02-151-0/+19
|
* Remove unused imports.Serhiy Storchaka2016-12-161-1/+0
|
* Issue #15767: Use ModuleNotFoundError.Eric Snow2016-09-071-0/+12
|
* Issue #26583: Skip test_timestamp_overflow in test_import if bytecodeNed Deily2016-03-171-0/+1
| | | | files cannot be written.
* Issue #24492: make sure that ``from ... import ...` raises anBrett Cannon2015-08-121-0/+13
| | | | | | ImportError if __name__ is not defined on a package. Thanks to Armin Rigo for the bug report and diagnosing the cause.
* Issue #9517: Move script_helper to the support package.Berker Peksag2015-05-061-3/+4
| | | | Patch by Christie Wilson.
* Issue #23911: Move path-based bootstrap code to a separate frozen module.Eric Snow2015-05-031-6/+14
|
* Issue #21483: Skip test_timestamp_overflow on NFS.Berker Peksag2015-04-221-1/+2
| | | | Patch by Isaac Schwabacher.
* Issue #23731: Implement PEP 488.Brett Cannon2015-04-131-21/+16
| | | | | | 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.
* WhitespaceAntoine Pitrou2014-10-137-7/+7
|
* Issue #17636: Circular imports involving relative imports are now supported.Antoine Pitrou2014-10-1311-0/+1134