Victor Stinner
bd206e27a4
Handle correctly _Py_fopen() error: don't replace the exception
2011-12-18 21:04:17 +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
136ea49b39
Issue #10951 : Fix a compiler warning in timemodule.c
2011-12-17 22:37:18 +01:00
Amaury Forgeot d'Arc
7e447c8224
Fix compilation warning on Windows
2011-12-17 10:23:14 +01:00
Antoine Pitrou
5136ac0ca2
Issue #13645 : pyc files now contain the size of the corresponding source
...
code, to avoid timestamp collisions (especially on filesystems with a low
timestamp resolution) when checking for freshness of the bytecode.
2012-01-13 18:52:16 +01:00
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
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
0b77ac32b2
Merge with 3.2 for #11006 .
2011-12-22 09:10:47 +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
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
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
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
Victor Stinner
b37b17423b
Replace PyUnicode_FromUnicode(NULL, 0) by PyUnicode_New(0, 0)
...
Create an empty string with the new Unicode API.
2011-12-01 03:18:59 +01:00
Victor Stinner
08b523a194
MultibyteCodec_Decode() catchs PyUnicode_AS_UNICODE() failures
2011-12-01 03:18:30 +01:00
Nadeem Vawda
59bb0e077f
Credit Per Øyvind Karlsen for the initial implementation of the lzma module (issue #6715 ).
2011-12-01 01:18:27 +02:00
Nadeem Vawda
3ff069ebc6
Issue #6715 : Add module for compression using the LZMA algorithm.
2011-11-30 00:25:06 +02:00
Victor Stinner
0fdfceb782
Issue #12567 : The curses module uses Unicode functions for Unicode arguments
...
when it is linked to the ncurses library. It encodes also Unicode strings to
the locale encoding instead of UTF-8.
2011-11-25 22:10:02 +01:00
Victor Stinner
984890fcbb
Close #13415 : Test in configure if unsetenv() has a return value or not.
...
Patch written by Charles-François Natali.
2011-11-24 13:53:38 +01:00
Benjamin Peterson
e8eb0e82f3
merge 3.2
2011-11-22 23:14:47 -06:00
Benjamin Peterson
4bb867d3ec
plug refleak
2011-11-22 23:12:49 -06:00
Antoine Pitrou
bc53032408
Issue #13458 : Fix a memory leak in the ssl module when decoding a certificate with a subjectAltName.
...
Patch by Robert Xiao.
2011-11-23 01:42:52 +01:00
Antoine Pitrou
116d6b98bf
Issue #13458 : Fix a memory leak in the ssl module when decoding a certificate with a subjectAltName.
...
Patch by Robert Xiao.
2011-11-23 01:39:19 +01:00
Victor Stinner
65170954e0
(Merge 3.2) Issue #13415 : os.unsetenv() doesn't ignore errors anymore.
2011-11-22 22:16:17 +01:00
Victor Stinner
60b385e813
Issue #13415 : os.unsetenv() doesn't ignore errors anymore.
2011-11-22 22:01:28 +01:00
Victor Stinner
63ab875cfe
Remove "#ifdef Py_UNICODE_WIDE": Python is now always wide
2011-11-22 03:31:20 +01:00
Victor Stinner
f8facacf30
Fix compiler warnings
2011-11-22 02:30:47 +01:00
Victor Stinner
9d3b93ba30
Use the new Unicode API
...
* Replace PyUnicode_FromUnicode(NULL, 0) by PyUnicode_New(0, 0)
* Replce PyUnicode_FromUnicode(str, len) by PyUnicode_FromWideChar(str, len)
* Replace Py_UNICODE by wchar_t
* posix_putenv() uses PyUnicode_FromFormat() to create the string, instead
of PyUnicode_FromUnicode() + _snwprintf()
2011-11-22 02:27:30 +01:00
Victor Stinner
ab1d16b456
Issue #13093 : Fix error handling on PyUnicode_EncodeDecimal()
...
* Add tests for PyUnicode_EncodeDecimal() and PyUnicode_TransformDecimalToASCII()
* Remove the unused "e" variable in replace()
2011-11-22 01:45:37 +01:00
Victor Stinner
42bf77537e
Rewrite PyUnicode_EncodeDecimal() to use the new Unicode API
...
Add tests for PyUnicode_EncodeDecimal() and
PyUnicode_TransformDecimalToASCII().
2011-11-21 22:52:58 +01:00
Antoine Pitrou
6dd381eb62
Issue #12328 : Under Windows, refactor handling of Ctrl-C events and
...
make _multiprocessing.win32.WaitForMultipleObjects interruptible when
the wait_flag parameter is false. Patch by sbt.
2011-11-21 21:26:56 +01:00
Antoine Pitrou
7fe601c5bf
Issue #13322 : Fix BufferedWriter.write() to ensure that BlockingIOError is
...
raised when the wrapped raw file is non-blocking and the write would block.
Previous code assumed that the raw write() would raise BlockingIOError, but
RawIOBase.write() is defined to returned None when the call would block.
Patch by sbt.
2011-11-21 20:22:01 +01:00
Antoine Pitrou
58fcf9f801
Issue #13322 : Fix BufferedWriter.write() to ensure that BlockingIOError is
...
raised when the wrapped raw file is non-blocking and the write would block.
Previous code assumed that the raw write() would raise BlockingIOError, but
RawIOBase.write() is defined to returned None when the call would block.
Patch by sbt.
2011-11-21 20:16:44 +01:00
Victor Stinner
ce0e7daf41
Remove temporary hacks for the issue #13441
2011-11-21 16:01:27 +01:00
Victor Stinner
a697b37300
Another temporary hack to debug the issue #13441
...
Dump the wchar_t that we are going to decode and dump the locale
2011-11-21 15:41:17 +01:00
Victor Stinner
da29cc36aa
Issue #13441 : _PyUnicode_CheckConsistency() dumps the string if the maximum
...
character is bigger than U+10FFFF and locale.localeconv() dumps the string
before decoding it.
Temporary hack to debug the issue #13441 .
2011-11-21 14:31:41 +01:00
Victor Stinner
4eea849469
CJK codecs checks for conversion to Py_UNICODE* failures
2011-11-21 03:01:27 +01:00
Victor Stinner
9a80faba88
MultibyteCodec_Encode() checks if PyUnicode_AS_UNICODE() failed
2011-11-21 02:50:14 +01:00
Victor Stinner
9e30aa52fd
Fix misuse of PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH()
...
And PyUnicode_GetSize() => PyUnicode_GetLength()
2011-11-21 02:49:52 +01:00
Victor Stinner
ea90e0fd95
ctypes check for PyUnicode_GET_SIZE() failure
2011-11-21 02:11:26 +01:00
Victor Stinner
8ef18872b4
test_widechar() uses the new Unicode API
...
PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH()
2011-11-21 02:06:57 +01:00
Victor Stinner
3335447646
Check for PyUnicode_AS_UNICODE() failure
2011-11-21 02:01:41 +01:00
Victor Stinner
2b979bfa3c
Use PyUnicode_CompareWithASCIIString() instead of Py_UNICODE_strcmp() to avoid
...
the deprecate Py_UNICODE type
2011-11-20 19:32:09 +01:00
Mark Dickinson
b96172e2cf
Issue #9530 : Fix undefined behaviour due to signed overflow in testcapi_long.h.
2011-11-19 17:58:15 +00:00
Antoine Pitrou
e532456965
Issue #13393 : In TextIOWrapper.read(n), try to read `n` characters as
...
once rather than limit ourselves to the default chunk size.
2011-11-19 00:39:01 +01:00
Ezio Melotti
adc417ce36
#13406 : fix more deprecation warnings and move the deprecation of unicode-internal earlier in the code.
2011-11-17 12:23:34 +02:00
Victor Stinner
74168975cc
socket_gethostname() uses a wchar_t* with PyMem_Malloc() to avoid the
...
old Unicode API.
2011-11-17 01:11:36 +01:00
Victor Stinner
f7c5ae2257
Issue #13374 : Deprecate os.getcwdb() on Windows
2011-11-16 23:43:07 +01:00
Ezio Melotti
11060a4a48
#13406 : silence deprecation warnings in test_codecs.
2011-11-16 09:39:10 +02:00
Antoine Pitrou
56a220ae4e
Issue #13393 : BufferedReader.read1() now asks the full requested size to
...
the raw stream instead of limiting itself to the buffer size.
2011-11-16 00:56:10 +01:00
Victor Stinner
1ab6c2d2c2
Issue #13374 : The Windows bytes API has been deprecated in the os module. Use
...
Unicode filenames instead of bytes filenames to not depend on the ANSI code
page anymore and to support any filename.
2011-11-15 22:27:41 +01:00
Antoine Pitrou
9a812cbc89
Issue #13389 : Full garbage collection passes now clear the freelists for
...
list and dict objects. They already cleared other freelists in the
interpreter.
2011-11-15 00:00:12 +01:00
Jesus Cea
d8b9ae6e8f
Issue #6397 : Support '/dev/poll' polling objects in select module, under Solaris & derivatives.
2011-11-14 19:07:41 +01:00
Antoine Pitrou
5c398e8395
Restore performance of special casings for utf-16 and utf-32 in TextIOWrapper
2011-11-13 04:11:37 +01:00
Antoine Pitrou
c28e2e53ba
In text I/O, optimize scanning for new lines with 1-byte unicode chars
2011-11-13 03:53:42 +01:00
Antoine Pitrou
c1b0bfdb04
Fix memory leak in io.StringIO
2011-11-12 22:34:28 +01:00
Antoine Pitrou
f72d4ef327
Plug some (unlikely) refleaks.
2011-11-12 18:05:15 +01:00
Florent Xicluna
e41f0de84d
Merge 3.2, fix typos.
2011-11-11 19:39:25 +01:00
Florent Xicluna
992d9e081f
Fix few typos.
2011-11-11 19:35:42 +01:00
Antoine Pitrou
de20b0b50e
Issue #13149 : Speed up append-only StringIO objects.
...
This is very similar to the "lazy strings" idea.
2011-11-10 21:47:38 +01:00
Victor Stinner
9f4b1e9c50
Fix and deprecated the unicode_internal codec
...
unicode_internal codec uses Py_UNICODE instead of the real internal
representation (PEP 393: Py_UCS1, Py_UCS2 or Py_UCS4) for backward
compatibility.
2011-11-10 20:56:30 +01:00
Victor Stinner
87a7c825f0
Fix build on Windows
2011-11-10 20:05:55 +01:00
Charles-François Natali
10b8cf4455
Issue #7777 : socket: Add Reliable Datagram Sockets (PF_RDS) support.
2011-11-10 19:21:37 +01:00
Martin v. Löwis
1db7c13be1
Port encoders from Py_UNICODE API to unicode object API.
2011-11-10 18:24:32 +01:00
Ezio Melotti
df8077ecd3
#13379 : merge with 3.2.
2011-11-10 09:37:43 +02:00
Ezio Melotti
98d2c0aba3
#13379 : update Unicode version in unicodedata docstrings and comments.
2011-11-10 09:36:34 +02:00
Victor Stinner
6139c1bfa3
Issue #12442 : nt._getdiskusage() is now using the Windows Unicode API
2011-11-09 22:14:14 +01:00
Jesus Cea
d03a49150f
Commit 59dca1e2363d for issue #13327 introduced a compilation warning
2011-11-08 17:28:04 +01:00
Brian Curtin
569b494320
Fix #13327 . utimensat now has the atime and mtime arguments set as optional,
...
defaulting to None like the other utimes family members. It now accepts
keyword arguments because, unlike other other functions in the family,
it has a `flags` value at the end of the argument list (which
retains its 0 default).
2011-11-07 16:09:20 -06:00
Brian Curtin
7ef53ef916
Forgot to apply the futimesat change.
2011-11-07 14:38:24 -06:00
Brian Curtin
c1b65d1831
Fix 13327. Remove explicit None arguments from futimes, futimens, futimesat,
...
and lutimes.
2011-11-07 14:18:54 -06:00
Brian Curtin
b0d5b5d3b2
Adjust None handling to be a bit more clean. Thanks to Benjamin
...
for pointing it out.
2011-11-07 10:51:18 -06:00
Brian Curtin
52fbea1d87
Fix #13327 . Remove the need for an explicit None as the second argument to
...
os.utime in order to update to the current time. The second argument is now
optional.
2011-11-06 13:41:17 -06:00
Amaury Forgeot d'Arc
864741b2c7
Issue #13350 : Replace most usages of PyUnicode_Format by PyUnicode_FromFormat.
2011-11-06 15:10:48 +01:00
Victor Stinner
3d7acb08c4
Issue #12342 : Fix compilation on Mac OS X
2011-11-04 09:49:24 +01:00
Ross Lagerwall
ab1078b987
(Merge 3.2) Issue #13339 .
2011-11-04 07:15:35 +02:00
Ross Lagerwall
dcfde5aac9
Issue #13339 : Fix compile error in posixmodule.c due to missing semicolon.
...
Thanks to Robert Xiao.
2011-11-04 07:09:14 +02:00
Victor Stinner
6777e6f9b1
(Merge 3.2) Issue #12342 : Improve _tkinter error message on unencodable character
2011-11-04 00:43:35 +01:00
Victor Stinner
7ab4192e82
Issue #12342 : Improve _tkinter error message on unencodable character
2011-11-04 00:36:46 +01:00
Victor Stinner
65f51bb150
(Merge 3.2) Issue #10570 : curses.putp() is now expecting a byte string, instead
...
of a Unicode string.
This is an incompatible change, but putp() is used to emit terminfo commands,
which are bytes strings, not Unicode strings.
2011-11-03 20:36:55 +01:00
Victor Stinner
b3bc7e764d
Issue #10570 : curses.putp() is now expecting a byte string, instead of a
...
Unicode string.
This is an incompatible change, but putp() is used to emit terminfo commands,
which are bytes strings, not Unicode strings.
2011-11-03 20:35:40 +01:00
Victor Stinner
df5bccc8a3
(Merge 3.2) Issue #10570 : curses.tigetstr() is now expecting a byte string,
...
instead of a Unicode string.
This is an incompatible change, but the previous behaviour was completly wrong.
2011-11-02 23:47:58 +01:00
Victor Stinner
2662133a05
Issue #10570 : curses.tigetstr() is now expecting a byte string, instead of a
...
Unicode string.
This is an incompatible change, but the previous behaviour was completly wrong.
2011-11-02 23:45:29 +01:00
Charles-François Natali
23e1ecbd66
Issue #13324 : fcntlmodule: Add the F_NOCACHE flag. Patch by Alex Stewart.
2011-11-02 18:58:25 +01:00
Martin v. Löwis
23e275b3ad
Port UCS1 and charmap codecs to new API.
2011-11-02 18:02:51 +01:00
Florent Xicluna
91d5193b3a
Closes #2892 : preserve iterparse events in case of SyntaxError.
2011-11-01 23:31:09 +01:00
Martin v. Löwis
5f4f4c5960
Replace Py_UNICODE_strchr with PyUnicode_FindChar.
2011-11-01 18:42:23 +01:00
Florent Xicluna
f24e7e6c41
Merge 3.2: issue #2892
2011-11-01 23:33:14 +01:00
Florent Xicluna
c45fb25fba
Issue #13255 : wrong docstrings in array module.
2011-10-24 13:14:55 +02:00
Senthil Kumaran
202a3c422b
3.2 - Fix Issue 12604 - Use a proper no-op macro expansion for VTRACE macro in _sre.c
2011-10-20 02:15:36 +08:00
Victor Stinner
8d91d454d5
Issue #10653 : Fix time.strftime() on Windows, check for invalid format strings
2011-10-16 23:45:39 +02:00
Martin v. Löwis
767046aab1
Replace {Get,Set,Has}AttrString with *AttrId.
2011-10-14 15:35:36 +02:00
Ross Lagerwall
59142db6d3
Issue #12797 : Added custom opener parameter to builtin open() and FileIO.open().
2011-10-31 20:34:46 +02:00
Martin v. Löwis
5156f2ca9a
Drop unused variable.
2011-10-31 09:05:10 +01:00
Martin v. Löwis
cfa6129276
Fix typo.
2011-10-31 09:01:22 +01:00
Martin v. Löwis
a72e78b3b1
Replace Py_UCS4_ API with Unicode API.
2011-10-31 08:33:37 +01:00
Antoine Pitrou
41032a69c1
Issue #11183 : Add finer-grained exceptions to the ssl module, so that
...
you don't have to inspect the exception's attributes in the common case.
2011-10-27 23:56:55 +02:00
Victor Stinner
cb98bed299
Issue #12619 : Expose socket.SO_BINDTODEVICE constant
2011-10-25 13:45:48 +02:00
Victor Stinner
8b905bd9d4
Issue #13226 : Add RTLD_xxx constants to the os module. These constants can by
...
used with sys.setdlopenflags().
2011-10-25 13:34:04 +02:00
Victor Stinner
e0be423297
Close #10278 : Add clock_getres(), clock_gettime() and CLOCK_xxx constants to
...
the time module. time.clock_gettime(time.CLOCK_MONOTONIC) provides a monotonic
clock
2011-10-25 13:06:09 +02:00
Ezio Melotti
90bf5f1171
Remove mention of narrow/wide builds and update array doc, add a test.
2011-10-25 10:05:34 +03:00
Florent Xicluna
6a985c3549
Merge 3.2.
2011-10-24 13:17:27 +02:00
Antoine Pitrou
a0e0e23299
Add a docstring to SSLError
2011-10-22 23:41:52 +02:00
Antoine Pitrou
b7705b7792
Use PyExc_OSError directly instead of grabbing it from the socket module API
2011-10-22 23:37:51 +02:00
Ezio Melotti
4837e39b08
#12753 : fix compilation on Windows.
2011-10-22 00:24:17 +03:00
Ezio Melotti
931b8aac80
#12753 : Add support for Unicode name aliases and named sequences.
2011-10-21 21:57:36 +03:00
Senthil Kumaran
c6b4ef105e
default - Fix closes Issue 12604 - Use a proper no-op macro expansion for VTRACE macro in _sre.c
...
Patch by Petri Lehtinen and Josh Triplett.
2011-10-20 02:16:59 +08:00
Victor Stinner
3a50e7056e
Issue #12281 : Rewrite the MBCS codec to handle correctly replace and ignore
...
error handlers on all Windows versions. The MBCS codec is now supporting all
error handlers, instead of only replace to encode and ignore to decode.
2011-10-18 21:21:00 +02:00
Victor Stinner
5a3ff79fd6
Issue #10653 : Fix time.strftime() on Windows, check for invalid format strings
2011-10-16 19:08:23 +02:00
Martin v. Löwis
1c67dd9b15
Port SetAttrString/HasAttrString to SetAttrId/GetAttrId.
2011-10-14 15:16:45 +02:00
Martin v. Löwis
bd928fef42
Rename _Py_identifier to _Py_IDENTIFIER.
2011-10-14 10:20:37 +02:00
Victor Stinner
792b47f6ca
(Merge 3.2) Issue #10653 : On Windows, use strftime() instead of wcsftime()
...
because wcsftime() doesn't format time zone correctly.
2011-10-14 02:39:06 +02:00
Victor Stinner
c1f32ca0ad
Issue #10653 : On Windows, use strftime() instead of wcsftime() because
...
wcsftime() doesn't format time zone correctly.
2011-10-14 02:36:13 +02:00
Victor Stinner
f5cff56a1b
Issue #13088 : Add shared Py_hexdigits constant to format a number into base 16
2011-10-14 02:13:11 +02:00
Nadeem Vawda
72d6a13413
Merge #13159 : Replace FileIO's quadratic-time buffer growth algorithm with a linear-time one.
...
Also fix the bz2 module, which suffered from the same problem.
2011-10-13 13:38:14 +02:00
Nadeem Vawda
d41a98bdd9
Issue #13159 : Replace FileIO's quadratic-time buffer growth algorithm with a linear-time one.
...
Also fix the bz2 module, whose classes used the same algorithm.
2011-10-13 13:34:16 +02:00
Antoine Pitrou
6b4883dec0
PEP 3151 / issue #12555 : reworking the OS and IO exception hierarchy.
2011-10-12 02:54:14 +02:00
Victor Stinner
c5af7730e3
Fix FileIO.readall() (new_buffersize()) for large files
...
Truncate the buffer size to PY_SSIZE_T_MAX.
2011-10-11 23:00:31 +02:00
Victor Stinner
a2a6477ba0
Fix io.FileIO.readall() on Windows 64 bits
...
Use Py_off_t type (64 bits) instead of off_t (32 bits).
2011-10-11 22:45:02 +02:00
Victor Stinner
2c5d3cbfb8
Fix a compiler warning in _locale
2011-10-11 22:35:52 +02:00
Victor Stinner
3f528f0c1b
Fix a compiler warning in zipimport
2011-10-11 22:28:56 +02:00
Victor Stinner
d9c0631d77
Strip trailing spaces in _json.c
2011-10-11 21:56:19 +02:00
Victor Stinner
c4f281eba3
Fix misuse of PyUnicode_GET_SIZE, use PyUnicode_GET_LENGTH instead
2011-10-11 22:11:42 +02:00
Victor Stinner
beac78bb24
Use PyUnicode_AsUnicodeAndSize() instead of PyUnicode_GET_SIZE()
2011-10-11 21:55:01 +02:00
Antoine Pitrou
699cd9f7f1
Remove unused variable
2011-10-11 04:06:47 +02:00
Martin v. Löwis
1ee1b6fe0d
Use identifier API for PyObject_GetAttrString.
2011-10-10 18:11:30 +02:00
Martin v. Löwis
afe55bba33
Add API for static strings, primarily good for identifiers.
...
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
2011-10-09 10:38:36 +02:00
Charles-François Natali
30589c9041
Issue #10141 : fix socketmodule compilation on Linux systems with <linux/can.h>
...
but without AF_CAN definition.
2011-10-07 22:47:08 +02:00
Martin v. Löwis
c47adb04b3
Change PyUnicode_KIND to 1,2,4. Drop _KIND_SIZE and _CHARACTER_SIZE.
2011-10-07 20:55:35 +02:00
Antoine Pitrou
72ca65dce4
Fix a Py_UCS4 / Py_UNICODE mixup.
...
This worked under Unix because wchar_t is 4 bytes wide.
2011-10-07 04:35:30 +02:00
Antoine Pitrou
77ea6409ef
Migrate the _csv module to the new unicode APIs
...
(except for a Py_UNICODE_strchr() call)
2011-10-07 04:26:55 +02:00
Benjamin Peterson
17a332ac1b
fix compiler warnings
2011-10-06 17:06:25 -04:00
Charles-François Natali
47413c1171
Issue #10141 : socket: add SocketCAN (PF_CAN) support. Initial patch by Matthias
...
Fuchs, updated by Tiago Gonçalves.
2011-10-06 19:47:44 +02:00
Antoine Pitrou
90c30e87be
Remove now duplicate code in _json.c; instead, reuse the new private lib
2011-10-06 19:09:51 +02:00
Antoine Pitrou
1d4bd25f56
Fix compilation warnings under 64-bit Windows
2011-10-06 15:44:15 +02:00
Antoine Pitrou
45d9c91d4b
Issue #3163 : The struct module gets new format characters 'n' and 'N'
...
supporting C integer types `ssize_t` and `size_t`, respectively.
2011-10-06 15:27:40 +02:00
Charles-François Natali
42c28cdd1d
Issue #13070 : Fix a crash when a TextIOWrapper caught in a reference cycle
...
would be finalized after the reference to its underlying BufferedRWPair's
writer got cleared by the GC.
2011-10-05 19:53:43 +02:00
Antoine Pitrou
ed8ba14441
Remove all other uses of the C tolower()/toupper() which could break with a Turkish locale.
2011-10-04 13:50:21 +02:00
Antoine Pitrou
1665d2c75f
Issue #13099 : Fix sqlite3.Cursor.lastrowid under a Turkish locale.
...
Reported and diagnosed by Thomas Kluyver.
2011-10-04 13:35:28 +02:00
Antoine Pitrou
1e44fecc52
Issue #13087 : BufferedReader.seek() now always raises UnsupportedOperation
...
if the underlying raw stream is unseekable, even if the seek could be
satisfied using the internal buffer. Patch by John O'Connor.
2011-10-04 12:26:20 +02:00
Antoine Pitrou
ffd41d9f10
Issue #7689 : Allow pickling of dynamically created classes when their
...
metaclass is registered with copyreg. Patch by Nicolas M. Thiéry and
Craig Citro.
2011-10-04 09:23:04 +02:00
Meador Inge
1efb33a682
Issue #12881 : ctypes: Fix segfault with large structure field names.
2011-10-03 21:44:22 -05:00
Charles-François Natali
b619bb27ed
Issue #13070 : Fix a crash when a TextIOWrapper caught in a reference cycle
...
would be finalized after the reference to its underlying BufferedRWPair's
writer got cleared by the GC.
2011-10-05 19:55:56 +02:00
Victor Stinner
e1335c711c
Fix usage og PyUnicode_READY()
2011-10-04 20:53:03 +02:00
Antoine Pitrou
061fe34262
Remove all other uses of the C tolower()/toupper() which could break with a Turkish locale.
2011-10-04 13:53:01 +02:00
Antoine Pitrou
8e4dd08f23
Issue #13099 : Fix sqlite3.Cursor.lastrowid under a Turkish locale.
...
Reported and diagnosed by Thomas Kluyver.
2011-10-04 13:37:06 +02:00
Antoine Pitrou
b244d075fb
Fix compilation error under Windows
2011-10-04 13:00:02 +02:00
Antoine Pitrou
bf009f0bce
Issue #13087 : BufferedReader.seek() now always raises UnsupportedOperation
...
if the underlying raw stream is unseekable, even if the seek could be
satisfied using the internal buffer. Patch by John OConnor.
2011-10-04 12:28:52 +02:00
Antoine Pitrou
75e78b6c77
Use the faulthandler module's infrastructure to write a GIL-less
...
memory watchdog for timely stats collection.
2011-10-04 11:51:23 +02:00
Antoine Pitrou
5a688dbf97
Issue #7689 : Allow pickling of dynamically created classes when their
...
metaclass is registered with copyreg. Patch by Nicolas M. Thiéry and
Craig Citro.
2011-10-04 09:25:28 +02:00
Meador Inge
29f43f7368
Issue #12881 : ctypes: Fix segfault with large structure field names.
2011-10-03 21:48:30 -05:00
Victor Stinner
67002af323
Check error when calling PyUnicode_AppendAndDel()
2011-10-02 20:35:10 +02:00
Antoine Pitrou
a02a12c517
Issue #13034 : When decoding some SSL certificates, the subjectAltName extension could be unreported.
2011-10-01 19:22:30 +02:00
Antoine Pitrou
d8c347a8de
Issue #13034 : When decoding some SSL certificates, the subjectAltName extension could be unreported.
2011-10-01 19:20:25 +02:00
Victor Stinner
9e5bd6c544
pyexat uses the new Unicode API
2011-10-01 01:05:40 +02:00
Victor Stinner
034f6cf10c
Add PyUnicode_Copy() function, include it to the public API
2011-09-30 02:26:44 +02:00
Victor Stinner
1fe99a2ea7
Fix a compiler warning
2011-09-30 01:55:49 +02:00
Victor Stinner
1fbcaeff55
Fix array.array('u') constructor
2011-09-30 01:54:04 +02:00
Victor Stinner
eb5657a0c5
posix module catches PyUnicode_AsUnicode() failure
...
* Replace PyUnicode_AS_UNICODE by PyUnicode_AsUnicode, PyUnicode_AS_UNICODE is
no more a real macro
* Replace Py_UNICODE by wchar_t in code specific to Windows
2011-09-30 01:44:27 +02:00
Victor Stinner
8dba4e004f
array module uses the new Unicode API
...
* Use Py_UCS4* buffer instead of Py_UNICODE*
* Use "I" or "L" format, instead of "u" format
2011-09-30 00:51:10 +02:00
Victor Stinner
f8bb7d02f6
array module stores the typecode in a char, instead of Py_UNICODE
2011-09-30 00:03:59 +02:00
Victor Stinner
c806fdcd8b
raw_unicode_escape() uses the new Unicode API
2011-09-29 23:50:23 +02:00
Victor Stinner
121aab4ba1
Strip trailing spaces of _pickle.c
2011-09-29 23:40:53 +02:00
Victor Stinner
6364927cec
PyLocale_strxfrm() uses the new Unicode API
2011-09-29 23:32:06 +02:00
Victor Stinner
fe9a861e74
fileio_init() checks for failure on conversion to Py_UNICODE*
2011-09-29 23:19:04 +02:00
Charles-François Natali
9624a764ff
Issue #13058 : ossaudiodev: fix a file descriptor leak on error. Patch by Thomas
...
Jarosch.
2011-09-29 19:49:37 +02:00
Charles-François Natali
5a4a109694
Issue #13058 : ossaudiodev: fix a file descriptor leak on error. Patch by Thomas
...
Jarosch.
2011-09-29 19:46:37 +02:00
Martin v. Löwis
22970667da
Port normalization to new API.
2011-09-29 13:39:38 +02:00
Victor Stinner
f7b8cb605d
_io.textio: fix character type, use Py_UCS4 instead of Py_UNICODE
2011-09-29 03:28:17 +02:00
Victor Stinner
0058b8603f
_sre: don't use Py_UNICODE anymore
...
* Downcasting from Py_UCS4 to Py_UNICODE is wrong is Py_UNICODE is 16-bit
wchar_t
* Remove old special case in getstring(), unicode is now handled separetely
2011-09-29 03:27:47 +02:00
Victor Stinner
639418812f
Use the new Py_ARRAY_LENGTH macro
2011-09-29 00:42:28 +02:00
Ezio Melotti
7c8c1ea3ec
Fix whitespace.
2011-09-29 01:00:19 +03:00
Ezio Melotti
2aa2b3b4d5
Clean up a few tabs that went in with PEP393.
2011-09-29 00:58:57 +03:00
Georg Brandl
4cb0de246c
Rename new macros to conform to naming rules (function macros have "Py" prefix, not "PY").
2011-09-28 21:49:49 +02:00
Martin v. Löwis
d63a3b8beb
Implement PEP 393.
2011-09-28 07:41:54 +02:00
Meador Inge
48d49497c5
Issue #13013 : ctypes: Fix a reference leak in PyCArrayType_from_ctype.
...
Thanks to Suman Saha for finding the bug and providing a patch.
2011-09-27 20:52:04 -05:00
Meador Inge
b86ecf4bd1
Issue #13013 : ctypes: Fix a reference leak in PyCArrayType_from_ctype.
...
Thanks to Suman Saha for finding the bug and providing a patch.
2011-09-27 20:45:30 -05:00
Mark Dickinson
c7d93b7614
Issue #1621 : Fix undefined behaviour from signed overflow in datetime module hashes, array and list iterations, and get_integer (stringlib/string_format.h)
2011-09-25 15:34:32 +01:00
Mark Dickinson
50203a69b3
Return +-Py_HUGE_VAL for tgamma(+-0) instead of risking FP exceptions by computing 1.0 / 0.0.
2011-09-25 15:26:43 +01:00
Charles-François Natali
dc863ddf79
Issue #12981 : rewrite multiprocessing_{sendfd,recvfd} in Python.
2011-09-24 20:04:29 +02:00
Mark Dickinson
a61b053e61
Merge #12973 itertools fix.
2011-09-24 08:57:00 +01:00
Mark Dickinson
b2f6bc72a2
Issue #12973 : Fix itertools bug caused by signed integer overflow. Thanks Stefan Krah.
2011-09-24 08:56:09 +01:00
Benjamin Peterson
3454d52434
merge 3.2
2011-09-23 13:53:06 -04:00
Benjamin Peterson
adde86d0e3
fix compiler compliant about \0 not being an opcode
2011-09-23 13:41:41 -04:00
Jesus Cea
41c98a3207
Close #13022 : _multiprocessing.recvfd() doesn't check that file descriptor was actually received
2011-09-21 03:56:05 +02:00
Jesus Cea
4507e6456e
Close #13022 : _multiprocessing.recvfd() doesn't check that file descriptor was actually received
2011-09-21 03:53:25 +02:00
Meador Inge
1c9f0c93ad
Issue #1172711 : Add 'long long' support to the array module.
...
Initial patch by Oren Tirosh and Hirokazu Yamamoto.
2011-09-20 19:55:51 -05:00
Victor Stinner
6fa6777503
os.statvfs() encodes the filename to the filesystem encoding
2011-09-20 04:04:33 +02:00
Ross Lagerwall
b1e5d595af
Issue #12517 : Silence warning on windows buildbots (from 7fd80c61ddaa).
2011-09-19 08:30:43 +02:00
Benjamin Peterson
9428d53eb4
only compile xattrs on glibc ( closes #12720 )
2011-09-14 11:45:52 -04:00
Benjamin Peterson
b77fe17320
Use xattr functions from sys/xattr.h instead of attr/xattr.h ( closes #12720 )
...
sys/xattr.h is glibc while attr/xattr.h is a separate library.
2011-09-13 17:20:47 -04:00
Amaury Forgeot d'Arc
65604b51e0
Merge 3.2: Issue #12483 : ctypes: Fix a crash when the destruction of a callback
...
object triggers the garbage collector.
2011-09-12 21:09:12 +02:00
Amaury Forgeot d'Arc
bbe46d63ee
Issue #12483 : ctypes: Fix a crash when the destruction of a callback
...
object triggers the garbage collector.
2011-09-12 21:03:36 +02:00
Nadeem Vawda
64d25ddb9c
Issue #12306 : Add ZLIB_RUNTIME_VERSION to the zlib module.
...
While we're at it, also document ZLIB_VERSION.
Patch by Torsten Landschoff.
2011-09-12 00:04:13 +02:00
Jesus Cea
ab7060e502
Close #12950 : multiprocessing "test_fd_transfer" fails under OpenIndiana
2011-09-10 04:04:09 +02:00
Jesus Cea
bbd8bec389
Close #12950 : multiprocessing "test_fd_transfer" fails under OpenIndiana
2011-09-10 04:04:09 +02:00
Jesus Cea
54b01498e3
Typo
2011-09-10 01:53:19 +02:00
Jesus Cea
9c82227277
Yet another fix for #12763 : test_posix failure on OpenIndiana
2011-09-10 01:40:52 +02:00
Jesus Cea
f2cb4e8b35
Close issue 12952: Solaris/Illumos (OpenIndiana) Scheduling policies
2011-09-09 23:55:42 +02:00
Larry Hastings
9e3e70b331
Issue #12904 : os.utime, os.futimes, os.lutimes, and os.futimesat now write
...
atime and mtime with nanosecond precision on modern POSIX platforms.
2011-09-08 19:29:07 -07:00
Nadeem Vawda
3d5881ec2b
Issue #12909 : Make PyLong_As* functions consistent in their use of exceptions.
...
PyLong_AsDouble() and PyLong_AsUnsignedLongLong() now raise TypeError (rather
than SystemError) when passed a non-integer argument, matching the behavior of
all the other PyLong_As*() functions.
2011-09-07 21:40:26 +02:00
Victor Stinner
425fcd3045
Issue #12929 : faulthandler now uses char* for arithmetic on pointers
...
instead of void*
2011-09-07 16:18:56 +02:00
Charles-François Natali
ea0d5fcb4a
Issue #12871 : sched_get_priority_(min|max) might not be defined even though
...
<sched.h> is available (most notably on OpenBSD when built without pthread):
add an explicit configure check.
2011-09-06 19:03:35 +02:00
Benjamin Peterson
388c0e2325
merge heads
2011-09-06 07:57:38 -04:00
Benjamin Peterson
6d8f744730
merge 3.2 ( #1616 )
2011-09-06 07:56:47 -04:00
Benjamin Peterson
f22913b8c3
cast to getter
2011-09-06 07:55:34 -04:00
Victor Stinner
71e44cb97f
Issue #12567 : Add curses.unget_wch() function
...
Push a character so the next get_wch() will return it.
2011-09-06 01:53:03 +02:00
Benjamin Peterson
9fd5374d4e
merge 3.2 ( #12878 )
2011-09-03 09:32:24 -04:00
Benjamin Peterson
f6f3a35447
add a __dict__ descr for IOBase ( closes #12878 )
2011-09-03 09:26:20 -04:00
Amaury Forgeot d'Arc
842d921a79
ctypes: Slightly better error message when a struct field name is not a string.
2011-09-02 23:07:54 +02:00
Amaury Forgeot d'Arc
9b20e27c01
Merge from 3.2: Issue #12764 : Fix a crash in ctypes when the name of a
...
Structure field is not a string.
2011-09-02 20:43:59 +02:00
Amaury Forgeot d'Arc
02dd539dbb
Issue #12764 : Fix a crash in ctypes when the name of a Structure field is not
...
a string.
2011-09-02 20:39:40 +02:00
Benjamin Peterson
799bd80d8a
expose linux extended file system attributes ( closes #12720 )
2011-08-31 22:15:17 -04:00
Amaury Forgeot d'Arc
dd2f8b0b77
Merge from 3.2:
...
- Issue #9651 : Fix a crash when ctypes.create_string_buffer(0) was passed to file.write()
- Issue #11241 : subclasses of ctypes.Array can now be subclassed.
2011-08-30 22:07:20 +02:00