简体   繁体   中英

Duplicating python27.dll as python25.dll

I have some Windows proprietary apps that insist on using Python 2.5. I'm already using python 2.7 rarely and on my way to 3.x, so I do not want to keep or force the team to keep yet another python version.

So, I cheated and created a python25.dll as a copy of the python27.dll in the same bin folder of that app/ Some initial tests prove it is actually working.

My question: is this going to cause much issues? What are the differences between the two DLL's?

Yes, I know when updating my python, I probably need to recopy that single dll.

Any differences relevant in this context would be the symbols exported by the two DLLs. I am not familiar with the windows toolsuite, but try using a windows equivalent of unix's nm or objdump to see whether there are any symbols exported in the 2.5 version but not 2.7. I wouldn't expect (m)any.

Another approach to solve your question would be to ask the vendors of the proprietary software why they request =2.5 instead of >=2.5, it may be that they have experienced some more subtle problems not directly related to the API but rather an implementation detail...

I was slightly worried that you might be talking about the software I write, but you're in a totally different country, so I doubt it. :)

I can see at least 3 potential problems with this:

  1. This is almost certain to void any warrany / support agreements you have on the software. We are very cautious about any other software just running on the same server, and someone playing around with the internals would get into a lot of trouble as we go through a very expensive rebuild of the system from scratch.

  2. If the system only has bytecode for the python routines, not the source code, you may find that the system will refuse to load any pre-compiled functions, as the bytecode version will have changed.

  3. There may be some bugs / features in python 2.5 that they are unknowningly relying on, and this may cause unexpected changes in behaviour.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM