Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
base repository: python/cpython
base: main
head repository: python/cpython
compare: 2.4
This comparison is big! We’re only showing the most recent 250 commits
Commits on Jun 14, 2006
objects of same type/of subclasses of the other.
 (backport from rev. 46952)
mime.types file for determining MIME types.
 (backport from rev. 46955)
Commits on Jun 17, 2006
Old url returned status code:301 Moved permanently.
(Backport from r47005)
Commits on Jun 18, 2006
Commits on Jun 21, 2006
Commits on Jun 23, 2006
  ('[' and ']' were not accepted in unquoted attribute values)
Commits on Jun 27, 2006
…on at the same time as the 2.5 versions would break the 2.5 tests since the install dir was removed.
Commits on Jun 28, 2006
Fix bug #1512695: cPickle.loads could crash if it was interrupted with
a KeyboardInterrupt since PyTuple_Pack was passed a NULL.
Commits on Jun 29, 2006
(modified patch by Sam Ruby; changed to use separate REs for start and end
 tags to reduce matching cost for end tags; extended tests; updated to avoid
 breaking previous changes to support IPv6 addresses in unquoted attribute
 values)
Commits on Jul 05, 2006
 (backport from rev. 47244)
Commits on Jul 15, 2006
Bug #15187702 : ext/win-cookbook.html has a broken link to distutils
Commits on Jul 16, 2006
Commits on Jul 26, 2006
… use of mvwgetnstr(); it was conditionalized a few lines below. Fix from Paul Eggert. I also tried out the STRICT_SYSV_CURSES case and am therefore removing the 'untested' comment.
Commits on Jul 27, 2006
Bug #1529297:  The rewrite of doctest for Python 2.4 unintentionally
lost that tests are sorted by name before being run.  ``DocTestFinder``
has been changed to sort the list of tests it returns.
Commits on Jul 28, 2006
  methods now allow their database parameter to be None as the
  sleepycat API allows.

also adds a testcase.

backport of trunk commit 50889 to 2.4.
    Forward port some fixes that were in email 2.5 but for some reason didn't
    make it into email 4.0.  Specifically, in Message.get_content_charset(),
    handle RFC 2231 headers that contain an encoding not known to Python, or a
    character in the data that isn't in the charset encoding.  Also forward
    port the appropriate unit tests.

Also, this resolves SF bug #1414018.
Commits on Jul 30, 2006
refers to file descriptors, not file objects.
   (backport from rev. 50974)
of msvccompiler, and mention Cygwin as an alternative.
Fixes #1257728.
Don't kill a normal instance of python running on windows when checking
to kill a cygwin instance.  build\\python.exe was matching a normal
windows instance.  Prefix that with a \\ to ensure build is a directory
and not PCbuild.  As discussed on python-dev.
Commits on Aug 09, 2006
Commits on Aug 13, 2006
Commits on Aug 14, 2006
raises the correct exceptions.
 (backport from rev. 51285)
when file is read-only.
 (backport from rev. 51287)
Commits on Aug 18, 2006
Additionally, remove a faulty example showing PySequence_SetItem applied
to a newly created list object and add notes that this isn't a good idea.
 (backport)
 (backport from rev. 51368)
Commits on Aug 22, 2006
- Patch #1541585: fix buffer overrun when performing repr() on
  a unicode string in a build with wide unicode (UCS-4) support.
Commits on Aug 24, 2006
Fix SF bug #1545837: array.array borks on deepcopy.
array.__deepcopy__() needs to take an argument, even if it doesn't actually
use it. Will backport to 2.5 and 2.4 (if applicable.)
Commits on Sep 05, 2006
i_divmod():  As discussed on Python-Dev, changed the overflow
checking to live happily with recent gcc optimizations that
assume signed integer arithmetic never overflows.
Commits on Sep 06, 2006
of os.urandom().
 (backport from rev. 51762)
Commits on Sep 07, 2006
Fixed a few bugs on cjkcodecs:
- gbk and gb18030 codec now handle U+30FB KATAKANA MIDDLE DOT correctly.
- iso2022_jp_2 codec now encodes into G0 for KS X 1001, GB2312
 codepoints to conform the standard.
- iso2022_jp_3 and iso2022_jp_2004 codec can encode JIS X 0213:2
 codepoints now.
Commits on Sep 11, 2006
As mentioned on python-dev, reverting patch #1504333 because it introduced
an infinite loop in rev 47154.

This patch also adds a test to prevent the regression.
Commits on Sep 19, 2006
Commits on Sep 27, 2006
Handle failure from PyModule_GetDict() (Klocwork 208).

Fix a bunch of refleaks in the init of the module.  This would only be found
when running python -v.
Bug #1548092: fix curses.tparm seg fault on invalid input.  Needs
backport to 2.5.1 and earlier.
Check return result from Py_InitModule*().  This API can fail.

Probably should be backported.
[Possibly controversial because it adds a parameter to a method.
 This parameter isn't documented, however, so arguably it's a private
 detail, and the fix is necessary to make GzipFile.flush() behave more
 similarly to regular file object.]

