Commit Graph

3626 Commits

Author SHA1 Message Date
Georg Brandl 38387b8b91 bug [ 728515 ] mmap's resize method resizes the file in win32 but not unix 2005-08-24 07:17:40 +00:00
Gregory P. Smith 26292a3af0 Remove the C99 "ULL" suffix from the 64bit unsigned long constants.
VC++6 doesn't accept them.

This *will* result in tons of the following warning from gcc 3.x:
(gcc "2.96ish" doesn't issue this warning)

 warning: integer constant is too large for "long" type

the code compiles fine regardless.  squashing the gcc warnings
is the next task.

Would someone on windows please confirm that this does or does not
compile and if it does or does not pass the test_hashlib.py unit
tests.
2005-08-23 21:30:03 +00:00
Gregory P. Smith f21a5f7739 [ sf.net patch # 1121611 ]
A new hashlib module to replace the md5 and sha modules.  It adds
support for additional secure hashes such as SHA-256 and SHA-512.  The
hashlib module uses OpenSSL for fast platform optimized
implementations of algorithms when available.  The old md5 and sha
modules still exist as wrappers around hashlib to preserve backwards
compatibility.
2005-08-21 18:45:59 +00:00
Georg Brandl 33a5f2af59 Fix BZ2File.(x)readlines() for files without a newline. 2005-08-21 14:16:04 +00:00
Martin v. Löwis f09582eeda Correct definition of ST_GEN_IDX. 2005-08-14 21:42:34 +00:00
Martin v. Löwis ebd9d5ba1a Patch #1180695: Implement nanosecond stat resolution on FreeBSD,
add st_gen, st_birthtime.
2005-08-09 15:00:59 +00:00
Phillip J. Eby 0d6615fd29 PEP 342 implementation. Per Guido's comments, the generator throw()
method still needs to support string exceptions, and allow None for the
third argument.  Documentation updates are needed, too.
2005-08-02 00:46:46 +00:00
Hye-Shik Chang 97bb8ad394 Fix a typo. (found by Jong-uk Kim) 2005-07-28 05:57:19 +00:00
Michael W. Hudson 8137bea4ca This is barry-scott's patch:
[ 1231069 ] ioctl has problem with -ive request codes

by using the 'I' not the 'i' format code to PyArg_ParseTuple().

Backport candidate?  Maybe...
2005-07-27 20:24:40 +00:00
Georg Brandl 08c02dbb85 [ 1243081 ] repair typos 2005-07-22 18:39:19 +00:00
Michael W. Hudson b89638148b Fix bug
[ 1232517 ] OverflowError in time.utime() causes strange traceback

A needed error check was missing.

(Actually, this error check may only have become necessary in fairly
recent Python, not sure).

Backport candidate.
2005-07-05 15:21:58 +00:00
Michael W. Hudson 188d4366be Fix bug:
[ 1163563 ] Sub threads execute in restricted mode

basically by fixing bug 1010677 in a non-broken way.

Backport candidate.
2005-06-20 16:52:57 +00:00
Neil Schemenauer 3b1cbf9ba0 Add missing INCREF.
Backport candidate.
2005-06-18 17:37:06 +00:00
Gregory P. Smith 8966d3de70 remove c++ style comment 2005-06-16 19:01:42 +00:00
Andrew M. Kuchling b5e7ff4aeb Fix check for error condition 2005-06-15 18:46:50 +00:00
Skip Montanaro 32c5d424fd Michael Hudson pointed out that the Dialect_Type object isn't INCREF'd. Why
this worked is a bit mystical.  Perhaps it never gets freed because the
object just happens never to be DECREF'd (but that seems unlikely).
2005-06-15 13:35:08 +00:00
Michael W. Hudson 2368b3c41b Consistently use hard tabs for indentation.
Slightly de-Fultonize two bits of C layout.

No semantic changes.
2005-06-15 12:48:40 +00:00
Michael W. Hudson 64e0814798 Add a missing incref.
Backport candidate.
2005-06-15 12:25:20 +00:00
Skip Montanaro d60fbd469e Leak fix from Michael Hudson. Fix memory leak when dialect doesn't
validate.  Closes 1220242.
2005-06-15 01:33:30 +00:00
Andrew M. Kuchling 52a14c3cdc [Bug #1200134] Fix buffer overflow by constraining size of .getstr(), .instr() to size of allocated buffer 2005-06-09 17:53:27 +00:00
Gregory P. Smith ac741c57d4 change set_bt_compare() callback comparison function to only take two
arguments (left, right) like any sane comparison function.  no need to
pass in the db object as an argument.
2005-06-06 17:31:32 +00:00
Gregory P. Smith 91116b629e additional sanity check. secondaryDB cannot be closed. 2005-06-06 10:28:06 +00:00
Gregory P. Smith 692ca9a0cb fixes pybsddb SF bug id 1215432. DB.associate() would crash when a
DBError was supposed to be raised.

needs backport to 2.4.x and possibly 2.3.x.
2005-06-06 09:55:06 +00:00
Hye-Shik Chang 4c560ea05b Correct URL to the official UnicodeData 3.2.0 resource. (Reported
by Darek Suchojad)
2005-06-04 07:31:48 +00:00
Gregory P. Smith e947706b10 pybsddb 4.3.2:
* the has_key() method was not raising a DBError when a database error
   had occurred. [SF patch id 1212590]
 * added a wrapper for the DBEnv.set_lg_regionmax method [SF patch id 1212590]
 * DBKeyEmptyError now derives from KeyError just like DBNotFoundError.
 * internally everywhere DB_NOTFOUND was checked for has been updated
   to also check for DB_KEYEMPTY.  This fixes the semantics of a couple
   operations on recno and queue databases to be more intuitive and results
   in less unexpected DBKeyEmptyError exceptions being raised.
2005-06-04 06:46:59 +00:00
Georg Brandl 6b95f1d963 Bug #1194181: bz2.BZ2File didn't handle mode 'U' correctly. 2005-06-03 19:47:00 +00:00
Gregory P. Smith e4ed2de260 pybsddb 4.3.1, adds support for DB.set_bt_compare database btree comparison
functions written in python.

contributed by <frederic.gobry@epfl.ch>
2005-06-03 07:03:07 +00:00
Andrew M. Kuchling a43ece9654 Delete some vestigial code; execution will never reach the 'if' statement if args is NULL 2005-06-02 17:07:11 +00:00
Hye-Shik Chang 5f937a7b8b Patch #1212117: Add optional attribute st_flags to os.stat_result
when the member is available on the platform. (Contributed by
Diego Petteno)
2005-06-02 13:09:30 +00:00
Skip Montanaro 5ff1492720 Add O_SHLOCK & O_EXLOCK. Closes patch #1103951. 2005-05-16 02:42:22 +00:00
Brett Cannon f4189916e3 Flush out support for ``class B(): pass`` syntax by adding support to the
'parser' module and 'compiler' package.

Closes patch #1176012.  Thanks logistix.
2005-04-09 02:30:16 +00:00
Michael W. Hudson e3afc598bc In a threads-disabled build, typing Ctrl-C into a raw_input() crashed,
because (essentially) I didn't realise that PY_BEGIN/END_ALLOW_THREADS
actually expanded to nothing under a no-threads build, so if you somehow
NULLed out the threadstate (e.g. by calling PyThread_SaveThread) it would
stay NULLed when you return to Python.  Argh!

Backport candidate.
2005-04-07 10:11:19 +00:00
Michael W. Hudson 9ef852c6c2 Make that a C, not a C++, comment. 2005-04-06 13:05:18 +00:00
Michael W. Hudson 2ea3072805 Add a comment explaining the import of longintrepr.h. 2005-04-06 11:27:40 +00:00
Hye-Shik Chang cf18a5d67b Fill docstrings for module and functions, extracted from the tex
documentation.  (Patch #1173245, Contributed by Jeremy Yallop)
2005-04-04 16:32:07 +00:00
Michael W. Hudson da6242c844 Fixes for
[ 1166660 ] The readline module can cause python to segfault

It seems to me that the code I'm rewriting here attempted to call any
user-supplied hook functions using the thread state of the thread that
called the hook-setting function, as opposed to that of the thread
that is currently executing.  This doesn't work, in general.

Fix this by using the PyGILState API (It wouldn't be that hard to
define a dummy version of said API when #ifndef WITH_THREAD, would
it?).

Also, check the conversion to integer of the return value of a hook
function for errors (this problem was mentioned in the ipython bug
report linked to in the above bug).
2005-03-30 11:21:53 +00:00
Michael W. Hudson 9a8c3142e2 Be a bit more accurate. 2005-03-30 10:09:12 +00:00
Michael W. Hudson b47039f66b I don't think it's particularly accurate to say Guido is maintaining
this module any more.
2005-03-30 09:38:12 +00:00
Greg Ward 0f26054736 Conditionally export a few more AFMT_* macros: AFMT_U16_NE, AFMT_S32_LE,
AFMT_S32_BE, AFMT_MPEG.
2005-03-28 02:40:46 +00:00
Raymond Hettinger d73202c596 Apply remove's mutation test after every equality test. 2005-03-19 00:00:51 +00:00
Raymond Hettinger 4aec61e0fc Add a remove() method to collections.deque objects. 2005-03-18 21:20:23 +00:00
Raymond Hettinger 2a2385dbe2 SF bug #1160187: Setup file needs entries for collections, itertools, strop 2005-03-09 23:46:11 +00:00
Raymond Hettinger 984f9bb714 operator.itemgetter() and operator.attrgetter() now support extraction
of multiple fields.  This provides direct support for sorting by
multiple keys.
2005-03-09 16:38:48 +00:00
Martin v. Löwis e2713becd8 Build with --disable-unicode again. Fixes #1158607.
Will backport to 2.4.
2005-03-08 15:03:08 +00:00
Martin v. Löwis b60ae99601 Convert file names of posix.access according to the file system encoding. 2005-03-08 09:10:29 +00:00
Raymond Hettinger c8b6d1bd8c Make functional.partial() more closely match the spec by emulating
some useful features of regular functions:

* Made weak referencable.
* Allow attribute access so a user can set __name__, __doc__, etc.
2005-03-08 06:14:50 +00:00
Greg Ward 50682d0f78 SF #818006: merge from release24-maint branch: add useful read-only
attributes to oss_audio_device object: 'closed', 'name', and 'mode'.
2005-03-07 01:41:11 +00:00
Martin v. Löwis fd78a6f7f8 Patches #925152, #1118602: Avoid reading after the end of the buffer
in pyexpat.GetInputContext. Will backport to 2.4.
2005-03-04 14:37:01 +00:00
Martin v. Löwis 7fe60c0a0a Patches #749830, #1144555: allow UNIX mmap size to default to current
file size.
2005-03-03 11:22:44 +00:00
Brett Cannon 5ce2587b1b Fix grammatical typo in a comment. 2005-03-01 03:16:34 +00:00