Antoine Pitrou
a78f74ce02
Issue #8078 : Add constants for higher baud rates in the termios module.
...
Patch by Rodolpho Eckhardt.
2010-11-20 20:03:08 +00:00
Benjamin Peterson
fa73555cfc
correct logic when pos is after the string #10467
2010-11-20 17:24:04 +00:00
Antoine Pitrou
664c2d1fc0
Issue #10443 : Add the SSLContext.set_default_verify_paths() method.
2010-11-17 20:29:42 +00:00
Antoine Pitrou
b6d4ee5361
Issue #10440 : Support RUSAGE_THREAD as a constant in the resource module.
...
Patch by Robert Collins.
2010-11-17 16:19:35 +00:00
Matthias Klose
bee3316083
Modules/_io/bufferedio.c (buffered_dealloc_warn): Make it static.
2010-11-16 20:07:51 +00:00
Victor Stinner
47f637ce17
getpath.c: fix test to detech PyUnicode_AsWideChar() failure
...
PyUnicode_AsWideChar() result is signed, whereas it was stored in a unsigned
variable, and then the test was "n >= 0" which is always true to an unsigned
number. Patch written by Hallvard B Furuseth.
2010-11-10 14:12:20 +00:00
Antoine Pitrou
fb0469112f
Issue #10022 : The dictionary returned by the `getpeercert()` method
...
of SSL sockets now has additional items such as `issuer` and `notBefore`.
2010-11-09 20:21:19 +00:00
Senthil Kumaran
922e904cca
Fix issue10324 - Modules/binascii.c: simplify expressions
2010-11-09 09:59:13 +00:00
Victor Stinner
4fe519bf8d
Issue #10359 : Remove useless (duplicate) initialization in _csv
2010-11-09 09:40:16 +00:00
Victor Stinner
132ef6cca3
Issue #10359 : Remove useless comma, invalid in ISO C
2010-11-09 09:39:41 +00:00
Victor Stinner
9f0b51e4e3
Issue #10359 : Use Py_UNICODE for the typecode in array
...
And don't create non constant array, invalid in ISO C.
2010-11-09 09:38:30 +00:00
Victor Stinner
3e2b7171bf
Issue #10359 : Remove ";" after function definition, invalid in ISO C
2010-11-09 09:32:19 +00:00
Victor Stinner
ae4836df6d
Issue #6011 : decode PREFIX, EXEC_PREFIX and PYTHONPATH variables using
...
_Py_char2wchar(), instead of L"" VAR hack, to escape undecodable bytes using
the surrogateescape error handler.
2010-11-08 23:49:47 +00:00
Victor Stinner
2f02a51135
PyUnicode_EncodeFS() raises an exception if _Py_wchar2char() fails
...
* Add error_pos optional argument to _Py_wchar2char()
* PyUnicode_EncodeFS() raises a UnicodeEncodeError or MemoryError if
_Py_wchar2char() fails
2010-11-08 22:43:46 +00:00
Antoine Pitrou
243757eb79
Issue #10180 : Pickling file objects is now explicitly forbidden, since
...
unpickling them produced nonsensical results.
2010-11-05 21:15:39 +00:00
Antoine Pitrou
39a6591507
Issue #10311 : The signal module now restores errno before returning from
...
its low-level signal handler. Patch by Hallvard B Furuseth.
2010-11-05 19:47:27 +00:00
Hirokazu Yamamoto
09fff7a8d1
Fixed socket_gethostname() on windows.
2010-11-05 17:24:13 +00:00
Antoine Pitrou
b5d8204f0f
Issue #10279 : fix test_gc under Win64.
2010-11-05 00:05:25 +00:00
Antoine Pitrou
2397dd58b7
Issue #10314 : improve performance of JSON encoding with sort_keys=True
2010-11-04 16:51:32 +00:00
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