Patch #1110248: SYNC_FLUSH the zlib buffer for GZipFile.flush.
Partially fixes #1110242.
Commits on Sep 28, 2006
Add a missing incref.
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.

[A few lines below the code in 2.4 touched by the patch, there's already
 a similar check of (intval == -1 && PyErr_Occurred()), so I think
 this function can already report such errors, and therefore the fix
 still applies.  Perhaps Michael can clarify what he was referring to. --amk]
Commits on Sep 29, 2006
SF patch #1227568, bug #1219273, Expression AST node not documented.
Backport candidate if anyone cares.
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.
SF bug #1328915, try to word kill a bit more generically.  Backport candidate.
Free coding spec (cs) if there was an error to prevent mem leak.
Maybe backport candidate.

[Bugfix seems applicable to 2.4 to me. --amk]
Fix an int/long mismatch identified here:
        http://www.tortall.net/mu/blog/2005/12/01

Pointed out from SF #1365916.

Backport candidate.
Bug fix for [ 1331062 ] utf 7 codec broken.

Backport candidate.
Don't leak the list object if there's an error allocating the item
storage.  Backport candidate.
Fix the socket tests so they can be run concurrently.  Backport candidate
Commits on Sep 30, 2006
keyword arguments any more (previously they accepted them, but didn't
use them).
 (backport from rev. 52058)
but also for functions.
 (backport from rev. 52069)
datetime's strftime function.
 (backport from rev. 52072)
to encodings.search_function() contains a dot.
 (backport from rev. 52075)
Commits on Oct 03, 2006
Another problem reported by Coverity.  Backport candidate.
Make sure memory is properly cleaned up in file_init.

Backport candidate.
Patch #1540470, for OpenBSD 4.0.  Backport candidate for 2.[34].
Fix memory leak reported by valgrind while running test_subprocess
Make staticmethod and classmethod complain about keyword args.
Fix memory leaks in some conditions.

Reported by Klocwork #152.
Fix memory leak under some conditions.

Reported by Klocwork, #98.
Handle malloc failure.

Klocwork 281
Handle a NULL name properly.
Stop INCREFing name, then checking if it's NULL.  name (f_name) should never
be NULL so assert it.  Fix one place where we could have passed NULL.

Reported by Klocwork #66.
Move the initialization of size_a down below the check for a being NULL.

Reported by Klocwork #106.

[Slight change required: in 2.5 Py_ssize_t is used, but 2.4 uses int.]
Fix memory leaks spotted by Klocwork #37.
Don't deref v if it's NULL.

Klocwork #214
Check return of PyMem_MALLOC (garbage) is non-NULL.
Check seq in both portions of if/else.

Klocwork #289-290.
PyModule_GetDict() can fail, produce fatal errors if this happens on startup.

Klocwork #298-299.
Handle a few more error conditions.

Klocwork 301 and 302.  Will backport.
Handle more mem alloc issues found with failmalloc

[The other half of this patch affected Python/symtable.c, and wasn't
 relevant for the 2.4 branch. --amk]
nextlink can be NULL if teedataobject_new fails, so use XINCREF.
Ensure that dataobj is never NULL.

Reported by Klocwork #102
No functional change.  Add comment and assert to describe why there
cannot be overflow which was reported by Klocwork.  Discussed on
python-dev.
Prevent memory leak on error.

Reported by Klocwork #36
Handle failures from lookup.

Klocwork 341-342
It's very unlikely, though possible that source is not a string.  Verify
that PyString_AsString() returns a valid pointer.  (The problem can
arise when zlib.decompress doesn't return a string.)

Klocwork 346
Commits on Oct 04, 2006
…sense to

test for parts > 3 when we use .split(..., 2).
on undefined behaviour of the C compiler anymore.
* unified the way intobject, longobject and mystrtoul handle
  values around -sys.maxint-1.

* in general, trying to entierely avoid overflows in any computation
  involving signed ints or longs is extremely involved.  Fixed a few
  simple cases where a compiler might be too clever (but that's all
  guesswork).

* more overflow checks against bad data in marshal.c.
I'm not sure why this code allocates this string for the error message.
I think it would be better to always use snprintf and have the format
limit the size of the name appropriately (like %.200s).

Klocwork #340
Handle malloc and fopen failures more gracefully.

Klocwork 180-181
Move/copy assert for tstate != NULL before first use.
Verify that PyEval_Get{Globals,Locals} returned valid pointers.

Klocwork 231-232
Verify verdat which is returned from malloc is not NULL.
Ensure we don't pass NULL to free.

Klocwork #306 (at least the first part, checking malloc)
Try to handle a malloc failure.  I'm not entirely sure this is correct.
There might be something else we need to do to handle the exception.

Klocwork # 212-213

[I think this needs more work; a malloc() failure will cause a match to fail,
 but nothing raises MemoryError.  I'll work on this on the trunk and backport.
 --amk]
Commits on Oct 05, 2006
Really address the issue of where to place the assert for leftblock.
(Followup of Klocwork 274)
Fix segfault when doing string formatting on subclasses of long if
__oct__, __hex__ don't return a string.

Klocwork 308
cpathname could be NULL if it was longer than MAXPATHLEN.  Don't try
to write the .pyc to NULL.

Check results of PyList_GetItem() and PyModule_GetDict() are not NULL.

Klocwork 282, 283, 285
Move the assert which checks for a NULL pointer first.
Klocwork #274.
If _stat_float_times is false, we will try to INCREF ival which could be NULL.
Return early in that case.  The caller checks for PyErr_Occurred so this
should be ok.

Klocwork #297
Cause a PyObject_Malloc() failure to trigger a MemoryError, and then
add 'if (PyErr_Occurred())' checks to various places so that NULL is
returned properly.
Handle allocation failures gracefully.  Found with failmalloc.
Many (all?) of these could be backported.
 applied to pyarena.c, compile.c, and symtable.c, which were different in 2.4.]

