Commit graph

5239 commits

Author SHA1 Message Date
Georg Brandl
6269fec171 #4228: Pack negative values the same way as 2.4
in struct's L format.
2009-01-01 12:15:31 +00:00
Hirokazu Yamamoto
3cda1db67f Just inserted blank line. 2008-12-31 05:47:19 +00:00
Hirokazu Yamamoto
52c1e3cc08 Fixed compile error on windows. 2008-12-31 05:24:37 +00:00
Nick Coghlan
180e400766 Issue #4701: implicitly call PyType_Ready from PyObject_Hash 2008-12-30 01:18:48 +00:00
Martin v. Löwis
03824e45f6 Issue #1040026: Fix os.times result on systems where HZ is incorrect. 2008-12-29 18:17:34 +00:00
Benjamin Peterson
7af65568ff #4764 in io.open, set IOError.filename when trying to open a directory on POSIX platforms 2008-12-29 17:56:58 +00:00
Alexandre Vassalotti
f852bf97ef Fix issue #4730: cPickle corrupts high-unicode strings.
Update outdated copy of PyUnicode_EncodeRawUnicodeEscape.
Add a test case.
2008-12-27 07:08:47 +00:00
Benjamin Peterson
e098c4abe5 make global static 2008-12-23 20:12:33 +00:00
Benjamin Peterson
b6a53b5c52 use a global variable, so the compiler doesn't optimize the assignment out 2008-12-23 20:09:28 +00:00
Benjamin Peterson
5423abd182 silence compiler warning 2008-12-22 22:12:19 +00:00
Benjamin Peterson
4caef5c7e2 fix #4720: the format to PyArg_ParseTupleAndKeywords can now start with '|' 2008-12-22 20:51:15 +00:00
Benjamin Peterson
9de7298102 remove redundant sentence 2008-12-20 22:49:24 +00:00
Benjamin Peterson
fed67fd41e beef up docstring 2008-12-20 02:57:19 +00:00
Antoine Pitrou
73c0e65fc3 Issue #2467: gc.DEBUG_STATS reports invalid elapsed times.
Patch by Neil Schemenauer, very slightly modified.
2008-12-17 22:46:54 +00:00
Amaury Forgeot d'Arc
31949b9108 #3954: Fix error handling code in _hotshot.logreader
Will port to 2.6. hotshot was deleted from python 3.
2008-12-15 21:47:57 +00:00
Nick Coghlan
a2053475bb Fix several issues relating to access to source code inside zipfiles. Initial work by Alexander Belopolsky. See Misc/NEWS in this checkin for details. 2008-12-14 10:54:50 +00:00
Mark Dickinson
4c96fa5525 Issues #3167, #3682: tests for math.log and math.log10 were failing on
Solaris and OpenBSD.  Fix this by handling special values and domain
errors directly in mathmodule.c, passing only positive nonspecial floats
to the system log/log10.
2008-12-11 19:28:08 +00:00
Skip Montanaro
45313fe6e0 issue 4483 - dbm build failures on systems with gdbm_compat lib. 2008-12-06 17:43:30 +00:00
Georg Brandl
fe879e8a23 #4529: fix parser's validation for try-except-finally statements. 2008-12-05 12:09:41 +00:00
Christian Heimes
dee3c9c606 Issue #4025 again
Converted a C99 style comment to a C89 style comment (found by MAL).
2008-12-03 00:53:18 +00:00
Jeremy Hylton
0d52182f67 Move definition int sval into branch of ifdef where it is used.
Otherwise, you get a warning about an undefined variable.
2008-11-28 23:42:59 +00:00
Matthias Klose
4de979153e - Modules/Setup.dist: Update _elementtree, add _bisect, datetime 2008-11-27 10:14:22 +00:00
Matthias Klose
b0c3c026a0 - Modules/Setup.dist: Update pyexpat 2008-11-27 07:45:25 +00:00
Matthias Klose
7fab0dcdd4 - Modules/Setup.dist: Mention _elementtree and _pickle. 2008-11-26 17:32:49 +00:00
Benjamin Peterson
9dfe6a8862 #4396 make the parser module correctly validate the with syntax 2008-11-24 04:09:03 +00:00
Matthias Klose
75bfcbaf88 - Fix typo in last checkin 2008-11-23 13:54:42 +00:00
Matthias Klose
225d60c31e - Modules/Setup.dist: Mention _functools in section "Modules that should
always be present (non UNIX dependent)"
2008-11-23 13:37:03 +00:00
Benjamin Peterson
bfc51567f5 backport r67325: make FileIO.mode always contain 'b' 2008-11-22 01:59:15 +00:00
Amaury Forgeot d'Arc
322656596a Fixed issue #4233.
Changed semantic of _fileio.FileIO's close()  method on file objects with closefd=False.
The file descriptor is still kept open but the file object behaves like a closed file.
The FileIO  object also got a new readonly attribute closefd.

