- 26 Mar, 2016 3 commits
-
-
Raymond Hettinger authored
-
Victor Stinner authored
-
Victor Stinner authored
Issue #20021: use importlib.machinery to import Lib/opcode.py and not an opcode module coming from somewhere else. makeopcodetargets.py is part of the Python build process and it is run by an external Python program, not the built Python program. Patch written by Serhiy Storchaka.
-
- 25 Mar, 2016 26 commits
-
-
Victor Stinner authored
-
Victor Stinner authored
-
Alexander Belopolsky authored
-
Alexander Belopolsky authored
-
Victor Stinner authored
Serhiy asked me to review it.
-
Victor Stinner authored
* Replace get/restore methods with a Resource class and Resource subclasses * Create ModuleAttr, ModuleAttrList and ModuleAttrDict helper classes * Use __subclasses__() to get resource classes instead of using an hardcoded list (2 shutil resources were missinged in the list!) * Don't define MultiprocessingProcessDangling resource if the multiprocessing module is missing * Nicer diff for dictionaries. Useful for the big os.environ dict * Reorder code to group resources
-
Victor Stinner authored
tag: tip parent: 100742:ebae81b31cf6 user: Victor Stinner <victor.stinner@gmail.com> date: Fri Mar 25 15:03:34 2016 +0100 files: Lib/test/test_os.py description: test_os: Win32ErrorTests checks if file exists Don't use os.path.exists() since it ignores *any* OSError.
-
Victor Stinner authored
-
Victor Stinner authored
Write the module name rather than <module> in the error message, if module has no __file__ attribute (ex: package).
-
Victor Stinner authored
-
Victor Stinner authored
-
Victor Stinner authored
Issue #26610.
-
Victor Stinner authored
* Simply use "import opcode" to import the opcode module instead of tricks using the imp module * Use context manager for the output file * Move code into a new main() function * Replace assert with a regular if to check the number of arguments * Import modules at top level
-
Victor Stinner authored
Replace also other open(filename, "w") with open(filename, "x") to fail if a previous test forgot to remove filename.
-
Raymond Hettinger authored
-
Victor Stinner authored
Changes were backported (transplated) from default to 3.5.
-
Victor Stinner authored
Use -Wd comment line option to log the ResourceWarning.
-
Victor Stinner authored
* multiprocessing: open file with closefd=False to avoid ResourceWarning * _test_multiprocessing: open file with O_EXCL to detect bugs in tests (if a previous test forgot to remove TESTFN) * test_sys_exit(): remove TESTFN after each loop iteration Initial patch written by Serhiy Storchaka.
-
Victor Stinner authored
Use -Wd comment line option to log the ResourceWarning.
-
Victor Stinner authored
* multiprocessing: open file with closefd=False to avoid ResourceWarning * _test_multiprocessing: open file with O_EXCL to detect bugs in tests (if a previous test forgot to remove TESTFN) * test_sys_exit(): remove TESTFN after each loop iteration Initial patch written by Serhiy Storchaka.
-
Victor Stinner authored
-
Victor Stinner authored
The import machinery now raises a different exception when it fails at Python shutdown.
-
Benjamin Peterson authored
Patch by Oren Milman.
-
Zachary Ware authored
-
Zachary Ware authored
-
Victor Stinner authored
-
- 24 Mar, 2016 11 commits
-
-
Victor Stinner authored
Declare the function even if thread support is disabled.
-
Victor Stinner authored
Issue #26637: The importlib module now emits an ImportError rather than a TypeError if __import__() is tried during the Python shutdown process but sys.path is already cleared (set to None).
-
Victor Stinner authored
Issue #21925: warnings.formatwarning() now catches exceptions when calling linecache.getline() and tracemalloc.get_object_traceback() to be able to log ResourceWarning emitted late during the Python shutdown process.
-
Victor Stinner authored
Issue #21925: warnings.formatwarning() now catches exceptions on linecache.getline(...) to be able to log ResourceWarning emitted late during the Python shutdown process.
-
Victor Stinner authored
test_warnings: only run test_improper_option() and test_warnings_bootstrap() once. The unit test doesn't depend on self.module.
-
Victor Stinner authored
* Rename libregrtest.main_in_temp_cwd() to libregrtest.main() * Add regrtest.main_in_temp_cwd() alias to libregrtest.main() * Move old main_in_temp_cwd() code into libregrtest.Regrtest.main() * Update multiple scripts to call libregrtest.main()
-
Victor Stinner authored
-
Victor Stinner authored
* Move code into a new _main() function * Fix loop to cleanup sys.path * Remove unused import
-
Victor Stinner authored
-
Victor Stinner authored
-
Victor Stinner authored
* add create_file() helper function * create files using "x" mode instead of "w" to detect when a previous test forget to remove a file * open file for writing in unbuferred mode (buffering=0) * replace "try/finally: unlink" with self.addCleanup(support.unlink) * register unlink cleanup function *before* creating new files
-