Fix more memory allocation issues found with failmalloc.
…ymtable.c,

 and _elementtree.c weren't applicable]

Klocwork made another run and found a bunch more problems.
This is the first batch of fixes that should be easy to verify based on context.
This fixes problem numbers: 220 (ast), 323-324 (symtable),
321-322 (structseq), 215 (array), 210 (hotshot), 182 (codecs), 209 (etree).
 but looks correct on a casual inspection and hasn't been modified
 in the trunk.  Does anyone want to review further?]

Ensure we don't write beyond errText.  I think I got this right, but
it definitely could use some review to ensure I'm not off by one
and there's no possible overflow/wrap-around of bytes_left.
Reported by Klocwork #1.

Fix a problem if there is a failure allocating self->db.
Found with failmalloc.
Reported by Klocwork #151.

v2 can be NULL if exception2 is NULL.  I don't think that condition can happen,
but I'm not sure it can't either.  Now the code will protect against either
being NULL.
It's highly unlikely, though possible for PyEval_Get*() to return NULLs.
So be safe and do an XINCREF.

Klocwork # 221-222.
 this code is only used if WITHOUT_COMPLEX is *not* defined, which is the
 common case for Python builds.]

This code is actually not used unless WITHOUT_COMPLEX is defined.
However, there was no error checking that PyFloat_FromDouble returned
a valid pointer.  I believe this change is correct as it seemed
to follow other code in the area.

Klocwork # 292.
Handle a whole lot of failures from PyString_FromInternedString().

Should fix most of Klocwork 234-272.

[Backport r51400 | neal.norwitz]

Move initialization of interned strings to before allocating the
object so we don't leak op.  (Fixes an earlier patch to this code)

Klockwork #350
 you find that Python does print "MemoryError".  There's no traceback
 and no indication of which line of code is responsible, but it's
 better than a segfault.]

Handle NULL nodes while parsing.  I'm not entirely sure this is correct.
There might be something else that needs to be done to setup the error.

Klocwork #295.
PyFunction_SetDefaults() is documented as taking None or a tuple.
A NULL would crash the PyTuple_Check().  Now make NULL return a SystemError.

Reported by Klocwork #73.
 backported.]

Use sizeof(buffer) instead of duplicating the constants to ensure they won't
be wrong.

The real change is to pass (bufsz - 1) to PyOS_ascii_formatd and 1
to strncat.  strncat copies n+1 bytes from src (not dest).

Reported by Klocwork #58.
Commits on Oct 06, 2006
- remove Sleepycat name now that they have been bought
Patch #1357836:

Prevent an invalid memory read from test_coding in case the done flag is set.
In that case, the loop isn't entered.  I wonder if rather than setting
the done flag in the cases before the loop, if they should just exit early.

This code looks like it should be refactored.

Backport candidate (also the early break above if decoding_fgets fails)
Fix #132 from Coverity, retval could have been derefed
if a continue inside a try failed.
Remove dead code (reported by HP compiler).

Can probably be backported if anyone cares.
Commits on Oct 08, 2006
Bug #1572832: fix a bug in ISO-2022 codecs which may cause segfault
when encoding non-BMP unicode characters.  (Submitted by Ray Chason)
…kes away

the need for the out-of-tree universal binary support that was used to build
the 2.4.3 installer.

Missing here relative to that tree are some changes to IDLE, IMHO those patches
aren't appropriate for the 2.4 branch and users are better of using 2.5's IDLE.
Commits on Oct 09, 2006
Fix three nits found by Coverity, adding null checks and comments.