Approved by Barry

Backport of r67106 from the py3k branch
2008-11-20 23:34:31 +00:00
Amaury Forgeot d'Arc
7cfe7ea745 #4317: Fix an Array Bounds Read in imageop.rgb2rgb8.
Will backport to 2.4.
2008-11-18 22:19:37 +00:00
Hirokazu Yamamoto
ed29bb49f8 Issue #4071: ntpath.abspath returned an empty string for long unicode path. 2008-11-08 03:46:17 +00:00
Martin v. Löwis
bb86d83134 Issue #4204: Fixed module build errors on FreeBSD 4. 2008-11-04 20:40:09 +00:00
Benjamin Peterson
6624a9fddd #4048 make the parser module accept relative imports as valid 2008-11-03 15:14:51 +00:00
Benjamin Peterson
dcee09d920 make sure the parser flags and passed onto the compiler
This fixes "from __future__ import unicode_literals" in an exec statment
See #4225
2008-10-31 02:16:05 +00:00
Christian Heimes
ab5f879022 Issue #4237: io.FileIO() was raising invalid warnings caused by insufficient initialization of PyFileIOObject struct members. 2008-10-30 21:26:15 +00:00
Amaury Forgeot d'Arc
69a9c5b539 Issue #4176: Pickle would crash the interpreter when a __reduce__ function
does not return an iterator for the 4th and 5th items.
(sequence-like and mapping-like state)

A list is not an iterator...

Will backport to 2.6 and 2.5.
2008-10-30 21:18:34 +00:00
Amaury Forgeot d'Arc
9f616f48ca Correct error message in io.open():
closefd=True is the only accepted value with a file name.
2008-10-29 23:15:57 +00:00
Benjamin Peterson
336680ecea fix more possible ref leaks in _json and use Py_CLEAR 2008-10-16 21:48:06 +00:00
Benjamin Peterson
87e6ad290b fix possible ref leak 2008-10-16 21:27:54 +00:00
Benjamin Peterson
595e3cbb3d check for error conditions in _json #3623 2008-10-16 21:09:28 +00:00
Hirokazu Yamamoto
61376409a9 removed unused _PyUnicode_FromFileSystemEncodedObject.
made win32_chdir, win32_wchdir static.
2008-10-16 06:25:25 +00:00
Amaury Forgeot d'Arc
07d539d08b #4122: On Windows, Py_UNICODE_ISSPACE cannot be used in an extension module:
compilation fails with "undefined reference to _Py_ascii_whitespace"

Will backport to 2.6.
2008-10-14 21:47:22 +00:00
Hirokazu Yamamoto
6c75a30712 r66862 contained memory leak. 2008-10-09 10:11:21 +00:00
Hirokazu Yamamoto
10a018c285 On windows, os.chdir given unicode was not working if GetCurrentDirectoryW
returned a path longer than MAX_PATH. (But It's doubtful this code path is
really executed because I cannot move to such directory on win2k)
2008-10-09 10:00:30 +00:00
Georg Brandl
f3776a17ef #3935: properly support list subclasses in the C impl. of bisect.
Patch reviewed by Raymond.
2008-10-08 18:47:17 +00:00
Andrew M. Kuchling
658c45fd3b Docstring typo. 2008-10-03 12:26:42 +00:00
Christian Heimes
32a66a0410 Fixed a couple more C99 comments and one occurence of inline. 2008-10-02 19:47:50 +00:00
Brett Cannon
f40200b214 Fix a refleak introduced by r66677.
Fix suggested by Amaury Forgeot d'Arc.
Closes issue #4003.
2008-09-30 17:46:03 +00:00
Benjamin Peterson
0225248033 Victor Stinner's patches to check the return result of PyLong_Ssize_t
reviewed by Amaury
2008-09-30 02:11:07 +00:00
Benjamin Peterson
8d77d448a5 fix security issue 2: imageop's poor validation of arguments could result in segfaults
patch by Victor Stinner
reviewed by myself and Brett
2008-09-30 01:31:49 +00:00