]> granicus.if.org Git - python/log
python
18 years agoInclude more detail on Coverity results and add a link; minor edits
Andrew M. Kuchling [Thu, 13 Apr 2006 12:09:08 +0000 (12:09 +0000)]
Include more detail on Coverity results and add a link; minor edits

18 years agoDescribe sys.subversion, Py_GetBuildInfo()
Andrew M. Kuchling [Thu, 13 Apr 2006 11:51:07 +0000 (11:51 +0000)]
Describe sys.subversion, Py_GetBuildInfo()
Add metadata example

18 years agoAdd missing word
Andrew M. Kuchling [Thu, 13 Apr 2006 11:40:29 +0000 (11:40 +0000)]
Add missing word

18 years agorevert - breaks build of Python/ast.c w/ gcc
Skip Montanaro [Thu, 13 Apr 2006 09:48:28 +0000 (09:48 +0000)]
revert - breaks build of Python/ast.c w/ gcc

18 years agoUse union to discriminate pointer types from enum/int types.
Skip Montanaro [Thu, 13 Apr 2006 09:37:01 +0000 (09:37 +0000)]
Use union to discriminate pointer types from enum/int types.

18 years agoChange more occurrences of maxsplit to Py_ssize_t.
Martin v. Löwis [Thu, 13 Apr 2006 08:52:56 +0000 (08:52 +0000)]
Change more occurrences of maxsplit to Py_ssize_t.

18 years agoChange maxsplit types to Py_ssize_t.
Martin v. Löwis [Thu, 13 Apr 2006 08:37:17 +0000 (08:37 +0000)]
Change maxsplit types to Py_ssize_t.

18 years agoAllocate the 0x1D1A0000 base adress for the _ctypes extension module.
Thomas Heller [Thu, 13 Apr 2006 08:33:58 +0000 (08:33 +0000)]
Allocate the 0x1D1A0000 base adress for the _ctypes extension module.
Export the COM entry point functions.

Note that there are several conflicting base addresses defined for
other extensions, also not all are listed in dllbase_nt.txt.

18 years agoAdd two entries about how to actually clear a list.
Georg Brandl [Thu, 13 Apr 2006 08:04:56 +0000 (08:04 +0000)]
Add two entries about how to actually clear a list.

18 years agoAdd a test for Py_ssize_t. Correct typo in getargs.c.
Georg Brandl [Thu, 13 Apr 2006 07:59:30 +0000 (07:59 +0000)]
Add a test for Py_ssize_t. Correct typo in getargs.c.

18 years agoReplace INT_MAX with PY_SSIZE_T_MAX.
Martin v. Löwis [Thu, 13 Apr 2006 07:52:27 +0000 (07:52 +0000)]
Replace INT_MAX with PY_SSIZE_T_MAX.

18 years agoReplace INT_MAX with PY_SSIZE_T_MAX where string length
Martin v. Löwis [Thu, 13 Apr 2006 07:37:25 +0000 (07:37 +0000)]
Replace INT_MAX with PY_SSIZE_T_MAX where string length
are concerned.

18 years agoReplace INT_MAX with PY_SSIZE_T_MAX.
Martin v. Löwis [Thu, 13 Apr 2006 07:34:09 +0000 (07:34 +0000)]
Replace INT_MAX with PY_SSIZE_T_MAX.

18 years agoAdd PY_SSIZE_T_MIN/MAX to _testcapi.
Georg Brandl [Thu, 13 Apr 2006 07:29:18 +0000 (07:29 +0000)]
Add PY_SSIZE_T_MIN/MAX to _testcapi.

18 years agoStop claiming that Py_Finalize releases all memory.
Martin v. Löwis [Thu, 13 Apr 2006 07:28:29 +0000 (07:28 +0000)]
Stop claiming that Py_Finalize releases all memory.
Fixes part of #1445210.

18 years agoRemove another INT_MAX limitation
Martin v. Löwis [Thu, 13 Apr 2006 07:24:50 +0000 (07:24 +0000)]
Remove another INT_MAX limitation

18 years agoReplace most INT_MAX with PY_SSIZE_T_MAX.
Martin v. Löwis [Thu, 13 Apr 2006 07:22:51 +0000 (07:22 +0000)]
Replace most INT_MAX with PY_SSIZE_T_MAX.