[This commit only makes two changes.  One change in the original patch
 is just adding a comment, and another adds a 'base != NULL' check to
 silence Coverity, but a comment adds that that base is never going to
 be NULL.  I didn't backport that change. --amk]
Fix problems found by Coverity.

_ssl.c: under fail: self is DECREF'd, but it would have been NULL.

_csv.c: I'm not sure if lineterminator could have been anything other than
a string.  However, other string method calls are checked, so check this
one too.
Fix problems found by Coverity.

longobject.c: also fix an ssize_t problem
  <a> could have been NULL, so hoist the size calc to not use <a>.

[The ssize_t change isn't needed for 2.4.  The other changes in this revision
 are to modules not present in 2.4. --amk]
- reset errno before calling confstr - use confstr() doc to simplify
  checks afterwards
- Correct implementation and documentation of os.confstr.  Add a simple
  test case.  I've yet to figure out how to provoke a None return I can test.
- Address issues brought up by MvL on python-checkins.
  I tested this with valgrind on amd64.

  The man pages I found for diff architectures are inconsistent on this.
  I'm not entirely sure this change is correct for all architectures
  either.

  Perhaps we should just over-allocate and not worry about it?

The change to return None instead of "" in case of unconfigured
values has not been backported.
fixing an unlikely crash bug in dict resizing, SF
bug 1456209.

The rest of rev 46589 changes whether Python suppresses
exceptions during some dict-related comparisons.  While I
think that's a good idea, it does change visible behavior at
times, and there was already some complaining about that on
the trunk.  Not a good idea for backporting.  The part of
46589 checked in here can at worst stop segfaults, and I doubt
anyone will gripe about that ;-)
Windows builbot's "build" step to the start of its "test"
step.

