]> granicus.if.org Git - python/log
python
21 years agoAdd URL for PEP to the source code encoding warning.
Marc-André Lemburg [Mon, 17 Feb 2003 18:31:57 +0000 (18:31 +0000)]
Add URL for PEP to the source code encoding warning.

Remove the usage of PyErr_WarnExplicit() since this could cause
sensitive information from the source files to appear in e.g.
log files.

21 years agoRemove PyArg_ParseTuple() for methods which take no args,
Neal Norwitz [Mon, 17 Feb 2003 18:18:00 +0000 (18:18 +0000)]
Remove PyArg_ParseTuple() for methods which take no args,
use METH_NOARGS instead

21 years agoAdded test_posix (hopefully it works on Windows).
Neal Norwitz [Mon, 17 Feb 2003 18:17:05 +0000 (18:17 +0000)]
Added test_posix (hopefully it works on Windows).
Remove PyArg_ParseTuple() for methods which take no args,
use METH_NOARGS instead

21 years agoUse correct function name to PyArg_ParseTuple("is_package").
Neal Norwitz [Mon, 17 Feb 2003 18:05:20 +0000 (18:05 +0000)]
Use correct function name to PyArg_ParseTuple("is_package").

Fix off-by-1 error in normalize_line_endings():
  when *p == '\0' the NUL was copied into q and q was auto-incremented,
  the loop was broken out of,
  then a newline was appended followed by a NUL.
  So the function, in effect, was strcpy() but added two extra chars
  which was caught by obmalloc in debug mode, since there was only
  room for 1 additional newline.

Get test working under regrtest (added test_main).

21 years agoWhen installing resource files whose name ends in .rsrc use the
Jack Jansen [Mon, 17 Feb 2003 16:47:12 +0000 (16:47 +0000)]
When installing resource files whose name ends in .rsrc use the
"copy anything to a data fork based resource file" trick of macresource.
Fixes #688007.

21 years agoOptionally honour #! paths in scripts. Fixes #676358.
Jack Jansen [Mon, 17 Feb 2003 15:40:00 +0000 (15:40 +0000)]
Optionally honour #! paths in scripts. Fixes #676358.

21 years agoActually run these tests from regrtest.py.
Neal Norwitz [Mon, 17 Feb 2003 14:51:41 +0000 (14:51 +0000)]
Actually run these tests from regrtest.py.

There was no test_main() and the main body was protected
by if __name__ == '__main__' so the test didn't happen
on import either.

21 years agoReword section about moving variables to os.path to match intent (or
Michael W. Hudson [Mon, 17 Feb 2003 12:26:23 +0000 (12:26 +0000)]
Reword section about moving variables to os.path to match intent (or
at least, what I thought the intent was).

21 years ago- Added support for zip archives
Jack Jansen [Mon, 17 Feb 2003 12:21:05 +0000 (12:21 +0000)]
- Added support for zip archives
- Better messages in case of a crash of the install-test script

21 years agoPatch 686397:
Andrew MacIntyre [Mon, 17 Feb 2003 09:20:23 +0000 (09:20 +0000)]
Patch 686397:
move definition of platform dependent path related variables from os.py
to platform dependent path modules (ntpath, etc).

21 years agoTweak to Skip's checkin of patch 686397:
Andrew MacIntyre [Mon, 17 Feb 2003 09:17:50 +0000 (09:17 +0000)]
Tweak to Skip's checkin of patch 686397:
- 'os2' references in ntpath.py relate to the VACPP port, not the EMX port;
- the VACPP port uses the same defpath as all other ntpath.py supported
  platforms except 'ce'.

21 years agoBetter error messages and warnings.
Jack Jansen [Sun, 16 Feb 2003 23:03:04 +0000 (23:03 +0000)]
Better error messages and warnings.

21 years agoAdded notes about pimp and bundlebuilder to the Mac section.
Jack Jansen [Sun, 16 Feb 2003 23:00:53 +0000 (23:00 +0000)]
Added notes about pimp and bundlebuilder to the Mac section.

21 years agoWhen building an applet clear out the tempfile and dir afterwards.
Jack Jansen [Sun, 16 Feb 2003 21:28:51 +0000 (21:28 +0000)]
When building an applet clear out the tempfile and dir afterwards.

21 years agoFix for SF 686380, from SF patch 686771 by Ping. (errors trying to
Guido van Rossum [Sun, 16 Feb 2003 01:12:32 +0000 (01:12 +0000)]
Fix for SF 686380, from SF patch 686771 by Ping.  (errors trying to
get help on os attributes)

21 years agoMake 2 module variables static. Assuming this is correct.
Neal Norwitz [Sat, 15 Feb 2003 15:07:17 +0000 (15:07 +0000)]
Make 2 module variables static.  Assuming this is correct.

21 years agoAdd closing ) in comment
Neal Norwitz [Sat, 15 Feb 2003 14:45:12 +0000 (14:45 +0000)]
Add closing ) in comment

