Commit Graph

3355 Commits

Author SHA1 Message Date
Victor Stinner
4ca2809b5c Fix #11586: typo in initfsencoding()
Patch written by Ray Allen.
2011-03-20 23:09:03 +01:00
Victor Stinner
6ae1e7f04e Issue #3080: imp.load_module() accepts None for the module path
imp.find_module() returns None as module path for builtin and frozen builtins.
2011-03-20 22:37:17 +01:00
Victor Stinner
cc9564ecd8 Issue #3080: Fix call to case_ok() in find_init_module() 2011-03-20 04:58:29 +01:00
Victor Stinner
1304f2d8a3 Issue #3080: Fix case_ok() using case_bytes()
Invert name and namelen arguments.
2011-03-20 04:28:55 +01:00
Victor Stinner
fe93faf98c Issue #3080: Add PyImport_ImportModuleLevelObject() function
Use it for the builtin __import__ function.
2011-03-14 15:54:52 -04:00
Victor Stinner
98dbba5d20 Issue #3080: Use repr() to format the module name on error 2011-03-14 15:15:47 -04:00
Victor Stinner
ccbf475dfd Fix imp.cache_from_source() if the directory name contains a dot
If the directory name contains a dot but not the filename, don't strip at the
dot.
2011-03-14 15:05:12 -04:00
Victor Stinner
fe19d21815 Issue #3080: imp.new_module() uses Unicode 2011-03-14 14:53:28 -04:00
Victor Stinner
2fd76e478f Issue #3080: find_module() returns the path as Unicode 2011-03-14 15:19:39 -04:00
Victor Stinner
c9a271cf2b Issue #3080: case_ok() expects Unicode strings 2011-03-14 14:34:13 -04:00
Victor Stinner
547a2a6d52 Issue #3080: find_init_module() expects Unicode 2011-03-20 03:07:28 +01:00
Victor Stinner
d029621c70 Issue #3080: Refactor find_module_path(), use return instead of break
Prepare also the API change of case_ok()
2011-03-14 14:04:10 -04:00
Victor Stinner
df75a023a0 Issue #3080: find_module() sets an empty path for builtin and frozen modules 2011-03-14 13:40:04 -04:00
Victor Stinner
533d78399f Issue #3080: Rename some path variables to path_list 2011-03-14 13:22:54 -04:00
Victor Stinner
ad3c03b23e Issue #3080: find_module() expects module fullname and subname as Unicode
And PyImport_ReloadModule() uses Unicode for the module name.
2011-03-14 09:21:33 -04:00
Victor Stinner
58d37112ae Issue #3080: Drop OS/2 support for the import machinery
Sorry Andrew I MacIntyre!
2011-03-13 23:11:02 -04:00
Victor Stinner
9599de5110 Issue #3080: Reindent and simplify import_submodule() 2011-03-13 22:38:38 -04:00
Victor Stinner
c24c8108b6 Issue #3080: Use %R to format module name in error messages
%R format instead of %U
2011-03-13 22:38:06 -04:00
Victor Stinner
974389d92c Issue #3080: Use Unicode for the "The Magnum Opus of dotted-name import"
Use Unicode for module name and paths in the following functions:

 * PyImport_ImportModuleLevel()
 * add_submodule()
 * ensure_from_list()
 * get_parent()
 * import_module_level()
 * import_submodule()
 * load_next()
 * mark_miss()
2011-03-15 09:33:57 +01:00
Victor Stinner
2e5f11aaa4 Issue #3080: PyImport_ImportModuleNoBlock() uses Unicode 2011-03-13 21:57:27 -04:00
Victor Stinner
41c5fecce0 Issue #3080: load_module() expects name and path as Unicode 2011-03-13 21:46:30 -04:00
Victor Stinner
2f42ae53aa Issue #3080: Use Unicode to import source and compiled modules
* Use Unicode for module name and path in the following functions:

   * get_file()
   * load_source_module(), parse_source_module()
   * make_compiled_pathname(), check_compiled_module(),
     read_compiled_module(), load_compiled_module(), write_compiled_module(),
     update_compiled_module()

 * On Windows, use CreateDirectoryW() instead of mkdir()
 * update_compiled_module() cannot fail anymore
2011-03-20 00:41:24 +01:00
Victor Stinner
c9abda0c04 Issue #3080: get_sourcefile(), make_source_pathname(), load_package()
Use Unicode for module name and path in get_sourcefile(),
make_source_pathname() and load_package() functions.
2011-03-14 13:33:46 -04:00
Victor Stinner
d68c2cf237 Issue #3080: Create find_module_path() subfunction 2011-03-12 16:02:28 -05:00
Victor Stinner
3758028299 Issue #3080: Create find_module_path_list() subfunction 2011-03-20 01:34:43 +01:00