Commit Graph

48161 Commits

Author SHA1 Message Date
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
Victor Stinner c696316466 Issue #3080: Remove useless name buffer from find_module()
Rename subname argument to name, and mark it as constant.
2011-03-12 09:26:54 -05:00
Victor Stinner 7d8b77c2aa Issue #3080: find_module() initialize buf and *p_fp
Document also the find_module() function
2011-03-12 08:45:02 -05:00
Victor Stinner fefd70c40d Issue #3080: _PyImport_LoadDynamicModule() uses Unicode for name and path
Document also that dynamic module names are ASCII only
2011-03-14 15:54:07 -04:00
Victor Stinner 4d6c1c476a Issue #3080: _PyWin_FindRegisteredModule() returns the path as Unicode
* Document the function
 * Use RegQueryValueW() instead of RegQueryValueA()
 * Use _Py_fopen() instead of fopen()
 * Allocate registry key on the heap, not on the stack, and handle memory
   allocation failure
 * Handle Python exception in find_module()
2011-03-08 23:49:04 +01:00
Victor Stinner db536afee1 Issue #3080: Document the name attribute of the _inittab structure
The name is an ASCII encoded string.
2011-03-07 18:34:59 +01:00
Victor Stinner 21fcd0c9af Issue #3080: Use PyUnicode_InternFromString() for builtins
_PyImport_FixupBuiltin() and _PyImport_FindBuiltin() use
PyUnicode_InternFromString() instead of PyUnicode_FromString().
2011-03-07 18:28:15 +01:00
Victor Stinner 9587286f98 Issue #3080: Import builtins using Unicode strings
- is_builtin(), init_builtin(), load_builtin() and other builtin related
   functions use Unicode strings, instead of byte strings
 - Rename _PyImport_FixupExtensionUnicode() to _PyImport_FixupExtensionObject()
 - Rename _PyImport_FindExtensionUnicode() to _PyImport_FindExtensionObject()
2011-03-07 18:20:56 +01:00
Victor Stinner 53dc735168 Issue #3080: Add PyImport_ImportFrozenModuleObject()
find_frozen(), get_frozen_object(), is_frozen_package() and other functions
related to frozen modules use Unicode strings instead of byte strings.
2011-03-20 01:50:21 +01:00
Victor Stinner 9464d61cba Issue #3080: PyImport_Cleanup() uses Unicode
Replace strcmp() by PyUnicode_CompareWithASCIIString()
2011-03-07 17:08:21 +01:00
Victor Stinner f6b563af2d Issue #3080: zipimport has a full unicode suppport
- Use Unicode for module paths and names, self->archive and self->prefix
 - Format module names and paths use %R instead of '%U' to escape surrogate
   characters (PEP 383)
 - Use PyImport_ExecCodeModuleObject() instead of PyImport_ExecCodeModuleEx()
 - Use PyImport_AddModuleObject() instead of PyImport_AddModule()
2011-03-14 20:46:50 -04:00
Victor Stinner 942003ccf9 import.c: replace tab by spaces 2011-03-07 16:57:48 +01:00
Senthil Kumaran dab6780c9e merge from 3.2 2011-03-20 10:45:41 +08:00
Senthil Kumaran bec7886e3f Merge from 3.1 2011-03-20 10:45:10 +08:00
Senthil Kumaran 1b407fe658 Issue #11567 - Let's have the DOCTYPE as HTML instead of XHTML. 2011-03-20 10:44:30 +08:00
R David Murray fef67eefd3 Merge #7198 doc fix. 2011-03-19 22:32:39 -04:00
R David Murray e33e69f9b7 Merge #7198 doc fix. 2011-03-19 22:31:10 -04:00
R David Murray 9188702a75 #7198: add newlines='' to csv.writer docs. 2011-03-19 22:30:14 -04:00
Brian Quinlan 72bd8b7bba Branch merge 2011-03-20 13:29:57 +11:00
Brian Quinlan 142fad4b6b Use WeakSets rather than manual pruning to prevent unbounded growth of dead thread references. 2011-03-20 13:11:11 +11:00
Senthil Kumaran d0654ef289 Merge NEWS entry edit. 2011-03-20 09:27:25 +08:00
Senthil Kumaran 799c669283 Add NEWS for Issue #11563. 2011-03-20 09:26:57 +08:00
Senthil Kumaran 833d91204f closes issue11609. buildbot related failures in the test_urllibnet. 2011-03-20 06:13:36 +08:00
Senthil Kumaran a7f43cc09c branch merge 3.2 2011-03-20 05:33:09 +08:00
Senthil Kumaran acbaa923b8 Call unfakehttp in order to close connection while opening the connection through a fakehttp object.
Address issue11609 - urllib related buildbots failure.
2011-03-20 05:30:16 +08:00
Antoine Pitrou 89ba56d5fb Skip crasher tests 2011-03-19 19:54:01 +01:00
Skip Montanaro c9b49f8759 untab 2011-03-19 13:07:10 -05:00
Skip Montanaro b7d1aebb66 *sigh* - i don't like this workflow at all 2011-03-19 13:05:58 -05:00
Skip Montanaro 482e7e061b merge from upstream 2011-03-19 13:03:33 -05:00
Antoine Pitrou 1679f4daa1 Issue #11459: A `bufsize` value of 0 in subprocess.Popen() really creates
unbuffered pipes, such that select() works properly on them.
2011-03-19 17:06:22 +01:00
Antoine Pitrou 7b98d02302 Issue #11459: A `bufsize` value of 0 in subprocess.Popen() really creates
unbuffered pipes, such that select() works properly on them.
2011-03-19 17:04:13 +01:00
Antoine Pitrou 877766dee8 Issue #11459: A `bufsize` value of 0 in subprocess.Popen() really creates
unbuffered pipes, such that select() works properly on them.
2011-03-19 17:00:37 +01:00
Skip Montanaro b61efd0a68 commit merge 2011-03-19 09:15:28 -05:00
Skip Montanaro b40dea7499 Mention RFC 4180. Based on input by Tony Wallace in issue 11456. 2011-03-19 09:09:30 -05:00
Senthil Kumaran a4d5b0cb62 Closes issue11563 test_urllibnet is triggering a ResourceWarning. Patch by Jeff McNeil. 2011-03-19 17:47:26 +08:00
Senthil Kumaran d24c991f11 Merging it again. 2011-03-19 17:45:40 +08:00
Senthil Kumaran f95b4df6d2 merge from 3.2 2011-03-19 17:29:32 +08:00
Senthil Kumaran d91ffcafcb Closes issue11563 - test_urllibnet ResourceWarning. Patch by Jeff McNeil. 2011-03-19 17:25:27 +08:00
Ross Lagerwall 9ad63e0914 Fix refleak introduced by #10812. 2011-03-19 09:11:14 +02:00
Nick Coghlan 952c0782b3 Last attempt to get compiler recursion crasher to fail reliably across platforms before giving up and skipping it as unreliably platform dependent 2011-03-19 15:22:59 +10:00
Raymond Hettinger af9be06b3c Issue 7391: Remove questionable and outdated HOWTO document with permission from its author. 2011-03-18 18:22:28 -07:00
Raymond Hettinger 7e4c168385 Minor optimization -- factor a constant expression out of the inner-loop. 2011-03-18 15:09:10 -07:00
briancurtin f84f3c3d2d Fix #11596. When bz2 isn't available, skip test_bz2_ext_fake. 2011-03-18 13:03:17 -05:00
Raymond Hettinger 6827294e05 Speed-up search for hidden names by using a set instead of a tuple. 2011-03-18 02:22:15 -07:00