18 years agoC++ compiler changes. casts, rename variables with reserved names.
Anthony Baxter [Thu, 13 Apr 2006 07:19:01 +0000 (07:19 +0000)]
C++ compiler changes. casts, rename variables with reserved names.

18 years agoSupport NFD of very long strings.
Martin v. Löwis [Thu, 13 Apr 2006 06:36:31 +0000 (06:36 +0000)]
Support NFD of very long strings.

18 years agotest_compile can be really long if we are using -u compiler.
Neal Norwitz [Thu, 13 Apr 2006 06:34:59 +0000 (06:34 +0000)]
test_compile can be really long if we are using -u compiler.
This may be causing the debian sparc buildbot to fail.
Print a little message to let the user ^w buildbot know it's still thinking.

We may want to adjust the time period which is currently 5 minutes.

Will backport.

18 years agoChange more ints to Py_ssize_t.
Martin v. Löwis [Thu, 13 Apr 2006 06:34:32 +0000 (06:34 +0000)]
Change more ints to Py_ssize_t.

18 years agoRevert 34153: Py_UNICODE should not be signed.
Martin v. Löwis [Thu, 13 Apr 2006 06:06:08 +0000 (06:06 +0000)]
Revert 34153: Py_UNICODE should not be signed.

18 years agowhoops. missed one in an auto-generated file. another extern "C" {} for C++ compiler...
Anthony Baxter [Thu, 13 Apr 2006 04:49:25 +0000 (04:49 +0000)]
whoops. missed one in an auto-generated file. another extern "C" {} for C++ compiler compatibility

18 years agoRemove tests that no longer leak. There is still one leaking generator test
Neal Norwitz [Thu, 13 Apr 2006 04:35:36 +0000 (04:35 +0000)]
Remove tests that no longer leak.  There is still one leaking generator test

18 years agoFix {} mismatch spotted by George Yoshida.
Neal Norwitz [Thu, 13 Apr 2006 03:41:04 +0000 (03:41 +0000)]
Fix {} mismatch spotted by George Yoshida.

18 years agotty isn't supported on all boxes.
Tim Peters [Thu, 13 Apr 2006 03:09:40 +0000 (03:09 +0000)]
tty isn't supported on all boxes.

18 years agoFix typography of Martin's name
Andrew M. Kuchling [Thu, 13 Apr 2006 02:10:16 +0000 (02:10 +0000)]
Fix typography of Martin's name

18 years agospread the extern "C" { } magic pixie dust around. Python itself builds now
Anthony Baxter [Thu, 13 Apr 2006 02:06:09 +0000 (02:06 +0000)]
spread the extern "C" { } magic pixie dust around. Python itself builds now
using a C++ compiler. Still lots and lots of errors in the modules built by
setup.py, and a bunch of warnings from g++ in the core.

18 years agoWrite some ctypes examples
Andrew M. Kuchling [Thu, 13 Apr 2006 02:04:42 +0000 (02:04 +0000)]
Write some ctypes examples

18 years agoIf compiling with g++ don't use -Wstrict-prototpes.
Skip Montanaro [Thu, 13 Apr 2006 02:00:56 +0000 (02:00 +0000)]
If compiling with g++ don't use -Wstrict-prototpes.

18 years agoreverting r45321: Patch #860326: traceback.format_exception_only() now
Anthony Baxter [Thu, 13 Apr 2006 01:34:33 +0000 (01:34 +0000)]
reverting r45321: Patch #860326: traceback.format_exception_only() now
prepends the exception's module name to non-builtin exceptions, like
the interpreter itself does.

broke a number of doctests. should be discussed before checking in (see
discussion on python-dev).

18 years agocasting nastiness to make C++ compiler happy
Anthony Baxter [Thu, 13 Apr 2006 01:23:28 +0000 (01:23 +0000)]
casting nastiness to make C++ compiler happy

18 years agoAdd a cast to make code compile with a C++ compiler.
Anthony Baxter [Thu, 13 Apr 2006 01:07:27 +0000 (01:07 +0000)]
Add a cast to make code compile with a C++ compiler.

18 years agoPatch #860326: traceback.format_exception_only() now prepends the
Georg Brandl [Wed, 12 Apr 2006 21:14:09 +0000 (21:14 +0000)]
Patch #860326: traceback.format_exception_only() now prepends the
exception's module name to non-builtin exceptions, like the interpreter
itself does.