21 years agocPickle.c, load_build(): Taught cPickle how to pick apart
Tim Peters [Sat, 15 Feb 2003 03:01:11 +0000 (03:01 +0000)]
cPickle.c, load_build():  Taught cPickle how to pick apart
the optional proto 2 slot state.

pickle.py, load_build():  CAUTION:  Noted that cPickle's
load_build and pickle's load_build really don't do the same
things with the state, and didn't before this patch either.
cPickle never tries to do .update(), and has no backoff if
instance.__dict__ can't be retrieved.  There are no tests
that can tell the difference, and part of what cPickle's
load_build() did looked accidental to me, so I don't know
what the true intent is here.

pickletester.py, test_pickle.py:  Got rid of the hack for
exempting cPickle from running some of the proto 2 tests.

dictobject.c, PyDict_Next():  documented intended use.

21 years agoMoved setupDocs.py to Doc/setup.py and did some cleanup. It now at least
Jack Jansen [Fri, 14 Feb 2003 23:46:22 +0000 (23:46 +0000)]
Moved setupDocs.py to Doc/setup.py and did some cleanup. It now at least
allows bdist, but it's still one big hack:-(

21 years agocPickle produces NEWOBJ appropriately now. It still doesn't know
Tim Peters [Fri, 14 Feb 2003 23:05:28 +0000 (23:05 +0000)]
cPickle produces NEWOBJ appropriately now.  It still doesn't know
how to unpickle the new slot-full state tuples.

21 years agoPatch for bug reported in patch #686627: import race condition in
Marc-André Lemburg [Fri, 14 Feb 2003 20:25:56 +0000 (20:25 +0000)]
Patch for bug reported in patch #686627: import race condition in
codecs registry startup.

21 years agoMigrate definitions of several platform-dependent path-related variables
Skip Montanaro [Fri, 14 Feb 2003 19:35:31 +0000 (19:35 +0000)]
Migrate definitions of several platform-dependent path-related variables
into the relevant path modules.  See patch #686397.

