Georg Brandl
e393bf6fe3
Patch #931938 : prevent setting sys.prefix to ""
2006-02-20 17:37:36 +00:00
Georg Brandl
dbd8339a01
Bug #854823 : socketmodule now builds on Sun platforms even when
...
INET_ADDRSTRLEN is not defined.
2006-02-20 09:42:33 +00:00
Hye-Shik Chang
d69e034571
Fix a build problem introduced by r42230.
2006-02-19 16:22:22 +00:00
Georg Brandl
e810fe2ca4
Remove two instances of trailing commas. Resolves patch #1209781 .
2006-02-19 15:28:47 +00:00
Georg Brandl
e9b1949f70
Patch #1352711 : make zipimport raise a complete IOError
2006-02-19 09:38:58 +00:00
Neal Norwitz
093ab1aa03
Remove unused variable
2006-02-18 23:26:27 +00:00
Georg Brandl
f4f4415a18
Patch #1393157 : os.startfile() now has an optional argument to specify
...
a "command verb" to invoke on the file.
2006-02-18 22:29:33 +00:00
Georg Brandl
47fab92542
Bug #1366000 : cleanup BZ2File.seek() logic. Fixes the case of whence=2, offset>=0.
2006-02-18 21:57:25 +00:00
Martin v. Löwis
5bb8a15593
Fix typo.
2006-02-18 12:49:49 +00:00
Martin v. Löwis
151860752f
Fix size computation on Win64.
2006-02-18 12:38:35 +00:00
Martin v. Löwis
5c97c798d2
Make ssize_t-clean.
2006-02-17 15:49:09 +00:00
Georg Brandl
b86a54f395
Add deprecation warning to modules deprecated since 2000.
2006-02-17 11:29:04 +00:00
Thomas Wouters
2c98a7bbc6
Fix typo.
2006-02-17 09:59:00 +00:00
Georg Brandl
1b6726732c
Bug #1432350 : arrayobject should use PyObject_VAR_HEAD
2006-02-17 08:56:33 +00:00
Martin v. Löwis
cfe7e0912c
Remove size restrictions.
2006-02-17 06:59:14 +00:00
Tim Peters
f28829577d
mmap_flush_method(): Squash compiler warning about
...
mixing signed and unsigned types in comparison.
2006-02-17 01:07:39 +00:00
Tim Peters
8f9cc29e74
Remove space between function name and left paren
...
in function calls.
2006-02-17 00:00:20 +00:00
Tim Peters
23721ee96c
Removed pointless parens around `return` expressions;
...
deleted some curlies around one-line blocks.
2006-02-16 23:50:16 +00:00
Tim Peters
ec0a5f0add
Trimmed trailing whitespace.
2006-02-16 23:47:20 +00:00
Tim Peters
e564e7f939
new_mmap_object(), Windows flavor.
...
On a box where sizeof(size_t) == 4, C doesn't define
what happens when a size_t value is shifted right by
32 bits, and this caused test_mmap to fail on Windows
in a debug build. So use different code to break
the size apart depending on how large size_t actually
is.
This looks like an illusion, since lots of code in this
module still appears to assume sizes can't be more
than 32 bits (e.g., the internal _GetMapSize() still
returns an int), but at least test_mmap passes again.
2006-02-16 23:46:01 +00:00
Thomas Wouters
dde176593d
More Py_ssize_t format characters.
2006-02-16 21:10:52 +00:00
Tim Peters
2ad8c56e6c
struct_pack(): Repair new assert-fail crash in
...
debug-build test_struct on a box where plain "char"
is signed.
2006-02-16 20:19:46 +00:00
Thomas Wouters
13870b18f2
Also make _heapq.nlargest() use Py_ssize_t instead of ints, to iter over
...
lists and call Py_ssize_t-using helpers. All other code in this module was
already adapted to Py_ssize_t.
2006-02-16 19:21:53 +00:00
Thomas Wouters
ed6254acf2
Use 'n' format for Py_ssize_t variables to PyArg_ParseTuple(). Py_ssize_t
...
has been applied fairly arbitrarily in this module (nsmallest uses
Py_ssize_t, nlargest does not) and it probably deserves a more complete
review. Fixes heapq.nsmallest() always returning the empty list (on
platforms with 64-bit ssize_t/long)
2006-02-16 17:32:54 +00:00
Thomas Wouters
7a2f83b706
Use correct format specifier for Py_ssize_t variable to PyArg_ParseTuple().
2006-02-16 17:07:41 +00:00
Martin v. Löwis
41290685f9
Change _PyObject_GC_Resize to expect Py_ssize_t.
2006-02-16 14:56:14 +00:00
Martin v. Löwis
ad0a4629be
Use Py_ssize_t for counts and sizes.
2006-02-16 14:30:23 +00:00
Neal Norwitz
3eaf2b5044
Update comment and make accurate.
2006-02-16 08:08:54 +00:00
Martin v. Löwis
18e165558b
Merge ssize_t branch.
2006-02-15 17:27:45 +00:00
Tim Peters
219c164a47
randombits(): Stop compiler warning about mixing
...
signed with unsigned types in comparison.
2006-02-15 03:01:30 +00:00
Neal Norwitz
389cea8efc
Try to improve name based on discussion on python-checkins with Jim Jewett
2006-02-13 00:35:21 +00:00
Armin Rigo
f5b3e36493
Renamed _length_cue() to __length_hint__(). See:
...
http://mail.python.org/pipermail/python-dev/2006-February/060524.html
2006-02-11 21:32:43 +00:00
Martin v. Löwis
f84d1b9375
Introduce Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE.
...
Proposed by Tim Peters.
2006-02-11 09:27:05 +00:00
Armin Rigo
2bc23f512d
The default timer unit was incorrectly measured in milliseconds instead
...
of seconds, producing numbers 1000 times too large. It would be nice to
write a test for this, but how... (thanks mwh)
2006-02-10 13:19:53 +00:00
Armin Rigo
a871ef2b3e
Added the cProfile module.
...
Based on lsprof (patch #1212837 ) by Brett Rosen and Ted Czotter.
With further editing by Michael Hudson and myself.
History in svn repo: http://codespeak.net/svn/user/arigo/hack/misc/lsprof
* Module/_lsprof.c is the internal C module, Lib/cProfile.py a wrapper.
* pstats.py updated to display cProfile's caller/callee timings if available.
* setup.py and NEWS updated.
* documentation updates in the profiler section:
- explain the differences between the three profilers that we have now
- profile and cProfile can use a unified documentation, like (c)Pickle
- mention that hotshot is "for specialized usage" now
- removed references to the "old profiler" that no longer exists
* test updates:
- extended test_profile to cover delicate cases like recursion
- added tests for the caller/callee displays
- added test_cProfile, performing the same tests for cProfile
* TO-DO:
- cProfile gives a nicer name to built-in, particularly built-in methods,
which could be backported to profile.
- not tested on Windows recently!
2006-02-08 12:53:56 +00:00
Neal Norwitz
082b2df33f
Bug #876637 , prevent stack corruption when socket descriptor
...
is larger than FD_SETSIZE.
This can only be acheived with ulimit -n SOME_NUMBER_BIGGER_THAN_FD_SETSIZE
which is typically only available to root. Since this wouldn't normally
be run in a test (ie, run as root), it doesn't seem too worthwhile to
add a normal test. The bug report has one version of a test. I've
written another. Not sure what the best thing to do is.
Do the check before calling internal_select() because we can't set
an error in between Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS.
This seemed the clearest solution, ie handle before calling internal_select()
rather than inside. Plus there is at least one place outside
of internal_select() that needed to be handled.
Will backport.
2006-02-07 07:04:46 +00:00
Neal Norwitz
19cbcad20e
Fix indentation (whitespace only).
2006-02-07 06:59:20 +00:00
Neal Norwitz
02876df9de
Check return results for errors
2006-02-07 06:58:52 +00:00
Neal Norwitz
0e6bc8c260
Patch #1407135 , bug #1424041 , make mmap.mmap(-1, length) work the same
...
on both Unix (SVR4 and BSD) and Windows. Restores behaviour of passing -1
for anonymous memory on Unix. Use MAP_ANONYMOUS instead of _ANON since
the latter is deprecated according to Linux (gentoo) man pages.
Should we continue to allow mmap.mmap(0, length) to work on Windows?
0 is a valid fd.
Will backport bugfix portions.
2006-02-05 05:45:43 +00:00
Neal Norwitz
d1cfc8ade1
Whitespace normalization
2006-02-05 03:36:57 +00:00
Martin v. Löwis
57a34e8026
Patch #1422385 : Changes to nis module to support multiple NIS domains
2006-02-04 19:12:37 +00:00
Martin v. Löwis
14694662d5
Drop C library for stat/fstat on Windows.
2006-02-03 12:54:16 +00:00
Gregory P. Smith
fd049a696d
maintain support for older python versions in this module so that it
...
is ok for a standalone pybsddb source dist for use with <= 2.3.
2006-01-30 00:22:08 +00:00
Gregory P. Smith
8a47404799
Add wrapper for DBEnv.set_tx_timeout method to allow time based DB_RECOVER
2006-01-27 07:05:40 +00:00
Neal Norwitz
62a21121b4
Fix bug #1413192 , fix seg fault in bsddb if a txn was deleted before the env.
...
Will backport.
2006-01-25 05:21:55 +00:00
Gregory P. Smith
4e414d8386
commits sourceforge patch #1407992 by neil.norwitz.
...
this fixes the bsddb db associate tests when compiled against
BerkeleyDB 3.3 thru 4.1. 4.2 thru 4.4 already passed and still
pass.
2006-01-24 19:55:02 +00:00
Gregory P. Smith
29602d2153
Support for BerkeleyDB 4.4 (tested against 4.4.20 as well as all the
...
way back thru 3.2). This should be backported to the release24-maint
branch.
2006-01-24 09:46:48 +00:00
Tim Peters
3d56350910
_compile(): raise an exception if downcasting to SRE_CODE
...
loses information:
OverflowError: regular expression code size limit exceeded
Otherwise the compiled code is gibberish, possibly leading at
least to wrong results or (as reported on c.l.py) internal
sre errors at match time.
I'm not sure how to test this. SRE_CODE is a 2-byte type on
my box, and it's easy to create a regexp that causes the new
exception to trigger here. But it may be a 4-byte type on
other boxes, and creating a regexp large enough to trigger
problems there would be pretty crazy.
Bugfix candidate.
2006-01-21 02:47:53 +00:00
Neal Norwitz
1ac754fa10
Check return result from Py_InitModule*(). This API can fail.
...
Probably should be backported.
2006-01-19 06:09:39 +00:00
Martin v. Löwis
d078e40d41
Generate getbuildinfo.o each time the linker is invoked;
...
try to generate SVNVERSION information if subwcrev.exe
can be found.
2006-01-18 09:13:51 +00:00
Neal Norwitz
20bad74d63
SF Bug #1407069 , Remove extra semi-colon if there is no long long
2006-01-17 05:27:39 +00:00
Neal Norwitz
658516617c
Get socketmodule to build after adding netlink support.
2006-01-16 04:31:40 +00:00
Fredrik Lundh
b84b35f02a
the implementation uses ZipImportError, not ZipImporterError...
2006-01-15 15:00:40 +00:00
Martin v. Löwis
d056005482
Change build format of netlink addresses.
2006-01-15 07:49:20 +00:00
Martin v. Löwis
11017b172d
Patch #1103116 : AF_NETLINK sockets basic support.
2006-01-14 18:12:57 +00:00
Neal Norwitz
3b4fff8079
Fix SF bug #1402308 , segfault when using mmap(-1, ...)
...
This didn't crash on Linux, but valgrind complained.
I'm not sure if this test is valid on Windows.
Will backport.
2006-01-11 08:54:45 +00:00
Neal Norwitz
88bbd73d07
SF bug #1400822 , Extended version of _curses over{lay,write} does not work
...
Fix signatures to conform to doc (also fixed ungetmouse()).
Will backport.
2006-01-10 07:05:44 +00:00
Neal Norwitz
5e3d862392
Bug #1400115 , Fix segfault when calling curses.panel.userptr()
...
without prior setting of the userptr.
Will backport.
2006-01-09 06:24:35 +00:00
Neal Norwitz
d948a43df8
Fix icc warnings: try to set TCL_UNIX_FD for #if TCL_WIN_SOCKET == TCL_UNIX_FD. res is not used, add a XXX comment
2006-01-08 01:08:55 +00:00
Neal Norwitz
e4ab5f5531
Fix icc warnings: HASH_OBJ_CONSTRUCTOR was not defined and using #if HASH_OBJ_CONSTRUCTOR
2006-01-08 01:08:09 +00:00
Neal Norwitz
d39d861a36
Fix icc warnings: strlen() returns size_t
2006-01-08 01:03:36 +00:00
Neal Norwitz
52ca0dd712
Fix icc warnings: using wrong enum type
2006-01-07 21:21:16 +00:00
Neal Norwitz
f0459142d5
Fix icc warnings: extra semi-colon and signed vs unsigned
2006-01-07 21:20:24 +00:00
Neal Norwitz
3f0464839b
Fix icc warnings: extra semi-colon
2006-01-07 21:19:49 +00:00
Tim Peters
a9652f11ad
Py_GetBuildInfo(): Squash compiler warnings.
...
Locals `revision` and `branch` were const-incorrect.
2006-01-06 02:45:17 +00:00
Martin v. Löwis
456af5f78b
Deal with empty svn_revisions.
2006-01-06 00:43:42 +00:00
Martin v. Löwis
43b57805fb
Drop sys.build_number. Add sys.subversion.
2006-01-05 23:38:54 +00:00
Skip Montanaro
2b47445234
squash compiler warning on Mac OSX 10.3
2006-01-05 10:49:13 +00:00
Martin v. Löwis
c5bf5a00a3
Always set SVNVERSION to "exported" if it otherwise fails.
2006-01-05 10:33:59 +00:00
Martin v. Löwis
dea59e5755
Stop maintaining the buildno file.
...
Also, stop determining Unicode sizes with PyString_GET_SIZE.
2006-01-05 10:00:36 +00:00
Neal Norwitz
40c6b47ca1
Fix errors on 64-bit platforms. Will backport
2006-01-05 05:43:35 +00:00
Martin v. Löwis
70cef449ca
Remove unneeded directories.
2006-01-03 06:48:38 +00:00
Martin v. Löwis
d372aa8e37
Import zlib into Python tree.
2006-01-03 06:44:59 +00:00
Armin Rigo
f5bd3b442d
adding in-place operators to the operator module.
2005-12-29 16:50:42 +00:00
Armin Rigo
c4308d5be6
two missing PyDoc_STR().
2005-12-29 14:39:28 +00:00
Georg Brandl
cd4d1e8b46
[ 959576 ] Can't build Python on POSIX w/o $HOME
2005-12-27 17:37:07 +00:00
Fredrik Lundh
c3389997d4
SF#1389809
...
cast first PyUnicode_Decode argument to proper type (why is
"char *" used for encoded byte streams, btw? shouldn't that
be "void *" or, if necessary, "unsigned char *"?)
2005-12-25 11:40:19 +00:00
Barry Warsaw
ce3a9131c3
Revert most of r41765. Don't use $Revision$ in Py_GetBuildNumber(). Keep the
...
use of $(srcdir) in Makefile.pre.in so builds outside the source dir still
work.
2005-12-19 14:43:44 +00:00
Neal Norwitz
9dbc7dd6f2
Remove extra parens
2005-12-19 06:08:59 +00:00
Neal Norwitz
30b5c5d011
Fix SF bug #1072182 , problems with signed characters.
...
Most of these can be backported.
2005-12-19 06:05:18 +00:00
Barry Warsaw
a3bdc2c2a5
Handle a couple of use cases discussed in python-dev w.r.t. calculating the
...
Subversion revision number.
First, in an svn export, there will be no .svn directory, so use an in-file
$Revision$ keyword string with the keyword chrome stripped off.
Also, use $(srcdir) in the Makefile.pre.in to handle the case where Python is
build outside the source tree.
2005-12-18 22:46:35 +00:00
Fredrik Lundh
0149e3a090
Fixed None reference leaks in TreeBuilder class (reported by Neal
...
Norwitz)
2005-12-18 13:58:25 +00:00
Neal Norwitz
8856fb750b
SF Patch #1365916 , mmap fails on AMD64
...
Fix some 64-bit issues due to mismatch format characters w/actual data types
2005-12-18 03:34:22 +00:00
Barry Warsaw
2a38a86c1c
Expose Subversion revision number (calculated via "svnversion .") to Python.
...
Add C API function Py_GetBuildNumber(), add it to the interactive prompt
banner (i.e. Py_GetBuildInfo()), and add it as the sys.build_number
attribute. The build number is a string instead of an int because it may
contain a trailing 'M' if there are local modifications.
2005-12-18 01:27:35 +00:00
Fredrik Lundh
b80775ecf1
Fixed reference counting error when using the entity dictionary
...
(reported by Chris Olds). Backported from the 1.0.6 development
branch.
2005-12-17 08:33:21 +00:00
Fredrik Lundh
6d52b55c56
updating to cElementTree 1.0.5 (step 3 of 3)
2005-12-16 22:06:43 +00:00
Fredrik Lundh
8c8836b406
updating to cElementTree 1.0.5 (step 2 of 3)
2005-12-16 22:06:06 +00:00
Fredrik Lundh
7cfe6eee0d
updating to cElementTree 1.0.5
2005-12-16 22:05:40 +00:00
Fredrik Lundh
c97ba7064e
added PSG licensing blurb
2005-12-14 22:30:36 +00:00
Fredrik Lundh
14b4feac6a
renamed to _elementtree (for Python 2.5)
2005-12-14 21:46:41 +00:00
Fredrik Lundh
0c53bfd374
copied cElementTree 1.0.4 to Modules
2005-12-14 21:45:58 +00:00
Armin Rigo
5c8cc2543b
Added the 'ULL' prefix to the unsigned long long literal constants.
...
Supresses numerous pages of compiler warnings.
2005-12-14 18:05:44 +00:00
Fredrik Lundh
cc117dbb9d
moved magic into structure (mainly to simplify the client code)
...
added missing API hooks
2005-12-13 21:55:36 +00:00
Fredrik Lundh
d7a42881db
renamed dispatch -> capi to match other CAPI implementations
...
(e.g. cStringIO, ucnhash, etc)
2005-12-13 20:43:04 +00:00
Fredrik Lundh
c3345040df
added cobject-based expat dispatch mechanism to pyexpat
2005-12-13 19:49:55 +00:00
Hye-Shik Chang
c5c57e6d98
Bug #1290333 : Added a workaround for cjkcodecs' _codecs_cn module
...
build problem on AIX.
2005-12-12 11:48:32 +00:00
Jeremy Hylton
af68c874a6
Add const to several API functions that take char *.
...
In C++, it's an error to pass a string literal to a char* function
without a const_cast(). Rather than require every C++ extension
module to put a cast around string literals, fix the API to state the
const-ness.
I focused on parts of the API where people usually pass literals:
PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type
slots, etc. Predictably, there were a large set of functions that
needed to be fixed as a result of these changes. The most pervasive
change was to make the keyword args list passed to
PyArg_ParseTupleAndKewords() to be a const char *kwlist[].
One cast was required as a result of the changes: A type object
mallocs the memory for its tp_doc slot and later frees it.
PyTypeObject says that tp_doc is const char *; but if the type was
created by type_new(), we know it is safe to cast to char *.
2005-12-10 18:50:16 +00:00
Armin Rigo
de5f05f3b1
Nobody on python-dev seemed particularly bothered that Hotshot generates half-
...
meaningless numbers, but I figured out I would fix that bug anyway.
2005-12-06 14:07:39 +00:00
Georg Brandl
a13c2446dc
Bug #869197 : setgroups rejects long integer argument
2005-11-22 19:30:31 +00:00
Andrew M. Kuchling
bb7e800506
[Patch #1350573 ] zlib.crc32 doesn't handle 0xffffffff seed. Add tests and bugfix. Bug reported by John Schmidt; bugfix by Danny Yoo.
2005-11-22 15:32:28 +00:00
Fred Drake
f5b7fd2239
update busted comment
2005-11-11 19:34:56 +00:00
Armin Rigo
f4afb21526
similar to SF bug 847019: a quick check in the time() constructor, which
...
accepts strings only for unpickling reasons. This check prevents the honest
mistake of passing a string like '2:59.0' to time() and getting an insane
object.
2005-11-07 07:15:48 +00:00
Neal Norwitz
0f46bbf781
Bug #1346533 , select.poll() doesn't raise an error if timeout > sys.maxint
...
Need to check return result of PyInt_AsLong()
Will backport.
2005-11-03 05:00:25 +00:00
Walter Dörwald
9fd115cb63
Whitespace cleanup.
2005-11-02 08:30:08 +00:00
Neal Norwitz
6eac2005bf
Cleanup the previous checkin.
...
Close the fd in the close method and invalidated it. Don't try
to close a second time when deallocating.
2005-11-02 05:36:37 +00:00
Neal Norwitz
7b631793ab
Bug #1344508 , Fix UNIX mmap leaking file descriptors. Will backport.
2005-11-02 05:26:07 +00:00
Martin v. Löwis
ab0f947a21
Remove .cvsignore files, as they live in svn:ignore
...
properties now.
2005-10-30 22:01:41 +00:00
Jeremy Hylton
ec97a28b60
Fix a bunch of imports to use code.h instead of compile.h.
...
Remove duplicate declarations from compile.h
2005-10-21 14:58:06 +00:00
Jeremy Hylton
3e0055f8c6
Merge ast-branch to head
...
This change implements a new bytecode compiler, based on a
transformation of the parse tree to an abstract syntax defined in
Parser/Python.asdl.
The compiler implementation is not complete, but it is in stable
enough shape to run the entire test suite excepting two disabled
tests.
2005-10-20 19:59:25 +00:00
Neal Norwitz
8456235088
Get bsddb module to compile with version 3.2 of BSD DB.
2005-10-20 04:30:15 +00:00
Hye-Shik Chang
331649acc7
Change the internal "undefined codepoint" mark for CJKCodecs decoders
...
from U+FFFD to U+FFFE which is considered more appropriate. (from
MAL's comment)
2005-10-06 15:51:59 +00:00
Raymond Hettinger
cc9a951f35
SF #1313496 : bisect C replacement doesn't accept named args
2005-10-05 11:39:12 +00:00
Neal Norwitz
a45770d6d0
SF Bug # 941346, AIX shared library fix
...
Since I can't test this, I'm just adding a comment. If we get access
to AIX boxes, we can test this and really resolve. Anyone from IBM
want to offer help?
Backport candidate I suppose.
2005-10-03 03:57:09 +00:00
Neal Norwitz
11bd119226
SF bug #887946 , segfault if redirecting directory
...
Also provide a warning if a directory is passed on the command line.
Add minimal command line test.
Will backport.
2005-10-03 00:54:56 +00:00
Neal Norwitz
484d9a409a
Patch #1309009 , Fix segfault in pyexpat when the XML document is
...
in latin_1, but Python incorrectly assumes it is in UTF-8 format
Will backport.
2005-09-30 04:46:49 +00:00
Georg Brandl
e677adc43a
Fix parse errors in readline module when compiling without threads.
2005-09-29 13:40:49 +00:00
Georg Brandl
e9f8ec98d4
Commit memory leaking fix.
2005-09-25 06:16:40 +00:00
Raymond Hettinger
6b27cda643
Convert iterator __len__() methods to a private API.
2005-09-24 21:23:05 +00:00
Hye-Shik Chang
9ceebd5445
Patch #1288833 : Removed thread lock from socket.getaddrinfo on
...
FreeBSD 5.3 and later versions which got thread-safe getaddrinfo(3).
(Reported by Maxim Sobolev)
2005-09-24 14:58:47 +00:00
Michael W. Hudson
10402a306f
Patches #1298449 and #1298499 : Add some missing checks for error
...
returns in cStringIO.c. Thanks to Andrew Bennetts.
This must be a backport candidate.
2005-09-22 09:19:01 +00:00
Neal Norwitz
058bde1944
SF Patch #1297028 , cjkcodecs does not initialize type pointer
...
Fix segfault. I tried to write a test, but it wouldn't crash
when running regrtest. This really should have some sort of test.
Should definitely be backported.
2005-09-21 06:44:25 +00:00
Armin Rigo
335ffe88bb
C89 compliance.
2005-09-20 19:04:02 +00:00
Neal Norwitz
3efd0a1e86
Remove unnecessary/extra parens when returning a value.
2005-09-19 06:45:53 +00:00
Neal Norwitz
24b3c22985
Forward port fixes for problems reported by valgrind
2005-09-19 06:43:44 +00:00
Martin v. Löwis
8b291e2d66
Patch #1213831 : Fix typo in unicodedata._getcode.
...
Will backport to Python 2.4.
2005-09-18 08:17:56 +00:00
Brett Cannon
bd9c3f7028
Change type on variable to silence gcc 4 warning. Call signature was found at
...
http://darwinsource.opendarwin.org/10.4.2/dyld-43.1/src/dyldAPIs.cpp .
2005-09-16 02:43:35 +00:00
Georg Brandl
402b53d43f
bug [ 1007046 ] os.startfile() doesn't accept Unicode filenames
2005-09-14 20:51:40 +00:00
Guido van Rossum
8ee3e5aa93
- Changes donated by Elemental Security to make it work on AIX 5.3
...
with IBM's 64-bit compiler (SF patch #1284289 ). This also closes SF
bug #105470 : test_pwd fails on 64bit system (Opteron).
2005-09-14 18:09:42 +00:00
Georg Brandl
a8bcecc872
bug [ 1274069 ] bz2module.c compiler warning
2005-09-03 07:49:53 +00:00
Walter Dörwald
a47d1c08d0
SF bug #1251300 : On UCS-4 builds the "unicode-internal" codec will now complain
...
about illegal code points. The codec now supports PEP 293 style error handlers.
(This is a variant of the Nik Haldimann's patch that detects truncated data)
2005-08-30 10:23:14 +00:00
Raymond Hettinger
b3f55f4a70
SF bug #1072182 : bad arg type to isspace in struct module
2005-08-26 08:39:56 +00:00
Georg Brandl
d2e3ba7a35
patch [ 756021 ] Allow socket.inet_aton("255.255.255.255") on Windows
2005-08-26 08:34:00 +00:00
Georg Brandl
02c42871cf
Disallow keyword arguments for type constructors that don't use them.
...
(fixes bug #1119418 )
2005-08-26 06:42:30 +00:00
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
Raymond Hettinger
9c323f8de4
SF patch #941881 : PEP 309 Implementation (Partial Function Application).
...
Combined efforts of many including Peter Harris, Hye-Shik Chang,
Martin v. Löwis, Nick Coghlan, Paul Moore, and Raymond Hettinger.
2005-02-28 19:39:44 +00:00
Martin v. Löwis
9533e34024
Patch #1093585 : raise a ValueError for negative history items in
...
remove_history and replace_history. Will backport to 2.4.
2005-02-27 20:33:25 +00:00
Guido van Rossum
54c273c703
The error message "can't start new thread" should not end in a
...
newline.
2005-02-20 03:02:16 +00:00
Michael W. Hudson
9867ced6c2
Fix
...
[ 1077106 ] Negative numbers to os.read() cause segfault
Sorry for sitting on this for so long! Is there a chance it could
make 2.3.5?
2005-01-31 17:01:59 +00:00
Neal Norwitz
62679968be
Put docstring for getspall into same #ifdef block as function definition
...
Remove C++ (C99) style comments
2005-01-24 23:33:50 +00:00
Martin v. Löwis
c300175547
Patch #579435 : Shadow Password Support Module
2005-01-23 09:27:24 +00:00
Martin v. Löwis
fe33d0ba87
Default stat_float_times to true.
2005-01-16 08:57:39 +00:00
Andrew McNamara
f69d94f6c0
Moved reader \r and \n processing from the iterator to the state machine -
...
this allows for better handling of newline characters in quoted fields (and
hopefully resolves Bug 967934).
2005-01-13 11:30:54 +00:00
Skip Montanaro
0af3ade6aa
Add strptime() constructor to datetime class. Thanks to Josh Spoerri for
...
the changes.
2005-01-13 04:12:31 +00:00
Andrew McNamara
5cfd83748a
Improve wording of parser error message.
2005-01-12 11:39:50 +00:00
Andrew McNamara
7f2053eff3
Add counting of source iterator lines to the reader object - handy for
...
user error messages (otherwise difficult to do without instrumenting
the source).
2005-01-12 11:17:16 +00:00
Andrew McNamara
0f0599ddc1
When quoting=QUOTE_NONNUMERIC, the reader now casts unquoted fields
...
to floats.
2005-01-12 09:45:18 +00:00
Andrew McNamara
5d45a8dc22
Fix logic problem in quoting=csv.QUOTE_ALL, quotechar=None check, add test.
2005-01-12 08:16:17 +00:00
Andrew McNamara
c89f284df8
When using QUOTE_NONNUMERIC, we now test for "numericness" with
...
PyNumber_Check, rather than trying to convert to a float. Reimplemented
writer - now raises exceptions when it sees a quotechar but neither
doublequote or escapechar are set. Doublequote results are now more
consistent (eg, single quote should generate """", rather than "",
which is ambiguous).
2005-01-12 07:44:42 +00:00
Andrew McNamara
31d8896ee2
Rename csv.set_field_limit to csv.field_size_limit (since it both sets and
...
gets).
2005-01-12 03:45:10 +00:00
Andrew McNamara
cf0fd5ab29
Add belt and braces check of PyString_AsString return.
2005-01-12 01:16:35 +00:00
Andrew McNamara
e4d05c4f93
Set an upper limit on the size of the field buffer, raise an exception
...
when this limit is reached. Limit defaults to 128k, and is changed
by module set_field_limit() method. Previously, an unmatched quote
character could result in the entire file being read into the field
buffer, potentially exhausting virtual memory.
2005-01-11 07:32:02 +00:00