This is poke-and-hope.  The hope is that compilation failures
on Windows will become visible to the buildbot (bsddb has
apparently been failing to compile in 2.4 on Windows "for
some time" now, but the buildbots haven't noticed that).
about truly wrong code.

Checkin comment from 51262:

Can't return NULL from a void function.  If there is a memory error,
about the best we can do is call PyErr_WriteUnraisable and go on.
We won't be able to do the call below either, so verify delstr is valid.
Commits on Oct 10, 2006
#1494314: Fix a regression with high-numbered sockets in 2.4.3. This
means that select() on sockets > FD_SETSIZE (typically 1024) work again.
The patch makes sockets use poll() internally where available.
_bsddb on Windows (Martin recently repaired that -- thanks!).
Commits on Oct 17, 2006
Repair so that it's back to how it was in 2.4.3.

Needs to be forward-ported to 2.5 branch and trunk.
Commits on Oct 26, 2006
Commits on Nov 07, 2006
Commits on Nov 29, 2006
Commits on Jan 23, 2007
SF patch #1630975: Fix crash when replacing sys.stdout in sitecustomize

When running the interpreter in an environment that would cause it to set
stdout/stderr/stdin's encoding, having a sitecustomize that would replace
them with something other than PyFile objects would crash the interpreter.
Fix it by simply ignoring the encoding-setting for non-files.

This could do with a test, but I can think of no maintainable and portable
way to test this bug, short of adding a sitecustomize.py to the buildsystem
and have it always run with it (hmmm....)
Commits on Feb 25, 2007
Don't use a fixed temporary name (gdbm).
Don't use our own temp name creation (dbm).
Commits on May 15, 2007
the traceback inadvertently or maliciously closing the comment and
injecting HTML into the error page.
 (backport from rev. 55348)
Commits on Jun 05, 2007
Bug #1728403: Fix a bug that CJKCodecs StreamReader hangs when it
reads a file that ends with incomplete sequence and sizehint argument
for .read() is specified.
Commits on Jul 26, 2007
- be more strict about the build environment
- update some of the 3th party libraries (later patchlevels)
Commits on Jan 19, 2008
- Issue #1336: fix a race condition in subprocess.Popen if the garbage
  collector kicked in at the wrong time that would cause the process
  to hang when the child wrote to stderr.
Commits on Mar 02, 2008
problems:
52448, 52468, 52472, 52475, 52646, 52797, 52802, 52863, 52999, 53001,
53101, 53371, 53373, 53383, 53384, 53736, 53812, 53921, 55578, 55580,
55581, 55772, 55775, 56557, 57093, 57094, 58630, 60114
Added checks for integer overflows, contributed by Google. Some are
only available if asserts are left in the code, in cases where they
can't be triggered from Python code.
Commits on Jul 28, 2008
to the signed max value similar to 2.5 and trunk.

Issue #2620: Overflow checking when allocating or reallocating memory
was not always being done properly in some python types and extension
modules.  PyMem_MALLOC, PyMem_REALLOC, PyMem_NEW and PyMem_RESIZE have
all been updated to perform better checks and places in the code that
would previously leak memory on the error path when such an allocation
failed have been fixed.
Commits on Nov 12, 2008
  overflows in the imageop and rgbimgmodule modules.
  zlib.decompressobj().flush(val) when val is not positive.
  conditions in the PyOS_vsnprintf C API function. CVE-2008-3144.
…ned size

  parameter but was not verifying that it was greater than zero.  Values
  less than zero will now raise a SystemError and return NULL to indicate a
  bug in the calling C code. CVE-2008-1887.

  backport r62261, r62271
… could

  segfault as a result. CVE-2008-4864.

backport r66689
Commits on Nov 18, 2008
Commits on Dec 13, 2008
Issue #4469: Prevent expandtabs() on string and unicode
objects from causing a segfault when a large width is passed
on 32-bit platforms.
Commits on Dec 20, 2008
Commits on Jan 28, 2010
Showing 730 changed files with 18,596 additions and 6,697 deletions.

This file was deleted.

121 .hgtags
@@ -1,54 +1,67 @@
17eff686be30de0869e6429dc899ebd5d11bfcfe v0.9.8
528bb189d30311d2cea71ffae3e1940e1f17097d v0.9.9
20f984c32c71fc7269e0da860f76ba0a36eefce5 v1.0.1
c2bc4e060320b62a541599d4e60b624a2a583c55 v1.0.2
0a445ebc9a917d5b3fbd6f62e49cc4f3056b4d9c v1.1
df3bafb2d3fa64ef00d8357101477ea9721cb66a v1.1.1
9d47346c7e1d544db4cd96712cbc3aa656dc48dc v1.2b1
366e7871dc1cc5c6b75750eb3d7dbd3e83913533 v1.2b2
e39e29c31050e38e8abf2af4ef9e8e4518c8ce3c v1.2b3
1efa7bc3bb11bfb4d6318407b0ecebc238874f36 v1.2b4
1f07c2d5483fc78a873a63217a4671f2b6b5a5e8 v1.2
5e17909fb6c8155c074a0cef66768746be08de41 v1.3b1
290c807bff1c8e6b888fca28c9d0f77e48911b37 v1.3
7ec5fea9cc70dd94276c11dbdca9814dd5a37042 v1.4b1
6993ce4906d383955d04af5933d219a132012ec1 v1.4b2
b3d40b261ddbd2d86b1eaf7c4b3f4d60fdbf25f4 v1.4b3
9b3b8b854609b679520aab52aaf221a9c549cdf4 v1.4
00f0e3c2b34ec3e518525f99dae537d3e1c5f3c8 v1.5a1
fb128ab641015e92cc0c227a2e3be3ae71aba00d v1.5a2
000b1d4c1aa011c2d407900bce7b829eedcb745a v1.5a3
31286d460c6ce43fc86771da2fc32eec668c0a72 v1.5a4
798e142331dfe161335f0649ed923bfdd9730e47 v1.5b1
548822e716199517482dab9ea77cf6c7ae57f6f5 v1.5b2
c6cb9dd6301feb193992f97f07d32a7c01e22ffc v1.5
38b89e87b4d8706569c252ef36066657e35782cf v1.5.1
21c500f1f5ac52bc0b7a176f9c152a1b8bf70642 v1.5.2a1
1ac177b0abf82cafabef74acde56bbe247fe96c0 v1.5.2a2
0861eb05ee9add42e08f2ad7c01ef812ff07fcf3 v1.5.2b1
778da2ca74d7c32b1c3f7a690216e0638163aa72 v1.5.2b2
40ed8e5acf0916834c6f5ed5b985f5f99e9f6c48 v1.5.2c1
6782780cabef301ef63a82a01bfb9bee89bedb80 v1.5.2
05b1fe1e483635d3a008e5cdb8dd99d921a58abd v1.6a1
e6b84fa31dfda2295b710169ae623611963036e2 v1.6a2
814b3027faef0c63eabbc2048de47e0dca187657 v2.0b1
a9b82af0e08d20685d39d2cf03b510b302c022ac v2.0b2
2dd741465060d88cb7a4aff7c57aef5cb9e2c7be v2.0c1
626bb7ac74cf67c9f239a17a1e9d3456ebd5cbef v2.0
0180e5ac89c19553284a72fc6303f05f4a5dfc4e v2.1a1
03c65c82c38ea224c68cdc67ef62ac966881d61b v2.1a2
c098f7c395893215e002db26c7557085e8b3527d v2.1b1
c50081a886fa1c51bae376cfd1d2e03d5867049b v2.1b2
7e011c31542e856bc912de6b023e446faea2ace2 v2.1c1
e4f05aa7e8b6c3dc5ae04b1d3c11fcf81691d905 v2.1c2
2b065ad3294dfc4b9c91aa2557b9a787c51ac0df v2.1
3cfc3951b7012bb015ecd37c2f9d390354852e53 v2.2a3
cdbf933b0494b161be7c66862a77607a753b6f2b v2.3c1
cb95b6bc0d633a598bf61b9897c880a684a2eb5c v2.3c2
691a4d978dcffae659e9b3e969d5d256cf413987 v2.4a1
388ea52b7402a43ecf64e7497c30fb97670d9d26 v2.4a2
e0f13b300674001b5df55ef93b2d51a53ccda2db v2.4a3
8c0cca58659dac297ff31d3c0f68f24439a68d2e v2.4b1
ed396533d05e26c9d4a91fc94f89c0033fc7ae04 v2.4b2
bbce19cba40401a87508677a2d6719397ccc2d8c v2.4c1
9aed528daf61c323e10448ebd44ba70b92579023 v2.4
64cc5439e10a6fdf984effaf0141e94fa4cc1004 v0.9.8
78a7ed6953025e7ecdde9585099b01a6ae40b76a v0.9.9
b15b8cc9b8d10e0352a0b8b7e8d51fa309db6df3 v1.0.1
0326b5d61445ee3a8d3de28119f9652cb72d2e3f v1.0.2
832615ec07646e310c85316b8ba6bc9b17ad3547 v1.1
9895475d18c7b5f32adaf78f71886ae041e4d10c v1.1.1
16eb4c51ee97169046340998e850a63c65225b0a v1.2b1
b45c688756d04fb84d4a0d518fc3d7e3cb25fa8d v1.2b2
9e82daf7605bad7976a9abc997cb5e0abe434078 v1.2b3
065e31cf5862e27521cf5725b003aed211f091b2 v1.2b4
e72257e655454d569468da8b1189e0ec336f3536 v1.2
e63d83f8275853aaaa3d1972cb86564505e65583 v1.3b1
7d743c865a9aa6bde8b603e32e0542031bba3c33 v1.3
4fc85c82cc222554ae6b9c0b87776ed5f2b70c6e v1.4b1
129f1299d4e97e884bbbbdd00baf101d178973e6 v1.4b2
44a82ac654a4175569deed8e8a94b0cc8edee08d v1.4b3
db49494c93dc73de06d5721c74eab533a947a92c v1.4
062aed8a4ce2c91c81b80e29f02faff1cf5a761b v1.5a1
c9498ac988372575cf7028b86395b900c9b0a840 v1.5a2
dc5c968ec992aab3d40a7189df0c443d1c7a1a68 v1.5a3
746654a0af680c7d9b814b210a026eb91bec9533 v1.5a4
8ff58b5730f06be08fbbdc2bf592226f7a736201 v1.5b1
eb78658d819fb0af09a8e6f9bedcb670805ed5f6 v1.5b2
84461011a1a0ab402e352f06748f29fb5b5559e5 v1.5
44aba4d26b01fbae0403efe654f9fd0347606732 v1.5.1
fed63ccbe6dc3ac663bfe97a2f7006b1b28568f9 v1.5.2a1
21d71f2e27248a0f4e393d0fc321ecf9b89321d2 v1.5.2a2
f08c7a2a56f80741f5f192fd0ebe0b0967a203cf v1.5.2b1
8fe7ec4b4fc1518fcac89e6bf674fbbce16150a9 v1.5.2b2
39fb0dcc83dc375c1565ba65dbce0ed59b1359c9 v1.5.2c1
61c91c7f101bab3149adfcd5646ae40e048de712 v1.5.2
605eb9326ffe1fd1e43f40e2338d6652ab449fdf v1.6a1
011bee8fd9f7f4da457ec71596484fb0882c0614 v1.6a2
35c4fc1414a59888614b9be784a25f233ba67984 v2.0b1
55bba197d4870cdae62aeca00e20240a756b84f8 v2.0b2
e276329cce036a5f9e9d3451256dca5984e543dc v2.0c1
2fa4e35083e02342ca014bf5bfba46aecb816c31 v2.0
b60831eeab5a06dd3c5e8297a99e39297aa8794b v2.1a1
b382f1f07ec6b2c95551658b30c6139eeb32077a v2.1a2
d0c830db5e68edd4aaa3401216e610c9ff145826 v2.1b1
b59a536ae1ef3774fd85c17f623e8926b7b6c095 v2.1b2
d611276e9ad53b5d32d1e8065e1d811c32f7d96f v2.1c1
ff065e674af6c9ab895bd9eff7d9e9039a376c7d v2.1c2
020e95d8180d7943fe54701e1db0a7d7d87e2b1e v2.1
08796a137f1ada2462f7a3177306df5f67a767e1 v2.2a3
d054c29647f90bccb8345bd779bca1eecf2dd7f2 v2.3c1
fce5c9e9abc722394cb2e909b7e2a39080d4448e v2.3c2
92ca658fd420095b6284c9ce6e9082a80285ec9c v2.4a1
055fc6955f3c6522bfeb7ed4c671c97d5baaaac2 v2.4a2
186b72550e53533ef6175f6411f932c1298193d7 v2.4a3
53cff04283855adf88ed0c0fd3698827ca843637 v2.4b1
7e387a9dcc79954a77695adef8b593da35be1214 v2.4b2
ff80d8bbef6e13426c8a85d7f9d837b8f8f89834 v2.4c1
f31e18d313c7a4fc66914b2d27e130a0f72c0b69 v2.4
1195f9ba3439097cc5b5a367e3ae1b43f157b264 v2.4.1c1
333cf303543b680ec5e3fdf7e8c9661f9488a50e v2.4.1c2
f9054d235870029afa33ef945bca7ece99616c10 v2.4.1
d02d387554e200befceec999b788f4593b434b49 v2.4.2c1
8d37276fdf077d6d23d963d3f7f95381d00f1926 v2.4.2
7c5be7c0fdfdbbc0ac1d91c07038bc81412da412 v2.4.3c1
8cca2492626ce408cd567110811c0692fd1d37dd v2.4.3
baaeea722b1c97ca03179e5a02a4717e7017ba2a v2.4.4c1
592ac93532efdfa9a40f47b96b1c1231d2eae0e5 v2.4.4
1f7d628c70a9aefe762c2c32210876faf8d64c78 v2.4.5c1
d8df4aa06261de5e4c0aa051e448697d4791e437 v2.4.5
a6c3c715e2b70740c4b6b4f7dc6f47b16a7e5905 v2.4.6c1
f3f1f1462c82536bb23796e70c85522144ee24db v2.4.6
@@ -43,4 +43,5 @@ def main():
def chomp(s):
return s.rstrip('\n')

main()
if __name__ == '__main__':
main()

This file was deleted.

@@ -10,7 +10,7 @@ blddir= ../..
srcdir= ../..

# Python version
VERSION= 2.3
VERSION= 2.4

# Compiler flags
OPT= -g
@@ -3,6 +3,8 @@
# XXX There should be separate exceptions for the various reasons why
# XXX an RPC can fail, rather than using RuntimeError for everything

# XXX Need to use class based exceptions rather than string exceptions

# XXX The UDP version of the protocol resends requests when it does
# XXX not receive a timely reply -- use only for idempotent calls!

@@ -90,13 +92,13 @@ def unpack_auth(self):
return (flavor, stuff)

def unpack_callheader(self):
xid = self.unpack_uint(xid)
xid = self.unpack_uint()
temp = self.unpack_enum()
if temp <> CALL:
if temp != CALL:
raise BadRPCFormat, 'no CALL but %r' % (temp,)
temp = self.unpack_uint()
if temp <> RPCVERSION:
raise BadRPCVerspion, 'bad RPC version %r' % (temp,)
if temp != RPCVERSION:
raise BadRPCVersion, 'bad RPC version %r' % (temp,)
prog = self.unpack_uint()
vers = self.unpack_uint()
proc = self.unpack_uint()
@@ -108,7 +110,7 @@ def unpack_callheader(self):
def unpack_replyheader(self):
xid = self.unpack_uint()
mtype = self.unpack_enum()
if mtype <> REPLY:
if mtype != REPLY:
raise RuntimeError, 'no REPLY but %r' % (mtype,)
stat = self.unpack_enum()
if stat == MSG_DENIED:
@@ -123,7 +125,7 @@ def unpack_replyheader(self):
raise RuntimeError, \
'MSG_DENIED: AUTH_ERROR: %r' % (stat,)
raise RuntimeError, 'MSG_DENIED: %r' % (stat,)
if stat <> MSG_ACCEPTED:
if stat != MSG_ACCEPTED:
raise RuntimeError, \
'Neither MSG_DENIED nor MSG_ACCEPTED: %r' % (stat,)
verf = self.unpack_auth()
@@ -139,7 +141,7 @@ def unpack_replyheader(self):
raise RuntimeError, 'call failed: PROC_UNAVAIL'
if stat == GARBAGE_ARGS:
raise RuntimeError, 'call failed: GARBAGE_ARGS'
if stat <> SUCCESS:
if stat != SUCCESS:
raise RuntimeError, 'call failed: %r' % (stat,)
return xid, verf
# Caller must get procedure-specific part of reply
@@ -329,7 +331,7 @@ def bindresvport(sock, host):
sock.bind((host, i))
return last_resv_port_tried
except socket.error, (errno, msg):
if errno <> 114:
if errno != 114:
raise socket.error, (errno, msg)
raise RuntimeError, 'can\'t assign reserved port'

@@ -348,7 +350,7 @@ def do_call(self):
u = self.unpacker
u.reset(reply)
xid, verf = u.unpack_replyheader()
if xid <> self.lastxid:
if xid != self.lastxid:
# Can't really happen since this is TCP...
raise RuntimeError, 'wrong xid in reply %r instead of %r' % (
xid, self.lastxid)
@@ -387,7 +389,7 @@ def do_call(self):
u = self.unpacker
u.reset(reply)
xid, verf = u.unpack_replyheader()
if xid <> self.lastxid:
if xid != self.lastxid:
## print 'BAD xid'
continue
break
@@ -443,7 +445,7 @@ def dummy(): pass
u = self.unpacker
u.reset(reply)
xid, verf = u.unpack_replyheader()
if xid <> self.lastxid:
if xid != self.lastxid:
## print 'BAD xid'
continue
reply = unpack_func()
@@ -678,11 +680,11 @@ def handle(self, call):
xid = self.unpacker.unpack_uint()
self.packer.pack_uint(xid)
temp = self.unpacker.unpack_enum()
if temp <> CALL:
if temp != CALL:
return None # Not worthy of a reply
self.packer.pack_uint(REPLY)
temp = self.unpacker.unpack_uint()
if temp <> RPCVERSION:
if temp != RPCVERSION:
self.packer.pack_uint(MSG_DENIED)
self.packer.pack_uint(RPC_MISMATCH)
self.packer.pack_uint(RPCVERSION)
@@ -691,11 +693,11 @@ def handle(self, call):
self.packer.pack_uint(MSG_ACCEPTED)
self.packer.pack_auth((AUTH_NULL, make_auth_null()))
prog = self.unpacker.unpack_uint()
if prog <> self.prog:
if prog != self.prog:
self.packer.pack_uint(PROG_UNAVAIL)
return self.packer.get_buf()
vers = self.unpacker.unpack_uint()
if vers <> self.vers:
if vers != self.vers:
self.packer.pack_uint(PROG_MISMATCH)
self.packer.pack_uint(self.vers)
self.packer.pack_uint(self.vers)
@@ -812,7 +814,7 @@ def loop(self):
def session(self):
call, host_port = self.sock.recvfrom(8192)
reply = self.handle(call)
if reply <> None:
if reply != None:
self.sock.sendto(reply, host_port)


This file was deleted.

@@ -187,11 +187,13 @@ Eddy Welbourne
Mats Wichmann
Gerry Wiener
Timothy Wild
Collin Winter
Blake Winton
Dan Wolfe
Steven Work
Thomas Wouters
Ka-Ping Yee
Rory Yorke
Moshe Zadka
Milan Zamazal
Cheng Zhang
@@ -87,7 +87,7 @@ DVIPS= dvips -N0 -t $(PAPER)
# (e.g. OpenBSD needs package gmake installed; use gmake instead of make)
PWD=$(shell pwd)

# (The trailing colon in the value is needed; TeX places it's default
# (The trailing colon in the value is needed; TeX places its default
# set of paths at the location of the empty string in the path list.)
TEXINPUTS=$(PWD)/commontex:

@@ -691,7 +691,7 @@ distlatex: bziplatex ziplatex
# The small amount of additional work is a small price to pay for not
# having to remember which order to do it in. ;)
paperdist: distpdf distps pkglist
edist: disthtml distinfo zipisilo pkglist
edist: disthtml distinfo pkglist #zipisilo

# The pkglist.html file is used as part of the download.html page on
# python.org; it is not used as intermediate input here or as part of
@@ -125,6 +125,7 @@ LIBFILES= $(MANSTYLES) $(INDEXSTYLES) $(COMMONTEX) \
lib/libmarshal.tex \
lib/libwarnings.tex \
lib/libimp.tex \
lib/libzipimport.tex \
lib/libpkgutil.tex \
lib/libparser.tex \
lib/libbltin.tex \
@@ -229,7 +229,7 @@ The Python source is copyrighted, but you can freely use and copy it
as long as you don't change or remove the copyright notice:

----------------------------------------------------------------------
Copyright (c) 2000-2004 Python Software Foundation.
Copyright (c) 2000-2006 Python Software Foundation.
All rights reserved.

Copyright (c) 2000 BeOpen.com.

This file was deleted.

@@ -5,6 +5,10 @@ \chapter{Abstract Objects Layer \label{abstract}}
numerical types, or all sequence types). When used on object types
for which they do not apply, they will raise a Python exception.

