Hirokazu Yamamoto
3cdd5cb959
Issue #5391 : mmap.read_byte() should return unsigned value [0, 255]
...
instead of signed value [-127, 128].
2010-11-04 12:09:08 +00:00
Senthil Kumaran
95c0700eff
Fix Issue 10307 - compile error in readline.c
2010-11-04 03:51:05 +00:00
Antoine Pitrou
87298c4a23
No declarations in the middle of a block (fixes compile under Windows)
2010-10-31 21:03:01 +00:00
Antoine Pitrou
e974571d36
Issue #10160 : Speed up operator.attrgetter. Patch by Christos Georgiou.
2010-10-31 15:26:04 +00:00
Benjamin Peterson
bbb0412ad1
if FileIO.__init__ fails, close fd
2010-10-30 23:16:28 +00:00
Benjamin Peterson
430d469758
fix style
2010-10-30 23:13:57 +00:00
Antoine Pitrou
8d2b51b46a
Issue #10253 : FileIO leaks a file descriptor when trying to open a file
...
for append that isn't seekable. Patch by Brian Brazil.
2010-10-30 16:19:14 +00:00
Benjamin Peterson
e857b29fdd
plug refleak
2010-10-29 21:37:26 +00:00
Martin v. Löwis
72f48422e2
Issue #9377 : Use Unicode API for gethostname on Windows.
2010-10-29 18:20:08 +00:00
Antoine Pitrou
e033e06db0
Issue #10093 : ResourceWarnings are now issued when files and sockets are
...
deallocated without explicit closing. These warnings are silenced by
default, except in pydebug mode.
2010-10-29 10:38:18 +00:00
Antoine Pitrou
b156a46b26
Issue #8852 : Allow the socket module to build on OpenSolaris.
2010-10-27 20:13:57 +00:00
Antoine Pitrou
ea5d17d9af
In open(), only set the buffer size from st.st_blksize when it is greater
...
than 1. This matches the pure Python implementation in _pyio and should
fix a couple of failures on the NetBSD buildbot.
2010-10-27 19:45:43 +00:00
Jesus Cea
7e9065cf8c
Issue #10143 : Update "os.pathconf" values
2010-10-25 13:02:04 +00:00
Georg Brandl
770a2be364
These are true PyCFunctions, after adding the second argument to oss_self, no need to cast.
2010-10-24 20:47:32 +00:00
Georg Brandl
08be72d0aa
Add a new warning gategory, ResourceWarning, as discussed on python-dev. It is silent by default,
...
except when configured --with-pydebug.
Emit this warning from the GC shutdown procedure, rather than just printing to stderr.
2010-10-24 15:11:22 +00:00
Georg Brandl
687a1fa546
Add casts (one needed, one for consistency).
2010-10-24 14:21:42 +00:00
Antoine Pitrou
29aad0005d
Issue #10185 : use Py_hash_t instead of long
2010-10-23 19:42:38 +00:00
Georg Brandl
1e908af335
#6518 : enable context manager protocol for ossaudiodev types.
2010-10-23 17:31:52 +00:00
Victor Stinner
2158231433
Issue #6011 : getpath: decode VPATH env var from the locale encoding
...
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.
2010-10-23 00:13:28 +00:00
Antoine Pitrou
ff150f2921
Revert r85797 (and r85798): it broke the Windows buildbots because of
...
test_multiprocessing's misbehaviour.
2010-10-22 21:41:05 +00:00
Antoine Pitrou
7eecffd05d
Issue #9935 : Speed up pickling of instances of user-defined classes.
2010-10-22 19:43:59 +00:00
Antoine Pitrou
61ec8de809
For now, remove accept4() code (issue #10115 )
2010-10-22 18:44:15 +00:00
Antoine Pitrou
d532321f7b
Issue #5639 : Add a *server_hostname* argument to `SSLContext.wrap_socket`
...
in order to support the TLS SNI extension. `HTTPSConnection` and
`urlopen()` also use this argument, so that HTTPS virtual hosts are now
supported.
2010-10-22 18:19:07 +00:00
Georg Brandl
28928aef2e
#4829 : better error message for invalid file mode
2010-10-21 13:45:52 +00:00
Antoine Pitrou
9583cac633
Issue #10089 : Add support for arbitrary -X options on the command-line.
...
They can be retrieved through a new attribute `sys._xoptions`.
2010-10-21 13:42:28 +00:00
Victor Stinner
f933e1ab6f
Issue #4388 : On Mac OS X, decode command line arguments from UTF-8, instead of
...
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.
2010-10-20 22:58:25 +00:00
Victor Stinner
07298a1f04
zipimport: remove arbitrary length limit from message formats
...
PyErr_Format() and PyUnicode_FromFormat() are able to allocate the right buffer
size and to catch memory allocation failures.
2010-10-18 22:45:54 +00:00
Victor Stinner
9e40fad193
zipimport: document archive encoding; fix indentation
2010-10-18 22:34:46 +00:00
Victor Stinner
965a8a1c5b
Revert r85699 and r85701 (zipimport): fullname is a module name, not a path
...
UTF-8 is just fine for module names.
2010-10-18 21:44:33 +00:00
Victor Stinner
8c8ed0a799
zipimport: fix "can't find module ..." error message
...
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.
2010-10-18 21:21:02 +00:00
Victor Stinner
0410656b30
zipimport: find_module(), is_package() and get_source() supports surrogates
...
Use PyUnicode_FSConverter to support surrogates in the full name.
2010-10-18 20:44:08 +00:00
Victor Stinner
269aeb7c0d
zipimport: pass path size to make_filename()
...
Don't hardcode path size in make_filename().
2010-10-18 20:40:59 +00:00
Georg Brandl
016cec75bd
Fix hash function type.
2010-10-18 12:24:53 +00:00
Victor Stinner
2a94f4c0ef
get_code_from_data() uses the filesystem encoding to encode the module path,
...
instead of utf-8.
2010-10-18 12:15:34 +00:00
Victor Stinner
d36c8217e1
zipimport: read_directory() uses cp437 or utf-8 (in strict mode), depending on
...
the unicode flag, to decode the filename, instead of the filesystem encoding.
Use the same choice than the zipfile module.
2010-10-18 12:13:46 +00:00
Victor Stinner
08654e18ee
zipimport: get_module_code() returns modpath as a Unicode object
...
... instead of a char*. Encode the module path to the fileystem encoding
(for PyImport_ExecCodeModuleEx) instead of utf-8.
2010-10-18 12:09:02 +00:00
Victor Stinner
26fabe1369
zipimporter_load_module() doesn't destroy mod on error
...
PyImport_AddModule() returns a borrowed reference. Don't display "import ... #
loaded from Zip ..." on error.
2010-10-18 12:03:25 +00:00
Victor Stinner
72f767e601
zipimport: encode the prefix to the fileystem encoding
2010-10-18 11:44:21 +00:00
Victor Stinner
353349caeb
zipimport, get_module_code(): avoid useless _PyUnicode_AsString()
2010-10-18 11:40:40 +00:00
Victor Stinner
c342fca222
zipimport: fix indentation
2010-10-18 11:39:05 +00:00
Georg Brandl
f038b32d0b
Remove more unneeded casts to hashfunc.
2010-10-18 07:35:09 +00:00
Georg Brandl
d49bf5e8a5
Fix type of hash function.
2010-10-18 07:30:06 +00:00
Georg Brandl
646fdd6c61
Fix compiler warning about unused static function.
2010-10-18 07:27:55 +00:00
Georg Brandl
c7f4af4cbe
Fix compiler warnings about formatting pid_t as an int, by always casting to long.
2010-10-18 05:06:18 +00:00
R. David Murray
e194dd60f0
#678250 : Make mmap flush a noop on ACCESS_READ and ACCESS_COPY.
...
Patch by Sébastien Sablé. This solves a test_mmap failure on AIX.
2010-10-18 01:14:06 +00:00
Benjamin Peterson
223f091737
fix strict aliasing warnings
2010-10-17 21:12:18 +00:00
Benjamin Peterson
8f67d0893f
make hashes always the size of pointers; introduce Py_hash_t #9778
2010-10-17 20:54:53 +00:00
Martin v. Löwis
a2e7d9bdc1
Fix T_BOOL bug of issue 8845.
2010-10-17 19:48:29 +00:00
Victor Stinner
e0f3268715
run_file(): encode the filename with PyUnicode_EncodeFSDefault() instead of
...
PyUnicode_AsUTF8String()
2010-10-17 19:34:51 +00:00
Amaury Forgeot d'Arc
20f11fe43c
Fix compilation warning in _ctypes module on Window
2010-10-17 08:34:22 +00:00