18 years agoFixes bug #1117761
Gregory P. Smith [Wed, 12 Apr 2006 20:35:02 +0000 (20:35 +0000)]
Fixes bug #1117761

bsddb.*open() methods cachesize parameter wouldn't work (raised an
internal bsddb.db exception when it was given).  The set_cachesize
call needed to be moved from the DB object to the DBEnv since the env
was introduced to allow for threading.

(will backport to 2.4)

18 years agoCloses bug #1149413
Gregory P. Smith [Wed, 12 Apr 2006 20:16:56 +0000 (20:16 +0000)]
Closes bug #1149413

Using None for a filename with the 'n' flag when calling bsddb.btopen
would cause an error while checking if the file None existed.  error
not likely to be seen as anyone using None for a filename would likely
use the 'c' flag in the first place.

18 years agoFix for a bug found by Armin Rigo, plus test.
Thomas Heller [Wed, 12 Apr 2006 19:07:36 +0000 (19:07 +0000)]
Fix for a bug found by Armin Rigo, plus test.
https://sourceforge.net/tracker/?func=detail&atid=532154&aid=1467852&group_id=71702

18 years agoDon't set gi_frame to Py_None, use NULL instead, eliminating some insane
Phillip J. Eby [Wed, 12 Apr 2006 19:07:15 +0000 (19:07 +0000)]
Don't set gi_frame to Py_None, use NULL instead, eliminating some insane
pointer dereferences.

18 years agoMention ASCII as default encoding; update TODO list; use PyCF_ONLY_AST by MvL's sugge...
Andrew M. Kuchling [Wed, 12 Apr 2006 18:54:00 +0000 (18:54 +0000)]
Mention ASCII as default encoding; update TODO list; use PyCF_ONLY_AST by MvL's suggestion; typographical tidying of MvL's name

18 years agoBump version number; rearrange introduction a bit
Andrew M. Kuchling [Wed, 12 Apr 2006 18:52:09 +0000 (18:52 +0000)]
Bump version number; rearrange introduction a bit

18 years agoIgnore the references to the dummy objects used as deleted keys
Armin Rigo [Wed, 12 Apr 2006 17:06:05 +0000 (17:06 +0000)]
Ignore the references to the dummy objects used as deleted keys
in dicts and sets when computing the total number of references.

18 years agoPatch #1468808: don't complain if Tkinter is already deleted at the time Font.__del__...
Georg Brandl [Wed, 12 Apr 2006 15:28:49 +0000 (15:28 +0000)]
Patch #1468808: don't complain if Tkinter is already deleted at the time Font.__del__ is run.

18 years agoAdd PEP 243 section
Andrew M. Kuchling [Wed, 12 Apr 2006 13:03:35 +0000 (13:03 +0000)]
Add PEP 243 section

18 years agoUpdate test_sundry. Many modules have now tests, but
Georg Brandl [Wed, 12 Apr 2006 12:44:36 +0000 (12:44 +0000)]
Update test_sundry. Many modules have now tests, but
e.g. SimpleXMLRPCServer wasn't in here yet.

18 years agoNote C API incompatibilities
Andrew M. Kuchling [Wed, 12 Apr 2006 12:27:50 +0000 (12:27 +0000)]
Note C API incompatibilities

18 years agoMention access to ASTs
Andrew M. Kuchling [Wed, 12 Apr 2006 12:16:31 +0000 (12:16 +0000)]
Mention access to ASTs

18 years agoBug #1469163: SimpleXMLRPCServer unconditionally attempted to import fcntl.
Anthony Baxter [Wed, 12 Apr 2006 12:07:31 +0000 (12:07 +0000)]
Bug #1469163: SimpleXMLRPCServer unconditionally attempted to import fcntl.
Wrapped in a try/except.

18 years agoOff-by-one buffer overflow error.
Armin Rigo [Wed, 12 Apr 2006 11:59:26 +0000 (11:59 +0000)]
Off-by-one buffer overflow error.

18 years agoPatch #1463288: use a context manager to temporarily switch locales.
Walter Dörwald [Wed, 12 Apr 2006 10:09:16 +0000 (10:09 +0000)]
Patch #1463288: use a context manager to temporarily switch locales.

Add tests for the output of the TextCalendar and HTMLCalendar classes.

