Commit Graph

6326 Commits

Author SHA1 Message Date
Nick Coghlan 1f7ce62bd6 Implement PEP 380 - 'yield from' (closes #11682) 2012-01-13 21:43:40 +10:00
Victor Stinner 1134b0dbbd Fix _PyFaulthandler_Fini() so it can be called before _PyFaulthandler_Init() 2012-01-10 22:44:11 +01:00
Charles-François Natali 76961faaa0 Issue #13757: Change os.fdlistdir() so that it duplicates the passed file
descriptor (instead of closing it).
2012-01-10 20:25:09 +01:00
Charles-François Natali dc3044c704 Issue #12760: Add a create mode to open(). Patch by David Townshend. 2012-01-09 22:40:02 +01:00
Charles-François Natali f2840a8890 Backed out changeset 36f2e236c601: For some reason, rewinddir() doesn't work as
it should on OpenIndiana.
2012-01-08 20:30:47 +01:00
Charles-François Natali 38f425e475 Issue #13739: It's simpler and more direct to call rewinddir() at the
beginning.
2012-01-08 19:07:18 +01:00
Charles-François Natali 7546ad327d Issue #13739: In os.listdir(), rewind the directory stream (so that listdir()
can be called again on the same open file).
2012-01-08 18:34:06 +01:00
Charles-François Natali 42663334cd Issue #9975: socket: Fix incorrect use of flowinfo and scope_id. Patch by
Vilmos Nebehaj.
2012-01-02 15:57:30 +01:00
Charles-François Natali 366999a011 Issue #9975: socket: Fix incorrect use of flowinfo and scope_id. Patch by
Vilmos Nebehaj.
2012-01-02 15:47:29 +01:00
Benjamin Peterson 83251c1ecd try to always use the old API 2011-12-27 16:01:21 -06:00
Benjamin Peterson 95c16629d3 fix for old kernels which don't have epoll_create1 2011-12-27 15:36:32 -06:00
Benjamin Peterson 2fb9ae9dfc add a flags parameter to select.epoll 2011-12-27 15:15:41 -06:00
Charles-François Natali 8b759655d0 Issue #8623: Fix some strict-aliasing warnings. Patch by David Watson. 2011-12-23 16:44:51 +01:00
Antoine Pitrou 0e576f1f50 Issue #13626: Add support for SSL Diffie-Hellman key exchange, through the
SSLContext.load_dh_params() method and the ssl.OP_SINGLE_DH_USE option.
2011-12-22 10:03:38 +01:00
Ross Lagerwall 667d75d059 Don't redefine _GNU_SOURCE if it's already defined. 2011-12-22 09:45:53 +02:00
Ross Lagerwall 0b77ac32b2 Merge with 3.2 for #11006. 2011-12-22 09:10:47 +02:00
Ross Lagerwall 031bf95d32 Issue #11006: Don't issue low level warning in subprocess when pipe2() fails. 2011-12-22 09:07:30 +02:00
Antoine Pitrou 501da61671 Fix ssl module compilation if ECDH support was disabled in the OpenSSL build.
(followup to issue #13627)
2011-12-21 09:27:41 +01:00
Antoine Pitrou 0831676962 Issue #13637: "a2b" functions in the binascii module now accept ASCII-only unicode strings. 2011-12-20 13:58:41 +01:00
Antoine Pitrou 8abdb8abd8 Issue #13634: Add support for querying and disabling SSL compression. 2011-12-20 10:13:40 +01:00
Antoine Pitrou 923df6f22a Issue #13627: Add support for SSL Elliptic Curve-based Diffie-Hellman
key exchange, through the SSLContext.set_ecdh_curve() method and the
ssl.OP_SINGLE_ECDH_USE option.
2011-12-19 17:16:51 +01:00
Antoine Pitrou 6db4944cc5 Issue #13635: Add ssl.OP_CIPHER_SERVER_PREFERENCE, so that SSL servers
choose the cipher based on their own preferences, rather than on the
client's.
2011-12-19 13:27:11 +01:00
Victor Stinner 3573476271 (Merge 3.2) Handle correctly _Py_fopen() error: don't replace the exception 2011-12-18 21:05:22 +01:00
Victor Stinner bd206e27a4 Handle correctly _Py_fopen() error: don't replace the exception 2011-12-18 21:04:17 +01:00
Victor Stinner bd0850b857 import.c now catchs _Py_stat() exceptions
_Py_stat() now returns -2 if an exception was raised.
2011-12-18 20:47:30 +01:00
Victor Stinner 25ec056cc2 Issue #13530: Document os.lseek() result
Patch written by Jérémy Anger.
2011-12-17 23:15:22 +01:00
Victor Stinner e83f899364 Issue #13530: Document os.lseek() result
Patch written by Jérémy Anger.
2011-12-17 23:15:09 +01:00
Victor Stinner ab870218e3 Issue #10951: Fix compiler warnings in timemodule.c and unicodeobject.c
Thanks Jérémy Anger for the fix.
2011-12-17 22:39:43 +01:00
Victor Stinner 136ea49b39 Issue #10951: Fix a compiler warning in timemodule.c 2011-12-17 22:37:18 +01:00
Charles-François Natali 564a42c8de Issue #12809: Expose IP_TRANSPARENT in the socket module. Patch by Michael
Farrell.
2011-12-17 14:59:56 +01:00
Victor Stinner 1b57967b96 Issue #13560: Locale codec functions use the classic "errors" parameter,
instead of surrogateescape

So it would be possible to support more error handlers later.
2011-12-17 05:47:23 +01:00
Victor Stinner 1f33f2b0c3 Issue #13560: os.strerror() now uses the current locale encoding instead of UTF-8 2011-12-17 04:45:09 +01:00
Victor Stinner f2ea71fcc8 Issue #13560: Add PyUnicode_EncodeLocale()
* Use PyUnicode_EncodeLocale() in time.strftime() if wcsftime() is not
   available
 * Document my last changes in Misc/NEWS
2011-12-17 04:13:41 +01:00
Victor Stinner af02e1c85a Add PyUnicode_DecodeLocaleAndSize() and PyUnicode_DecodeLocale()
* PyUnicode_DecodeLocaleAndSize() and PyUnicode_DecodeLocale() decode a string
   from the current locale encoding
 * _Py_char2wchar() writes an "error code" in the size argument to indicate
   if the function failed because of memory allocation failure or because of a
   decoding error. The function doesn't write the error message directly to
   stderr.
 * Fix time.strftime() (if wcsftime() is missing): decode strftime() result
   from the current locale encoding, not from the filesystem encoding.
2011-12-16 23:56:01 +01:00
Victor Stinner 3607e3de27 (Merge 3.2) main() now displays an error message before exiting if a command
line argument cannot be decoded
2011-12-16 23:48:55 +01:00
Victor Stinner 94ba691ed3 main() now displays an error message before exiting if a command line argument
cannot be decoded
2011-12-16 23:48:31 +01:00
Antoine Pitrou 6ec29e299b Issue #8373: The filesystem path of AF_UNIX sockets now uses the filesystem
encoding and the surrogateescape error handler, rather than UTF-8.  Patch
by David Watson.
2011-12-16 14:46:36 +01:00
Antoine Pitrou ab0e9f7089 Issue #10350: Read and save errno before calling a function which might overwrite it.
Original patch by Hallvard B Furuseth.
2011-12-16 12:29:37 +01:00
Antoine Pitrou c345ce1a69 Issue #10350: Read and save errno before calling a function which might overwrite it.
Original patch by Hallvard B Furuseth.
2011-12-16 12:28:32 +01:00
Antoine Pitrou 093ce9cd8c Issue #6695: Full garbage collection runs now clear the freelist of set objects.
Initial patch by Matthias Troffaes.
2011-12-16 11:24:27 +01:00
Charles-François Natali 10db4dec61 Issue #4028: Make multiprocessing build on SunOS. 2011-12-14 18:39:09 +01:00
Alexandre Vassalotti a23d65ccfe Merge 3.2 2011-12-13 13:22:42 -05:00
Alexandre Vassalotti 3bfc65a25b Issue #13505: Make pickling of bytes object compatible with Python 2.
Initial patch by sbt.
2011-12-13 13:08:09 -05:00
Florent Xicluna aa6c1d240f Issue #13575: there is only one class type. 2011-12-12 18:54:29 +01:00
Benjamin Peterson 2122cf717f alias resource.error to OSError 2011-12-10 17:50:22 -05:00
Florent Xicluna 720682efd1 Merge 3.2 2011-12-09 23:42:29 +01:00
Florent Xicluna 0e686cbb7d Fix docstring typo. 2011-12-09 23:41:19 +01:00
Victor Stinner e3b47152a4 Write tests for invalid characters (U+00110000)
Test the following functions:

 * codecs.raw_unicode_escape_decode()
 * PyUnicode_FromWideChar()
 * PyUnicode_FromUnicode()
 * "unicode_internal" and "unicode_escape" decoders
2011-12-09 20:49:49 +01:00
Victor Stinner db6238964d (Merge 3.2) Issue #5905: time.strftime() is now using the locale encoding,
instead of UTF-8, if the wcsftime() function is not available.
2011-12-09 20:21:17 +01:00
Victor Stinner 720f34a3e8 Issue #5905: time.strftime() is now using the locale encoding, instead of
UTF-8, if the wcsftime() function is not available.
2011-12-09 20:19:24 +01:00