It is not possible to use these functions on objects that are not properly
initialized, such as a list object that has been created by
\cfunction{PyList_New()}, but whose items have not been set to some
non-\code{NULL} value yet.

\section{Object Protocol \label{object}}

@@ -778,12 +782,6 @@ \section{Sequence Protocol \label{sequence}}
the Python statement \samp{del \var{o}[\var{i1}:\var{i2}]}.
\end{cfuncdesc}

\begin{cfuncdesc}{PyObject*}{PySequence_Tuple}{PyObject *o}
Returns the \var{o} as a tuple on success, and \NULL{} on failure.
This is equivalent to the Python expression \samp{tuple(\var{o})}.
\bifuncindex{tuple}
\end{cfuncdesc}

\begin{cfuncdesc}{int}{PySequence_Count}{PyObject *o, PyObject *value}
Return the number of occurrences of \var{value} in \var{o}, that is,
return the number of keys for which \code{\var{o}[\var{key}] ==
@@ -811,9 +809,11 @@ \section{Sequence Protocol \label{sequence}}

\begin{cfuncdesc}{PyObject*}{PySequence_Tuple}{PyObject *o}
Return a tuple object with the same contents as the arbitrary
sequence \var{o}. If \var{o} is a tuple, a new reference will be
returned, otherwise a tuple will be constructed with the appropriate
contents.
sequence \var{o} or \NULL{} on failure. If \var{o} is a tuple,
a new reference will be returned, otherwise a tuple will be
constructed with the appropriate contents. This is equivalent
to the Python expression \samp{tuple(\var{o})}.
\bifuncindex{tuple}
\end{cfuncdesc}

\begin{cfuncdesc}{PyObject*}{PySequence_Fast}{PyObject *o, const char *m}

No commit comments for this range