Python 2.x is still being supported and indeed Python 2.7 is due for release soon. There are many changes in Python 3.1 that would require extensive re-writing of any python scripts - so whilst modifying WinCVS to run with Python 3.1 DLL may or may not be difficult - all those who had contributed Python scripts for WinCVS and all users who had written their own scripts would need to fix them and re-submit them.
At this stage it does not seem like a high priority task - and indeed one that could create a lot of angst amongst existing users.
Here follows some notes on the C API changes - these are some but not necessarily all of the problems that need to be addressed.
******************************************
No Entrypoint for: PyInt_FromLong.
Also since WinCVS is a 32 bit app then you may need to install the 32 bit Python to get the 32 bit Python31.dll.
Postgres seems to have dealt with it simply by substituting PyLong_FromLong()...
******************************************
No Entrypoint for: PyFile_AsFile.
Python no longer uses FILE*, but file descriptors (int's) so this is more difficult. The call itself probably needs replacing with the newer PyObject_AsFileDescriptor(). This will affect cvsgui_GetHistoryAsXML and probably require a rewrite (especially if you want to support both Python 3.1 and 2.x).
******************************************
No Entrypoint for: PyString_AsString and PyString_FromString.
Python no longer uses Strings but ByteArray or Unicode - since WinCVS is not a unicode app then the internal behaviour fits bytearray - but there is no easy equivalent for PyString_FromString - the closest maybe being PyByteArray_FromStringAndSize.
I have found the DLL at C:\windows\system32\python31.dll and does not work with it, only with python21.dll
It should search for DLLs automatically on system/system32 directories.
Python 2.x is still being supported and indeed Python 2.7 is due for release soon. There are many changes in Python 3.1 that would require extensive re-writing of any python scripts - so whilst modifying WinCVS to run with Python 3.1 DLL may or may not be difficult - all those who had contributed Python scripts for WinCVS and all users who had written their own scripts would need to fix them and re-submit them.
At this stage it does not seem like a high priority task - and indeed one that could create a lot of angst amongst existing users.
Here follows some notes on the C API changes - these are some but not necessarily all of the problems that need to be addressed.
******************************************
No Entrypoint for: PyInt_FromLong.
Also since WinCVS is a 32 bit app then you may need to install the 32 bit Python to get the 32 bit Python31.dll.
New API docs:
http://docs.activestate.com/activepython/3.1/python/c-api/concrete.html#numeric-objects
Old API docs:
http://docs.activestate.com/activepython/2.5/python/api/intObjects.html
Postgres seems to have dealt with it simply by substituting PyLong_FromLong()...
******************************************
No Entrypoint for: PyFile_AsFile.
Python no longer uses FILE*, but file descriptors (int's) so this is more difficult. The call itself probably needs replacing with the newer PyObject_AsFileDescriptor(). This will affect cvsgui_GetHistoryAsXML and probably require a rewrite (especially if you want to support both Python 3.1 and 2.x).
New API docs:
http://docs.activestate.com/activepython/3.1/python/c-api/concrete.html#numeric-objects
Old API docs:
http://docs.activestate.com/activepython/2.5/python/api/fileObjects.html
******************************************
No Entrypoint for: PyString_AsString and PyString_FromString.
Python no longer uses Strings but ByteArray or Unicode - since WinCVS is not a unicode app then the internal behaviour fits bytearray - but there is no easy equivalent for PyString_FromString - the closest maybe being PyByteArray_FromStringAndSize.
New API docs:
http://docs.activestate.com/activepython/2.5/python/api/stringObjects.html
Old API docs:
http://docs.activestate.com/activepython/3.1/python/c-api/bytearray.html
ok, I though it was more important that it is.