This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Bug fixes for int unification branch
Type: Stage:
Components: None Versions: Python 3.0
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: Rhamphoryncus, gvanrossum, loewis
Priority: normal Keywords: patch

Created on 2006-12-21 02:36 by Rhamphoryncus, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
int_unification.diff Rhamphoryncus, 2006-12-21 02:36 int_unification bugfixes
Messages (5)
msg51587 - (view) Author: Adam Olsen (Rhamphoryncus) Date: 2006-12-21 02:36
This patch should fix all the real bugs in the int unification branch.  All the remaining bugs are either external to the branch or due to tests that need updating (mostly due to the names of int vs long).

External bugs:
    test_socket: http://sourceforge.net/tracker/index.php?func=detail&aid=1619659&group_id=5470&atid=105470
    test_class: seems to be caused by using new-style classes by default.  Unrelated to int-unification.
    test_set: inheritance of __hash__.  I believe this was fixed in p3yk already.
Test failures due to naming differences:
    test_ctypes test_doctest test_generators test_genexps test_optparse test_pyexpat 
Tests needing updating, not just due to name differences:
    test_descr test_pickletools 


The following aspects need specific review:

PyLong_FromVoidPtr was doing the cast wrong.  GCC was compiling the (unsigned Py_LONG_LONG)p cast in such a way as to produce a value larger than 2**32, obviously wrong on this 32bit box, and it warned about the cast too.  Making it cast to Py_uintptr_t first seems to have corrected both the behaviour and the warning, but may be wrong on other architectures.

Many of my changes to use PyInt_CheckExact may be better served by creating a PyInt_CheckSmall macro that retains the range check but allows subclasses.  Alternatively, the index interface could be used, but would require more rewriting perhaps best left until later.

There are some areas that handled signed vs unsigned and int vs long a bit differently, and they may still need work.  Hard to tell what behaviour is correct in such cases.


Skipped files:
Doc/ext/run-func.c
Mac/Modules/ctl/_Ctlmodule.c
Mac/Modules/dlg/_Dlgmodule.c
Mac/Modules/win/_Winmodule.c
Mac/Modules/pycfbridge.c
Modules/carbonevt/_CarbonEvtmodule.c
Modules/_sqlite/connection.c
Modules/almodule.c
Modules/cgensupport.c
Modules/clmodule.c
Modules/flmodule.c
Modules/grpmodule.c
Modules/posicmodule.c:conv_confname
Modules/pyexpat.c
Modules/svmodule.c
Modules/termios.c
Modules/_bsddb.c
Modules/_sqlite/statement.c
PC/_winreg.c
Python/dynload_beos.c
Python/mactoolboxglue.c
Python/marshal.c
Python/pythonrun.c:handle_system_exit
RISCOS/Modules/drawfmodule.c
RISCOS/Modules/swimodule.c
msg51588 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2006-12-21 21:12
Martin, do you have time to look at this?  I'll play with it too but I'd like to have your opinion.
msg51589 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-12-21 21:22
Not this year anymore. I'll try to early next year (hopefully first week of January).
msg51590 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-01-14 00:05
I'll be taking over this branch.
msg51591 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-01-14 00:27
For now I'm just going to submit this; then I'll think about the implications later.  My highest priority is to get this merged back into the p3yk branch, although I have no idea how to do that yet...
History
Date User Action Args
2022-04-11 14:56:21adminsetgithub: 44370
2008-01-06 22:29:46adminsetkeywords: - py3k
versions: + Python 3.0
2006-12-21 02:36:03Rhamphoryncuscreate