18 years agowrap docstrings so they are less than 80 columns. add spaces after commas.
Neal Norwitz [Wed, 12 Apr 2006 06:56:56 +0000 (06:56 +0000)]
wrap docstrings so they are less than 80 columns. add spaces after commas.

18 years agogen_throw(): The caller doesn't own PyArg_ParseTuple()
Tim Peters [Wed, 12 Apr 2006 06:44:36 +0000 (06:44 +0000)]
gen_throw():  The caller doesn't own PyArg_ParseTuple()
"O" arguments, so must not decref them.  This accounts
for why running test_contextlib.test_main() in a loop
eventually tried to deallocate Py_None.

18 years agoUpdate comments and the skip list, maybe some of these tests don't
Neal Norwitz [Wed, 12 Apr 2006 05:56:00 +0000 (05:56 +0000)]
Update comments and the skip list, maybe some of these tests don't
report failures, we'll see.

Skip certain hopeless tests: compiler and logging.

compiler will likely always show varying leaks since it doesn't work
on a defined set of modules unless -u compiler is specified.  But that
takes forever (we only run with -u network currently).

logging causes hangs when running with -R.

18 years agoAdd another little test to make sure we roundtrip multiple list comp ifs ok.
Neal Norwitz [Wed, 12 Apr 2006 05:27:46 +0000 (05:27 +0000)]
Add another little test to make sure we roundtrip multiple list comp ifs ok.
Add tests for generator expressions too.

18 years agoUpdate for new grammar
Neal Norwitz [Wed, 12 Apr 2006 05:24:39 +0000 (05:24 +0000)]
Update for new grammar

18 years agoput in a reference to PEP 306 in a comment at the top
Anthony Baxter [Wed, 12 Apr 2006 05:16:30 +0000 (05:16 +0000)]
put in a reference to PEP 306 in a comment at the top

18 years agoGet rid of some warnings on Mac
Neal Norwitz [Wed, 12 Apr 2006 04:56:35 +0000 (04:56 +0000)]
Get rid of some warnings on Mac

18 years agoavoid C++ name mangling for the _Py.*SizeT functions
Anthony Baxter [Wed, 12 Apr 2006 04:38:54 +0000 (04:38 +0000)]
avoid C++ name mangling for the _Py.*SizeT functions

18 years agoremove forward declarations. No constructors to move for these files. Makes
Anthony Baxter [Wed, 12 Apr 2006 04:29:01 +0000 (04:29 +0000)]
remove forward declarations. No constructors to move for these files. Makes
code work with C++ compilers.

18 years agoMove constructors, add some casts to make C++ compiler happy. Still a problem
Anthony Baxter [Wed, 12 Apr 2006 04:26:11 +0000 (04:26 +0000)]
Move constructors, add some casts to make C++ compiler happy. Still a problem
with the getstring() results in pattern_subx. Will come back to that.

18 years agoremove forward declarations, move constructor functions. makes code C++ safe.
Anthony Baxter [Wed, 12 Apr 2006 04:08:46 +0000 (04:08 +0000)]
remove forward declarations, move constructor functions. makes code C++ safe.

18 years agoMake symtable.c safe for C++ compilers. Changed macros in the same way as
Anthony Baxter [Wed, 12 Apr 2006 04:00:50 +0000 (04:00 +0000)]
Make symtable.c safe for C++ compilers. Changed macros in the same way as
compile.c to add a cast.

18 years agoper Jeremy's email, remove the _WITH_CAST versions of macros. g++
Anthony Baxter [Wed, 12 Apr 2006 00:43:09 +0000 (00:43 +0000)]
per Jeremy's email, remove the _WITH_CAST versions of macros. g++
still has errors from the casts of asdl_seq_GET to cmpop_ty, but
otherwise it's C++ clean.

18 years agoPart two of the fix for SF bug #1466641: Regenerate graminit.c and add test
Thomas Wouters [Wed, 12 Apr 2006 00:07:59 +0000 (00:07 +0000)]
Part two of the fix for SF bug #1466641: Regenerate graminit.c and add test
for the bogus failure.

18 years agoFix SF bug #1466641: multiple adjacent 'if's in listcomps and genexps, as in
Thomas Wouters [Wed, 12 Apr 2006 00:06:34 +0000 (00:06 +0000)]
Fix SF bug #1466641: multiple adjacent 'if's in listcomps and genexps, as in
[x for x in it if x if x], were broken for no good reason by the PEP 308
patch.