21 years ago- The audio driver tests (test_ossaudiodev.py and
Guido van Rossum [Fri, 14 Feb 2003 19:29:22 +0000 (19:29 +0000)]
- The audio driver tests (test_ossaudiodev.py and
  test_linuxaudiodev.py) are no longer run by default.  This is
  because they don't always work, depending on your hardware and
  software.  To run these tests, you must use an invocation like
    ./python Lib/test/regrtest.py -u audio test_ossaudiodev

21 years agoAllow opening of alternate databases.
Jack Jansen [Fri, 14 Feb 2003 14:13:25 +0000 (14:13 +0000)]
Allow opening of alternate databases.

21 years agoFactored out classes for handling source and binary distributions. Source
Jack Jansen [Fri, 14 Feb 2003 14:11:59 +0000 (14:11 +0000)]
Factored out classes for handling source and binary distributions. Source
now means "distutils-based source", binary "bdist format archive". Also
fixed various lurking bugs.

21 years agoGot building documentation from source to work.
Jack Jansen [Fri, 14 Feb 2003 12:47:14 +0000 (12:47 +0000)]
Got building documentation from source to work.

21 years agoPort test_charmapcodec to PyUnit. From SF patch #662807
Walter Dörwald [Fri, 14 Feb 2003 11:21:53 +0000 (11:21 +0000)]
Port test_charmapcodec to PyUnit. From SF patch #662807

21 years agoextsep description:
Fred Drake [Fri, 14 Feb 2003 06:39:37 +0000 (06:39 +0000)]
extsep description:
- avoid "e.g." in text
- record version information
(should be backported)

21 years agoadd missing description of os.extsep
Skip Montanaro [Fri, 14 Feb 2003 05:45:31 +0000 (05:45 +0000)]
add missing description of os.extsep

21 years agoSF bug #663701: sets module review
Raymond Hettinger [Fri, 14 Feb 2003 03:42:11 +0000 (03:42 +0000)]
SF bug #663701:  sets module review

Renamed hook methods to use the double underscore convention.

21 years agoSF bug #663701. The caret wasn't printing well in the PDF documentation.
Raymond Hettinger [Fri, 14 Feb 2003 01:49:09 +0000 (01:49 +0000)]
SF bug #663701.  The caret wasn't printing well in the PDF documentation.

21 years agoRemove deps on mac doc files which have been removed
Neal Norwitz [Fri, 14 Feb 2003 01:45:53 +0000 (01:45 +0000)]
Remove deps on mac doc files which have been removed

21 years agoFix docstring typo
Andrew M. Kuchling [Fri, 14 Feb 2003 01:14:15 +0000 (01:14 +0000)]
Fix docstring typo

21 years agoFix comment typo
Andrew M. Kuchling [Fri, 14 Feb 2003 01:13:01 +0000 (01:13 +0000)]
Fix comment typo

21 years agoMinor assorted cleanups; no semantic changes.
Tim Peters [Thu, 13 Feb 2003 23:00:26 +0000 (23:00 +0000)]
Minor assorted cleanups; no semantic changes.

21 years agoSF 685011: calendar module overflow handling
Raymond Hettinger [Thu, 13 Feb 2003 22:58:02 +0000 (22:58 +0000)]
SF 685011: calendar module overflow handling

Restored a Py2.2 behavior to not range check the day of the month.
A user application was this exploiting undocumented, accidental "feature".

21 years agoAdd SF reference to news item.
Guido van Rossum [Thu, 13 Feb 2003 22:19:20 +0000 (22:19 +0000)]
Add SF reference to news item.

21 years agoThe version of PyImport_Import() in cPickle is no longer needed (an edited
Tim Peters [Thu, 13 Feb 2003 22:17:05 +0000 (22:17 +0000)]
The version of PyImport_Import() in cPickle is no longer needed (an edited
version was moved into import.c long ago), so squashed the duplication.

21 years ago- Finally fixed the bug in compile() and exec where a string ending
Guido van Rossum [Thu, 13 Feb 2003 22:07:59 +0000 (22:07 +0000)]
- Finally fixed the bug in compile() and exec where a string ending
  with an indented code block but no newline would raise SyntaxError.
  This would have been a four-line change in parsetok.c...  Except
  codeop.py depends on this behavior, so a compilation flag had to be
  invented that causes the tokenizer to revert to the old behavior;
  this required extra changes to 2 .h files, 2 .c files, and 2 .py
  files.  (Fixes SF bug #501622.)

21 years agosave(): Reformat tail end just for clarity.
Tim Peters [Thu, 13 Feb 2003 21:03:57 +0000 (21:03 +0000)]
save():  Reformat tail end just for clarity.

21 years agoRemoved unused cut'n'paste import.
Tim Peters [Thu, 13 Feb 2003 19:37:19 +0000 (19:37 +0000)]
Removed unused cut'n'paste import.

21 years agoWe didn't have any tests making pickles with one of {pickle, cPickle},
Tim Peters [Thu, 13 Feb 2003 19:30:57 +0000 (19:30 +0000)]
We didn't have any tests making pickles with one of {pickle, cPickle},
and loading them via the other, except for the special cases of this
Guido added to test_datetime.py for datetime module objects.  The new
test_xpickle.py tries all of pickletester's AbstractPickleTests in
both x-module ways.

21 years agoAnother dummy type.
Guido van Rossum [Thu, 13 Feb 2003 18:44:57 +0000 (18:44 +0000)]
Another dummy type.

Curious: Str didn't need me to put something in tp_new, but Null did.
Why the difference?

21 years agoAdded a simple NEWOBJ test. This is in the pickle-only part of the
Tim Peters [Thu, 13 Feb 2003 18:42:00 +0000 (18:42 +0000)]
Added a simple NEWOBJ test.  This is in the pickle-only part of the
test for now (cPickle can't yet produce NEWOBJ).

21 years agoRemove filecmp
Andrew M. Kuchling [Thu, 13 Feb 2003 18:36:22 +0000 (18:36 +0000)]
Remove filecmp

21 years agofirst cut at a shell script to view a single section from the library
Skip Montanaro [Thu, 13 Feb 2003 18:30:08 +0000 (18:30 +0000)]
first cut at a shell script to view a single section from the library
reference manual

21 years agoTaught cPickle how to read pickles containing NEWOBJ. This won't get
Tim Peters [Thu, 13 Feb 2003 18:24:14 +0000 (18:24 +0000)]
Taught cPickle how to read pickles containing NEWOBJ.  This won't get
exercised by the test suite before cPickle knows how to create NEWOBJ
too.  For now, it was just tried once by hand (via loading a NEWOBJ
pickle created by pickle.py).

21 years agoPort test_userlist to PyUnit and add a few tests to increase code
Walter Dörwald [Thu, 13 Feb 2003 18:07:43 +0000 (18:07 +0000)]
Port test_userlist to PyUnit and add a few tests to increase code
coverage. From SF patch #662807

21 years agoSF patch #685738 by Michael Stone.
Guido van Rossum [Thu, 13 Feb 2003 16:30:16 +0000 (16:30 +0000)]
SF patch #685738 by Michael Stone.

This changes the default __new__ to refuse arguments iff tp_init is the
default __init__ implementation -- thus making it a TypeError when you
try to pass arguments to a constructor if the class doesn't override at
least __init__ or __new__.

21 years agoRe-enable compiling ossaudiodev now that it seems to work again.
Guido van Rossum [Thu, 13 Feb 2003 16:12:21 +0000 (16:12 +0000)]
Re-enable compiling ossaudiodev now that it seems to work again.

21 years agoAdded a HIGHEST_PROTOCOL module attribute to pickle and cPickle.
Tim Peters [Thu, 13 Feb 2003 15:44:41 +0000 (15:44 +0000)]
Added a HIGHEST_PROTOCOL module attribute to pickle and cPickle.

21 years agoConditionalize another constant
Andrew M. Kuchling [Thu, 13 Feb 2003 13:27:07 +0000 (13:27 +0000)]
Conditionalize another constant

21 years agoUse python_d.exe to build _ssl_d.pyd - we can not express that we depend
Mark Hammond [Thu, 13 Feb 2003 12:05:15 +0000 (12:05 +0000)]
Use python_d.exe to build _ssl_d.pyd - we can not express that we depend
on a release 'python.exe' for a debug build of _ssl.  It may happen that
Python.exe is currently broken, and we are trying to rebuild from scratch.

21 years agosocket_inet_aton(): ip_addr was left undefined before use in the
Tim Peters [Thu, 13 Feb 2003 03:13:40 +0000 (03:13 +0000)]
socket_inet_aton():  ip_addr was left undefined before use in the
!HAVE_INET_ATON case.  Repaired that, and tried to repair what looked
like out-of-date comments.

21 years agoTry to doc the new pickle details being implemented as part of PEP 307.
Neal Norwitz [Thu, 13 Feb 2003 03:12:48 +0000 (03:12 +0000)]
Try to doc the new pickle details being implemented as part of PEP 307.
Needs review.

21 years agoSF patch #682432, add lookbehind tests
Neal Norwitz [Thu, 13 Feb 2003 03:01:18 +0000 (03:01 +0000)]
SF patch #682432, add lookbehind tests

21 years agoUmmm, try to get it right this time
Neal Norwitz [Thu, 13 Feb 2003 02:15:42 +0000 (02:15 +0000)]
Ummm, try to get it right this time

21 years agoUse configure to check for inet_aton.
Neal Norwitz [Thu, 13 Feb 2003 02:11:10 +0000 (02:11 +0000)]
Use configure to check for inet_aton.

21 years agoFix typo.
Walter Dörwald [Wed, 12 Feb 2003 23:49:57 +0000 (23:49 +0000)]
Fix typo.

21 years agoAdd test to ensure files (fds) don't leak
Neal Norwitz [Wed, 12 Feb 2003 23:09:53 +0000 (23:09 +0000)]
Add test to ensure files (fds) don't leak

21 years agoAddressing SF bug #643005, implement socket.inet_aton() using
Guido van Rossum [Wed, 12 Feb 2003 23:08:22 +0000 (23:08 +0000)]
Addressing SF bug #643005, implement socket.inet_aton() using
inet_aton() rather than inet_addr() -- the latter is obsolete because
it has a problem: "255.255.255.255" is a valid address but
indistinguishable from an error.

(I'm not sure if inet_aton() exists everywhere -- in case it doesn't,
I've left the old code in with an #ifdef.)

21 years agoCleanup from patch #683257:
Neal Norwitz [Wed, 12 Feb 2003 23:02:21 +0000 (23:02 +0000)]
Cleanup from patch #683257:
 Add missing INCREFs and re-indent returns to be consistent.
 Add \n\ for lines in docstring
 Add a pathetic test
 Add docs

21 years agoProvide access to the import lock, fixing SF bug #580952. This is
Guido van Rossum [Wed, 12 Feb 2003 21:46:11 +0000 (21:46 +0000)]
Provide access to the import lock, fixing SF bug #580952.  This is
mostly from SF patch #683257, but I had to change unlock_import() to
return an error value to avoid fatal error.

Should this be backported?  The patch requested this, but it's a new
feature.

21 years agoIssue a warning when int('0...', 0) returns an int with the sign
Guido van Rossum [Wed, 12 Feb 2003 20:48:22 +0000 (20:48 +0000)]
Issue a warning when int('0...', 0) returns an int with the sign
folded; this will change in Python 2.4.  On a 32-bit machine, this
happens for 0x80000000 through 0xffffffff, and for octal constants in
the same value range.  No warning is issued if an explicit base is
given, *or* if the string contains a sign (since in those cases no
sign folding ever happens).

21 years agoExpect test_ossaudiodev to skip on Linux, too. (It's broken.
Guido van Rossum [Wed, 12 Feb 2003 20:40:08 +0000 (20:40 +0000)]
Expect test_ossaudiodev to skip on Linux, too.  (It's broken.
Volunteers wanted to fix it!)

21 years agoSystematic testing of hex/oct constants.
Guido van Rossum [Wed, 12 Feb 2003 17:09:17 +0000 (17:09 +0000)]
Systematic testing of hex/oct constants.

21 years agoSF #660455 : patch by NNorwitz.
Guido van Rossum [Wed, 12 Feb 2003 17:05:26 +0000 (17:05 +0000)]
SF #660455 : patch by NNorwitz.

"Unsigned" (i.e., positive-looking, but really negative) hex/oct
constants with a leading minus sign are once again properly negated.
The micro-optimization for negated numeric constants did the wrong
thing for such hex/oct constants.  The patch avoids the optimization
for all hex/oct constants.

This needs to be backported to Python 2.2!

21 years agoSF #660455 : patch by NNorwitz.
Guido van Rossum [Wed, 12 Feb 2003 16:57:47 +0000 (16:57 +0000)]
SF #660455 : patch by NNorwitz.

"Unsigned" (i.e., positive-looking, but really negative) hex/oct
constants with a leading minus sign are once again properly negated.
The micro-optimization for negated numeric constants did the wrong
thing for such hex/oct constants.  The patch avoids the optimization
for all hex/oct constants.

This needs to be backported to Python 2.2!

21 years ago- Use distutils to find site-python (suggested by Thomas Heller, thanks!)
Jack Jansen [Wed, 12 Feb 2003 16:37:00 +0000 (16:37 +0000)]
- Use distutils to find site-python (suggested by Thomas Heller, thanks!)
- Fixed a bug for packages without MD5 checksum.

21 years agoIcons for the package manager.
Jack Jansen [Wed, 12 Feb 2003 16:20:23 +0000 (16:20 +0000)]
Icons for the package manager.

21 years agoThank you sir, can I have another.
Just van Rossum [Wed, 12 Feb 2003 16:19:39 +0000 (16:19 +0000)]
Thank you sir, can I have another.

21 years agoPhotoshop source file for package manager icon.
Jack Jansen [Wed, 12 Feb 2003 16:16:52 +0000 (16:16 +0000)]
Photoshop source file for package manager icon.

21 years agoUse bundlebuilder directly to build applets.
Jack Jansen [Wed, 12 Feb 2003 15:42:49 +0000 (15:42 +0000)]
Use bundlebuilder directly to build applets.

21 years agoAllow this to run both standalone and as a window in the IDE.
Jack Jansen [Wed, 12 Feb 2003 15:39:56 +0000 (15:39 +0000)]
Allow this to run both standalone and as a window in the IDE.

21 years agoMore int() around float arguments.
Jack Jansen [Wed, 12 Feb 2003 15:39:16 +0000 (15:39 +0000)]
More int() around float arguments.

21 years agoCreate applets slightly differently: by saving the sourcecode to a
Jack Jansen [Wed, 12 Feb 2003 15:38:37 +0000 (15:38 +0000)]
Create applets slightly differently: by saving the sourcecode to a
temporary location. This is needed to makethings work with the new
buildtools based on bundlebuilder.

21 years agoWhen in MacPython-OSX use bundlebuilder to create .app bundles.
Jack Jansen [Wed, 12 Feb 2003 15:37:26 +0000 (15:37 +0000)]
When in MacPython-OSX use bundlebuilder to create .app bundles.

21 years ago- Better way to find site-packages
Jack Jansen [Wed, 12 Feb 2003 15:36:25 +0000 (15:36 +0000)]
- Better way to find site-packages
- Catch stderr as well as stdout
- Fixed a bug with non-installable packages
- Parse .pth files after installing, so you don't have to restart Python (or
  the IDE) after installing.

21 years agoRenamed InstallManager to PackageManager, finished a first stab at the
Jack Jansen [Wed, 12 Feb 2003 12:47:56 +0000 (12:47 +0000)]
Renamed InstallManager to PackageManager, finished a first stab at the
implementation and integrated it into the IDE.

21 years agoIn a MultiList select all cells in the row, not only the first one.
Jack Jansen [Wed, 12 Feb 2003 12:47:00 +0000 (12:47 +0000)]
In a MultiList select all cells in the row, not only the first one.

21 years agoUpdated the Mac documentation to the current state of affairs.
Jack Jansen [Wed, 12 Feb 2003 09:58:33 +0000 (09:58 +0000)]
Updated the Mac documentation to the current state of affairs.

21 years agoMinor cleanup of new batch-list/dict code.
Tim Peters [Wed, 12 Feb 2003 05:28:58 +0000 (05:28 +0000)]
Minor cleanup of new batch-list/dict code.

21 years agoImplement another useful feature for proxies: in super(X, x), x may
Guido van Rossum [Wed, 12 Feb 2003 03:58:38 +0000 (03:58 +0000)]
Implement another useful feature for proxies: in super(X, x), x may
now be a proxy for an X instance, as long as issubclass(x.__class__, X).

21 years agoAdd missing cast in previous fix.
Guido van Rossum [Wed, 12 Feb 2003 03:36:05 +0000 (03:36 +0000)]
Add missing cast in previous fix.

21 years agoSF #532767: isinstance(x, X) should work when x is a proxy for an X
Guido van Rossum [Wed, 12 Feb 2003 03:32:58 +0000 (03:32 +0000)]
SF #532767: isinstance(x, X) should work when x is a proxy for an X
instance, as long as x.__class__ is X or a subclass thereof.
Did a little cleanup of PyObject_IsInstance() too.

21 years agoAn install manager window for the IDE and standalone use. Unfinished.
Jack Jansen [Tue, 11 Feb 2003 23:15:33 +0000 (23:15 +0000)]
An install manager window for the IDE and standalone use. Unfinished.

21 years agoAdd more missing PyErr_NoMemory() after failled memory allocs
Neal Norwitz [Tue, 11 Feb 2003 23:05:40 +0000 (23:05 +0000)]
Add more missing PyErr_NoMemory() after failled memory allocs

21 years agoImplemented batching for dicts in cPickle. This is after two failed
Tim Peters [Tue, 11 Feb 2003 22:43:24 +0000 (22:43 +0000)]
Implemented batching for dicts in cPickle.  This is after two failed
attempts to merge the C list-batch and dict-batch code -- they worked, but
it was a godawful mess to read.

21 years agoChanged database format to make fields adhere to PEP 241 where
Jack Jansen [Tue, 11 Feb 2003 22:40:59 +0000 (22:40 +0000)]
Changed database format to make fields adhere to PEP 241 where
applicable, and use a similar naming scheme for other fields. This
has drastically changed the structure, as the PEP241 names aren't
identifiers.

21 years agoAdd Str, a subclass of str.
Guido van Rossum [Tue, 11 Feb 2003 21:19:11 +0000 (21:19 +0000)]
Add Str, a subclass of str.

21 years agoImplemented list batching in cPickle.
Tim Peters [Tue, 11 Feb 2003 21:06:20 +0000 (21:06 +0000)]
Implemented list batching in cPickle.

21 years agoFix from SF #681367: inherit tp_as_buffer. This only applies to C
Guido van Rossum [Tue, 11 Feb 2003 20:39:59 +0000 (20:39 +0000)]
Fix from SF #681367: inherit tp_as_buffer.  This only applies to C
types -- Python types already inherited this.

21 years agoAdd compilation instructions for xxmodule.c.
Guido van Rossum [Tue, 11 Feb 2003 20:05:50 +0000 (20:05 +0000)]
Add compilation instructions for xxmodule.c.

21 years agoUnparenting BZ2File, as discussed in SF patch #661796.
Gustavo Niemeyer [Tue, 11 Feb 2003 18:46:20 +0000 (18:46 +0000)]
Unparenting BZ2File, as discussed in SF patch #661796.

* Modules/bz2module.c
  (BZ2FileObject): Now the structure includes a pointer to a file object,
   instead of "inheriting" one. Also, some members were copied from the
   PyFileObject structure to avoid dealing with the internals of that
   structure from outside fileobject.c.

  (Util_GetLine,Util_DropReadAhead,Util_ReadAhead,Util_ReadAheadGetLineSkip,
   BZ2File_write,BZ2File_writelines,BZ2File_init,BZ2File_dealloc,
   BZ2Comp_dealloc,BZ2Decomp_dealloc):
    These functions were adapted to the change above.

  (BZ2File_seek,BZ2File_close): Use PyObject_CallMethod instead of
   getting the function attribute locally.

  (BZ2File_notsup): Removed, since it's not necessary anymore to overload
   truncate(), and readinto() with dummy functions.

  (BZ2File_methods): Added xreadlines() as an alias to BZ2File_getiter,
   and removed truncate() and readinto().

  (BZ2File_get_newlines,BZ2File_get_closed,BZ2File_get_mode,BZ2File_get_name,
   BZ2File_getset):
    Implemented getters for "newlines", "mode", and "name".

  (BZ2File_members): Implemented "softspace" member.

  (BZ2File_init): Reworked to create a file instance instead of initializing
   itself as a file subclass. Also, pass "name" object untouched to the
   file constructor, and use PyObject_CallFunction instead of building the
   argument tuple locally.

  (BZ2File_Type): Set tp_new to PyType_GenericNew, tp_members to
   BZ2File_members, and tp_getset to BZ2File_getset.

  (initbz2): Do not set BZ2File_Type.tp_base nor BZ2File_Type.tp_new.

* Doc/lib/libbz2.tex
  Do not mention that BZ2File inherits from the file type.

21 years agoPut proper tests in classmethod_get(). Remove the type argument to
Guido van Rossum [Tue, 11 Feb 2003 18:44:42 +0000 (18:44 +0000)]
Put proper tests in classmethod_get().  Remove the type argument to
descr_check(); it wasn't useful.  Change the type argument of the
various _get() methods to PyObject * because the call signature of
tp_descr_get doesn't guarantee its type.

21 years agoRefactor instancemethod_descr_get() to (a) be more clear, (b) be safe
Guido van Rossum [Tue, 11 Feb 2003 18:43:00 +0000 (18:43 +0000)]
Refactor instancemethod_descr_get() to (a) be more clear, (b) be safe
in the light of weird args, and (c) not to expect None (which is now
changed to NULL by slot_tp_descr_get()).

21 years agoSF bug 684667: Modules/selectmodule.c returns NULL without exception set.
Tim Peters [Tue, 11 Feb 2003 17:18:58 +0000 (17:18 +0000)]
SF bug 684667: Modules/selectmodule.c returns NULL without exception set.
select_select() didn't set an exception in the SELECT_USES_HEAP case when
malloc() returned NULL.

21 years agoInline create_specialmethod() -- since METH_CLASS is done differently
Guido van Rossum [Tue, 11 Feb 2003 17:12:46 +0000 (17:12 +0000)]
Inline create_specialmethod() -- since METH_CLASS is done differently
now, it was only called once, and its existence merely obfuscates the
control flow.

21 years agoAdded tests to ensure that list and dict "chunking" are actually
Tim Peters [Tue, 11 Feb 2003 16:40:16 +0000 (16:40 +0000)]
Added tests to ensure that list and dict "chunking" are actually
getting done.  Since this isn't yet implemented in cPickle, the
new tests are in TempAbstractPickleTests (which cPickle doesn't
run).

21 years ago- More int() calls around floating point numbers passed where integers are
Jack Jansen [Tue, 11 Feb 2003 16:26:26 +0000 (16:26 +0000)]
- More int() calls around floating point numbers passed where integers are
  expected.
- Fixed resizing of multi-column lists, somewhat.