summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* #6518: enable context manager protocol for ossaudiodev types.Georg Brandl2010-10-231-0/+25
|
* Issue #6011: getpath: decode VPATH env var from the locale encodingVictor Stinner2010-10-231-7/+10
| | | | | | Instead of casting it to wchar_t* without conversion. It fixes a bug if Python is compiled a non-ascii directory, different than the source code directory, with C locale.
* Revert r85797 (and r85798): it broke the Windows buildbots because ofAntoine Pitrou2010-10-221-34/+17
| | | | test_multiprocessing's misbehaviour.
* Issue #9935: Speed up pickling of instances of user-defined classes.Antoine Pitrou2010-10-221-17/+34
|
* For now, remove accept4() code (issue #10115)Antoine Pitrou2010-10-221-9/+0
|
* Issue #5639: Add a *server_hostname* argument to `SSLContext.wrap_socket`Antoine Pitrou2010-10-221-5/+40
| | | | | | in order to support the TLS SNI extension. `HTTPSConnection` and `urlopen()` also use this argument, so that HTTPS virtual hosts are now supported.
* #4829: better error message for invalid file modeGeorg Brandl2010-10-211-1/+2
|
* Issue #10089: Add support for arbitrary -X options on the command-line.Antoine Pitrou2010-10-211-3/+6
| | | | They can be retrieved through a new attribute `sys._xoptions`.
* Issue #4388: On Mac OS X, decode command line arguments from UTF-8, instead ofVictor Stinner2010-10-201-0/+8
| | | | | | | the locale encoding. If the LANG (and LC_ALL and LC_CTYPE) environment variable is not set, the locale encoding is ISO-8859-1, whereas most programs (including Python) expect UTF-8. Python already uses UTF-8 for the filesystem encoding and to encode command line arguments on this OS.
* zipimport: remove arbitrary length limit from message formatsVictor Stinner2010-10-181-14/+9
| | | | | PyErr_Format() and PyUnicode_FromFormat() are able to allocate the right buffer size and to catch memory allocation failures.
* zipimport: document archive encoding; fix indentationVictor Stinner2010-10-181-3/+4
|
* Revert r85699 and r85701 (zipimport): fullname is a module name, not a pathVictor Stinner2010-10-181-42/+18
| | | | UTF-8 is just fine for module names.
* zipimport: fix "can't find module ..." error messageVictor Stinner2010-10-181-4/+16
| | | | | | I cannot use %U: fullname is a bytes object, not an unicode object. %A format cannot be used, it adds 'b' (bytes) prefix. So create cant_find_module() function to decode the filename and raise the error message.
* zipimport: find_module(), is_package() and get_source() supports surrogatesVictor Stinner2010-10-181-16/+28
| | | | Use PyUnicode_FSConverter to support surrogates in the full name.
* zipimport: pass path size to make_filename()Victor Stinner2010-10-181-5/+5
| | | | Don't hardcode path size in make_filename().
* Fix hash function type.Georg Brandl2010-10-181-1/+1
|
* get_code_from_data() uses the filesystem encoding to encode the module path,Victor Stinner2010-10-181-8/+7
| | | | instead of utf-8.
* zipimport: read_directory() uses cp437 or utf-8 (in strict mode), depending onVictor Stinner2010-10-181-2/+9
| | | | | the unicode flag, to decode the filename, instead of the filesystem encoding. Use the same choice than the zipfile module.
* zipimport: get_module_code() returns modpath as a Unicode objectVictor Stinner2010-10-181-12/+23
| | | | | ... instead of a char*. Encode the module path to the fileystem encoding (for PyImport_ExecCodeModuleEx) instead of utf-8.
* zipimporter_load_module() doesn't destroy mod on errorVictor Stinner2010-10-181-9/+9
| | | | | PyImport_AddModule() returns a borrowed reference. Don't display "import ... # loaded from Zip ..." on error.
* zipimport: encode the prefix to the fileystem encodingVictor Stinner2010-10-181-8/+15
|
* zipimport, get_module_code(): avoid useless _PyUnicode_AsString()Victor Stinner2010-10-181-3/+2
|
* zipimport: fix indentationVictor Stinner2010-10-181-4/+5
|
* Remove more unneeded casts to hashfunc.Georg Brandl2010-10-182-6/+6
|
* Fix type of hash function.Georg Brandl2010-10-181-1/+1
|
* Fix compiler warning about unused static function.Georg Brandl2010-10-181-1/+4
|
* Fix compiler warnings about formatting pid_t as an int, by always casting to ↵Georg Brandl2010-10-181-1/+1
| | | | long.
* #678250: Make mmap flush a noop on ACCESS_READ and ACCESS_COPY.R. David Murray2010-10-181-0/+4
| | | | Patch by Sébastien Sablé. This solves a test_mmap failure on AIX.
* fix strict aliasing warningsBenjamin Peterson2010-10-171-2/+2
|
* make hashes always the size of pointers; introduce Py_hash_t #9778Benjamin Peterson2010-10-172-8/+8
|
* Fix T_BOOL bug of issue 8845.Martin v. Löwis2010-10-171-1/+1
|
* run_file(): encode the filename with PyUnicode_EncodeFSDefault() instead ofVictor Stinner2010-10-171-2/+2
| | | | PyUnicode_AsUTF8String()
* Fix compilation warning in _ctypes module on WindowAmaury Forgeot d'Arc2010-10-171-1/+1
|
* Fix multiprocessing Semaphore's on netbsd5. SEM_VALUE_MAX is definedGregory P. Smith2010-10-171-2/+13
| | | | | | | as (~0U) on NetBSD which was causing it to appear as -1 when used as a signed int for _multprocessing.SemLock.SEM_VALUE_MAX. This works around the problem by substituting INT_MAX on systems where it appears negative when used as an int.
* _PyImport_FixupExtension() and _PyImport_FindExtension() uses FS encodingVictor Stinner2010-10-171-1/+1
| | | | | | | * Rename _PyImport_FindExtension() to _PyImport_FindExtensionUnicode(): the filename becomes a Unicode object instead of byte string * Rename _PyImport_FixupExtension() to _PyImport_FixupExtensionUnicode(): the filename becomes a Unicode object instead of byte string
* applying netbsd-wizs-mod.patch from issue5510 -Gregory P. Smith2010-10-171-2/+25
| | | | fixes for netbsd (and dragonflybsd?)
* Oops, fix my previous commit (r85583) on calculate_path()Victor Stinner2010-10-161-4/+7
| | | | path value may be changed, so keep a copy in a new variable.
* calculate_path(): use _Py_char2wchar() to decode the PATH environment variable,Victor Stinner2010-10-161-9/+4
| | | | to support surrogate characters
* Add an optional size argument to _Py_char2wchar()Victor Stinner2010-10-162-3/+5
| | | | | | _Py_char2wchar() callers usually need the result size in characters. Since it's trivial to compute it in _Py_char2wchar() (O(1) whereas wcslen() is O(n)), add an option to get it.
* Get rid of a "unused static function" warning.Georg Brandl2010-10-161-0/+2
|
* zipimport: catch _PyUnicode_AsString() failure in get_code_from_data()Victor Stinner2010-10-161-0/+4
| | | | It occurs if the path contains surrogates.
* #9862: On AIX PIPE_BUF is broken. Make it 512.R. David Murray2010-10-151-0/+4
| | | | Patch by Sébastien Sablé.
* #9054: fix crash when using pyexpat with a system expat lib version 2.0.1.Georg Brandl2010-10-151-0/+3
|
* #5355: Provide mappings from Expat error numbers to string descriptions and ↵Georg Brandl2010-10-151-5/+36
| | | | backwards, in order to actually make it possible to analyze error codes provided by ExpatError.
* Issue 9183: Intern UTC timezone.Alexander Belopolsky2010-10-141-14/+31
|
* Issue #7523: Add SOCK_CLOEXEC and SOCK_NONBLOCK to the socket module,Antoine Pitrou2010-10-141-6/+33
| | | | where supported by the system. Patch by Nikita Vetoshkin.
* _Py_wgetcwd() decodes the path using _Py_char2wchar() to support surrogatesVictor Stinner2010-10-141-6/+6
|
* Py_Main() uses _Py_wchar2char() to encode the filename in error messagesVictor Stinner2010-10-141-11/+11
|
* #9418: first step of moving private string methods to _string module.Georg Brandl2010-10-141-0/+4
|
* Revert r85435 (and r85440): decode command line arguments from utf-8Victor Stinner2010-10-131-10/+1
| | | | | | | Python exits with a fatal error if the command line contains an undecodable argument. PyUnicode_FromString() fails at the first undecodable byte because it calls the error handler, but error handlers are not ready before Python initialization.