18 years agoFix int() and long() to repr() their argument when formatting the exception,
Thomas Wouters [Tue, 11 Apr 2006 23:50:33 +0000 (23:50 +0000)]
Fix int() and long() to repr() their argument when formatting the exception,
to avoid confusing situations like:

>>> int("")
ValueError: invalid literal for int():
>>> int("2\n\n2")
ValueError: invalid literal for int(): 2

2

Also report the base used, to avoid:

ValueError: invalid literal for int(): 2

They now report:

>>> int("")
ValueError: invalid literal for int() with base 10: ''
>>> int("2\n\n2")
ValueError: invalid literal for int() with base 10: '2\n\n2'
>>> int("2", 2)
ValueError: invalid literal for int() with base 2: '2'

(Reporting the base could be avoided when base is 10, which is the default,
but hrm.) Another effect of these changes is that the errormessage can be
longer; before, it was cut off at about 250 characters. Now, it can be up to
four times as long, as the unrepr'ed string is cut off at 200 characters,
instead.

No tests were added or changed, since testing for exact errormsgs is (pardon
the pun) somewhat errorprone, and I consider not testing the exact text
preferable. The actually changed code is tested frequent enough in the
test_builtin test as it is (120 runs for each of ints and longs.)

18 years agoStreamHandler now checks explicitly for None before using sys.stderr as the stream...
Vinay Sajip [Tue, 11 Apr 2006 21:42:00 +0000 (21:42 +0000)]
StreamHandler now checks explicitly for None before using sys.stderr as the stream (see SF bug #1463840).

18 years ago_Py_PrintReferenceAddresses,_Py_PrintReferences:
Tim Peters [Tue, 11 Apr 2006 19:12:33 +0000 (19:12 +0000)]
_Py_PrintReferenceAddresses,_Py_PrintReferences:
interpolate PY_FORMAT_SIZE_T for refcount display
instead of casting refcounts to long.

I understand that gcc on some boxes delivers
nuisance warnings about this, but if any new ones
appear because of this they'll get fixed by magic
when the others get fixed.

18 years agoComplete the ElementTree section
Andrew M. Kuchling [Tue, 11 Apr 2006 13:14:56 +0000 (13:14 +0000)]
Complete the ElementTree section

18 years agoSome more changes to make code compile under a C++ compiler.
Anthony Baxter [Tue, 11 Apr 2006 12:14:09 +0000 (12:14 +0000)]
Some more changes to make code compile under a C++ compiler.

18 years agomore low-hanging fruit to make code compile under a C++ compiler. Not
Anthony Baxter [Tue, 11 Apr 2006 12:01:56 +0000 (12:01 +0000)]
more low-hanging fruit to make code compile under a C++ compiler. Not
entirely happy with the two new VISIT macros in compile.c, but I
couldn't see a better approach.

18 years agoPatch #1464444: Add --with-system-ffi.
Martin v. Löwis [Tue, 11 Apr 2006 11:12:43 +0000 (11:12 +0000)]
Patch #1464444: Add --with-system-ffi.

18 years agoConvert 0 to their respective enum types. Convert
Martin v. Löwis [Tue, 11 Apr 2006 09:17:27 +0000 (09:17 +0000)]
Convert 0 to their respective enum types. Convert
void* to their respective _ty types. Fix signature of
ast_for_exprlist.

18 years agoCorrect casts to char*.
Martin v. Löwis [Tue, 11 Apr 2006 09:08:02 +0000 (09:08 +0000)]
Correct casts to char*.

18 years agoRemove "static forward" declaration. Move constructors
Martin v. Löwis [Tue, 11 Apr 2006 09:04:12 +0000 (09:04 +0000)]
Remove "static forward" declaration. Move constructors
after the type objects.

18 years agoRegenerate.
Martin v. Löwis [Tue, 11 Apr 2006 09:03:33 +0000 (09:03 +0000)]
Regenerate.

18 years agoAs discussed on python-dev, really fix the PyMem_*/PyObject_* memory API
Neal Norwitz [Tue, 11 Apr 2006 08:19:15 +0000 (08:19 +0000)]
As discussed on python-dev, really fix the PyMem_*/PyObject_* memory API
mismatches.  At least I hope this fixes them all.

This reverts part of my change from yesterday that converted everything
in Parser/*.c to use PyObject_* API.  The encoding doesn't really need
to use PyMem_*, however, it uses new_string() which must return PyMem_*
for handling the result of PyOS_Readline() which returns PyMem_* memory.

If there were 2 versions of new_string() one that returned PyMem_*
for tokens and one that return PyObject_* for encodings that could
also fix this problem.  I'm not sure which version would be clearer.
This seems to fix both Guido's and Phillip's problems, so it's good enough
for now.  After this change, it would be good to review Parser/*.c
for consistent use of the 2 memory APIs.

18 years agoMake _kind types global for C++ compilation.
Martin v. Löwis [Tue, 11 Apr 2006 08:06:50 +0000 (08:06 +0000)]
Make _kind types global for C++ compilation.
Explicitly cast void* to int to cmpop_ty.

18 years agoGet compiling again
Neal Norwitz [Tue, 11 Apr 2006 07:58:54 +0000 (07:58 +0000)]
Get compiling again

18 years agolow-hanging fruit in Python/ - g++ still hates all the enum_kind declarations
Anthony Baxter [Tue, 11 Apr 2006 07:43:46 +0000 (07:43 +0000)]
low-hanging fruit in Python/ - g++ still hates all the enum_kind declarations
in Python/Python-ast.c. Not sure what to do about those.

18 years agoMore low-hanging fruit. Still need to re-arrange some code (or find a better
Anthony Baxter [Tue, 11 Apr 2006 07:42:36 +0000 (07:42 +0000)]
More low-hanging fruit. Still need to re-arrange some code (or find a better
solution) in the same way as listobject.c got changed. Hoping for a better
solution.

18 years agoC++ already defines a perfectly good 'bool'. Use that.
Anthony Baxter [Tue, 11 Apr 2006 07:23:05 +0000 (07:23 +0000)]
C++ already defines a perfectly good 'bool'. Use that.

18 years agoAdjust whitespace.
Neal Norwitz [Tue, 11 Apr 2006 07:21:20 +0000 (07:21 +0000)]
Adjust whitespace.

18 years agoAdd whitespace after comma
Neal Norwitz [Tue, 11 Apr 2006 07:17:08 +0000 (07:17 +0000)]
Add whitespace after comma

18 years agoCorrect test whether wchar_t is unsigned. Fixed crash
Martin v. Löwis [Tue, 11 Apr 2006 07:15:30 +0000 (07:15 +0000)]
Correct test whether wchar_t is unsigned. Fixed crash
in #1454485.

18 years agoClear errno before calling opendir() and readdir().
Georg Brandl [Tue, 11 Apr 2006 07:04:06 +0000 (07:04 +0000)]
Clear errno before calling opendir() and readdir().

18 years agoMore C++-compliance. Note especially listobject.c - to get C++ to accept the
Anthony Baxter [Tue, 11 Apr 2006 06:54:30 +0000 (06:54 +0000)]
More C++-compliance. Note especially listobject.c - to get C++ to accept the
PyTypeObject structures, I had to make prototypes for the functions, and
move the structure definition ahead of the functions. I'd dearly like a better
way to do this - to change this would make for a massive set of changes to
the codebase.

There's still some warnings - this is purely to get rid of errors first.

18 years agoBug #1467952: os.listdir() now correctly raises an error if readdir()
Georg Brandl [Tue, 11 Apr 2006 06:47:43 +0000 (06:47 +0000)]
Bug #1467952: os.listdir() now correctly raises an error if readdir()
fails with an error condition.

18 years agoTypo fix.
Georg Brandl [Tue, 11 Apr 2006 06:27:12 +0000 (06:27 +0000)]
Typo fix.

18 years agoFix the code in Parser/ to also compile with C++. This was mostly casts for
Anthony Baxter [Tue, 11 Apr 2006 05:39:14 +0000 (05:39 +0000)]
Fix the code in Parser/ to also compile with C++. This was mostly casts for
malloc/realloc type functions, as well as renaming one variable called 'new'
in tokensizer.c. Still lots more to be done, going to be checking in one
chunk at a time or the patch will be massively huge. Still compiles ok with
gcc.

18 years agoTry to repair what may be the last new test failure on the
Tim Peters [Tue, 11 Apr 2006 02:59:48 +0000 (02:59 +0000)]
Try to repair what may be the last new test failure on the
"x86 OpenBSD trunk" buildbot due to changing Python so that
Python-exposed addresses are always non-negative.

test_int_pointer_arg():  This line failed now whenever the
box happened to assign an address to `ci` "with the sign
bit set":

    self.failUnlessEqual(addressof(ci), func(byref(ci)))

The problem is that the ctypes addressof() inherited "all
addresses are non-negative now" from changes to
PyLong_FromVoidPtr(), but byref() did not inherit that
change and can still return a negative int.

I don't know whether, or what, the ctypes implementation wants
to do about that (possibly nothing), but in the meantime
the test fails frequently.

So, introduced a Python positive_address() function in
the test module, that takes a purported machine address and,
if negative, converts it to a non-negative value "with the
same bits".  This should leave the test passing under all
versions of Python.

Belated thanks to Armin Rigo for teaching me the sick trick ;-)
for determining the # of bits in a machine pointer via abuse
of the struct module.

18 years agosubclasspropagation(): Squash two more bogus hash(x) == id(x)
Tim Peters [Tue, 11 Apr 2006 01:59:34 +0000 (01:59 +0000)]
subclasspropagation():  Squash two more bogus hash(x) == id(x)
tests.  Alas, because only the "x86 OpenBSD trunk" buildbot fails
these tests, and test_descr stops after the first failure, there's
no sane way for me to fix these short of fixing one and then
waiting for the buildbot to reveal the next one.

18 years agoTypo repair.
Tim Peters [Tue, 11 Apr 2006 01:47:17 +0000 (01:47 +0000)]
Typo repair.

18 years agoWhitespace normalization.
Tim Peters [Tue, 11 Apr 2006 01:44:26 +0000 (01:44 +0000)]
Whitespace normalization.

18 years agoMore words on patch #837242, since 4 or 5 tests started
Tim Peters [Tue, 11 Apr 2006 01:44:07 +0000 (01:44 +0000)]
More words on patch #837242, since 4 or 5 tests started
failing on one of the 32-bit buildbot boxes because of it,
due to tempting but always-wrong Python code.  Users
probably have code like this too (I know I did ...).

18 years agoAdd notes to NEWS for other work today.
Phillip J. Eby [Tue, 11 Apr 2006 01:21:31 +0000 (01:21 +0000)]
Add notes to NEWS for other work today.

18 years agospecials(): squash another incorrect hash(x) == id(x)
Tim Peters [Tue, 11 Apr 2006 01:21:00 +0000 (01:21 +0000)]
specials():  squash another incorrect hash(x) == id(x)
test.  Add some lines that at least invoke the default
__hash__, although there's nothing to check there beyond
that they don't blow up.

18 years agoForgot to mark up a PEP reference
Phillip J. Eby [Tue, 11 Apr 2006 01:15:28 +0000 (01:15 +0000)]
Forgot to mark up a PEP reference

18 years agoUpdated the warnings, linecache, inspect, traceback, site, and doctest modules
Phillip J. Eby [Tue, 11 Apr 2006 01:07:43 +0000 (01:07 +0000)]
Updated the warnings, linecache, inspect, traceback, site, and doctest modules
to work correctly with modules imported from zipfiles or via other PEP 302
__loader__ objects.  Tests and doc updates are included.

18 years agoHuh. This belonged with the last checkin -- no idea why svn
Tim Peters [Tue, 11 Apr 2006 00:44:27 +0000 (00:44 +0000)]
Huh.  This belonged with the last checkin -- no idea why svn
didn't commit it.

18 years agoTry to repair more new buildbot failures in "x86 OpenBSD trunk", due
Tim Peters [Tue, 11 Apr 2006 00:43:27 +0000 (00:43 +0000)]
Try to repair more new buildbot failures in "x86 OpenBSD trunk", due
to that id() can now return a Python long on a 32-bit box that allocates
addresses "with the sign bit set".

test_set.py test_subclass_with_custom_hash():  it's never been portably
legal for a __hash__() method to return id(self), but on 32-bit boxes
that never caused a problem before it became possible for id() to
return a Python long.  Changed __hash__ here to return a Python int
regardless of platform.

test_descr.py specials():
    vereq(hash(c1), id(c1))
has never been a correct test -- just removed it (hash() is always
a Python int; id() may be a Python long).