473,748 Members | 7,608 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

New versions breaking extensions, etc.

Can someone explain to me why Python 2.4 on MS Windows has these backward
compatibility problems? What am I missing? Why won't extensions compiled
to run with 2.3 also work with 2.4? Why does it matter whether a component
was compiled with VC++ 6.0 or 7.1? I've been using MS stuff for 6 years.
Before I started using Python, I don't remember ever having a program tell
me I had to use an OLDER version of something to make the program work.
Newer, maybe, but older, never. I had to revert to Python 2.3 because I
have applications that will not run under Python 2.4.

Although I have been a full-time software developer since the late 70's, I
don't know much about Microsoft stuff. (Amazing trick that, eh?) But I've
been reading some things on the MS web pages that say dot-NET and all that
should NOT break existing stuff.
http://msdn.microsoft.com/library/en..._libraries.asp I
don't pretend to understand it all, but certainly one would not expect MS to
screw things up too badly on purpose. The value of MS Windows lies in the
applications that it can run. That's part of the genius of the Evil Genius.
He understood when others didn't that when Joe Blow in his basement develops
a program to run under MS Windows, Joe Blow is making money for the E.G.,
and it doesn't cost the E.G. a penny.

In my own small domain, I cannot even consider coming out with new releases
that are not drop-in replacements for what went before. Customers won't go
for it. It's an absolute deal-breaker.

What puzzles me is that, apparently, the incompatibility of Python 2.4 and
extensions built for 2.3 did not come as a nasty surprise. I get the
impression that it was expected. Can someone explain that to me?

I hope this doesn't sound like I'm complaining. I think Python is great.
And the price can't be beat!
Jul 18 '05
30 2036

"Martin v. Löwis" <ma****@v.loewi s.de> wrote in message
news:41******** ******@v.loewis .de...
OTOH, people who only have VC6 just need to buy VS.NET 2003,
which is still available.


I don't even know how to do that! :-) What's the difference between VC++
..net Standard and Visual Studio .net Pro? (Besides $370?) Is the former
C++ only, but with the IDE, and the later the whole shebang with SourceSafe,
VBASIC, and all that?

OH NO! I've gone seriously off-topic. Please don't call the Spanish
Inquisiton. Allow me to re-phrase the question: What do I need to build
(on-topic) Python extensions?

Jul 18 '05 #11
Jive wrote:
"Martin v. Löwis" <ma****@v.loewi s.de> wrote in message
news:41******** ******@v.loewis .de...
OTOH, people who only have VC6 just need to buy VS.NET 2003,
which is still available.
I don't even know how to do that! :-) What's the difference between

VC++ .net Standard and Visual Studio .net Pro? (Besides $370?) Is the former C++ only, but with the IDE, and the later the whole shebang with SourceSafe, VBASIC, and all that?

OH NO! I've gone seriously off-topic. Please don't call the Spanish
Inquisiton. Allow me to re-phrase the question: What do I need to build (on-topic) Python extensions?


Short answer to Jive's question: (1) free non-MS C compiler (either
MinGW or Borland) (2) inner calm.

I really can't understand what all the screaming and yelling is about.
Windows Python is built using an MS compiler. Those extension
developers who can't/won't buy the MS compiler use either the free
MinGW compiler or the free Borland 5.5 compiler (or both!). Yes, you
have to be careful about mixing the runtimes. An extension that tries
to use a FILE * that was created by Python will crash. Using free() on
a pointer that was malloc()ed by the other party isn't a bright idea
either. There are adequate solutions to these problems, involving
Python-supplied higher-level functions instead of C runtime functions.
Otherwise, not a problem. Distutils has made the process of using MinGW
and bcpp a snap. The documentation is adequate. When a new version of
Python comes out, one rebuilds and tests one's extensions. So ... now
there are THREE compilers that can be used instead of the one that
Python's built with; what's the big deal?

Jul 18 '05 #12
On the other hand, it can be annoying.

I can't use Python 2.4 right now because NumPy won't run. So, I need to
wait for NumPy to get updated.

Of course, one would say: but NumPy is open source, go build it yourself.

My answer is simple: If there are more then 24 hours to a day, I definitely
would...

--
It's me
"John Machin" <sj******@lexic on.net> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
Jive wrote:
"Martin v. Löwis" <ma****@v.loewi s.de> wrote in message
news:41******** ******@v.loewis .de...
OTOH, people who only have VC6 just need to buy VS.NET 2003,
which is still available.
I don't even know how to do that! :-) What's the difference between

VC++ .net Standard and Visual Studio .net Pro? (Besides $370?) Is the former C++ only, but with the IDE, and the later the whole shebang with SourceSafe, VBASIC, and all that?

OH NO! I've gone seriously off-topic. Please don't call the Spanish
Inquisiton. Allow me to re-phrase the question: What do I need to build (on-topic) Python extensions?


Short answer to Jive's question: (1) free non-MS C compiler (either
MinGW or Borland) (2) inner calm.

I really can't understand what all the screaming and yelling is about.
Windows Python is built using an MS compiler. Those extension
developers who can't/won't buy the MS compiler use either the free
MinGW compiler or the free Borland 5.5 compiler (or both!). Yes, you
have to be careful about mixing the runtimes. An extension that tries
to use a FILE * that was created by Python will crash. Using free() on
a pointer that was malloc()ed by the other party isn't a bright idea
either. There are adequate solutions to these problems, involving
Python-supplied higher-level functions instead of C runtime functions.
Otherwise, not a problem. Distutils has made the process of using MinGW
and bcpp a snap. The documentation is adequate. When a new version of
Python comes out, one rebuilds and tests one's extensions. So ... now
there are THREE compilers that can be used instead of the one that
Python's built with; what's the big deal?
Jul 18 '05 #13
It's me wrote:
My answer is simple: If there are more then 24 hours to a day, I definitely
would...


Can we get a patch in for this?
datetime.timede lta(hours=24) + datetime.timede lta(hours=1) datetime.timede lta(1)

would be much preferable to the current:
datetime.timede lta(hours=24) + datetime.timede lta(hours=1)

datetime.timede lta(1, 3600)

;)

Steve
Jul 18 '05 #14
On Sat, 11 Dec 2004 01:28:45 -0600, Mike Meyer wrote:
Actually, there's a problem on Unix that may not exist on
Windows. Python is installed in <PREFIX>/lib/python<version>/. This
lets us have multiple versions of Python installed at the same time,
which is a good thing.
...
The real solution is...


Interestingly, I saw you going somewhere else for this. I expected,

"The real solution is, at least for the pure Python packages, a
system-wide directory for those, reserving site-packages for things that
are truly version specific."

I'm not sure I'm ready to "propose" this yet, but thoughts? Bad idea, good
idea?

Obviously it isn't perfect, but it seems to me that reverse compatibility
has been good enough for a while now that the imperfections are minor in
impact...
Jul 18 '05 #15
Jive wrote:
I don't even know how to do that! :-) What's the difference between VC++
.net Standard and Visual Studio .net Pro? (Besides $370?) Is the former
C++ only, but with the IDE, and the later the whole shebang with SourceSafe,
VBASIC, and all that?
According to

http://msdn.microsoft.com/howtobuy/vstudio/

there is, for VS.NET, "Academic", "Profession al", "Enterprise
Developer", and "Enterprise Architect". For Python extensions, all
these releases will work; see

http://msdn.microsoft.com/howtobuy/vstudio/features/

for a checkmark list. For VC++ .NET 2003 Standard, it appears that
you get just the C++ compiler, and the IDE, see

http://msdn.microsoft.com/howtobuy/v...s/default.aspx
OH NO! I've gone seriously off-topic. Please don't call the Spanish
Inquisiton. Allow me to re-phrase the question: What do I need to build
(on-topic) Python extensions?


Either VS.NET 2003 or VC++ .NET 2003 should do (although I don't know
anybody who owns the latter to be sure). The core issue is that it needs
a "native" C++ compiler (ie. not just managed C++), and that it needs
mscvcr71.dll.

Regards,
Martin
Jul 18 '05 #16

"Martin v. Löwis" <ma****@v.loewi s.de> wrote in message
news:41******** ****@v.loewis.d e...
Either VS.NET 2003 or VC++ .NET 2003 should do (although I don't know
anybody who owns the latter to be sure). The core issue is that it needs
a "native" C++ compiler (ie. not just managed C++), and that it needs
mscvcr71.dll.


Sorry if I'm being dense. If I had that DLL, why couldn't I use VC++ 6.0?

It's still not clear to me exactly what's in each package. One would think
there would be a more technical description on the MS web pages.
Jul 18 '05 #17
Jive wrote:
Either VS.NET 2003 or VC++ .NET 2003 should do (although I don't know
anybody who owns the latter to be sure). The core issue is that it needs
a "native" C++ compiler (ie. not just managed C++), and that it needs
mscvcr71.dl l.

Sorry if I'm being dense. If I had that DLL, why couldn't I use VC++ 6.0?


Sorry for being imprecise. You don't need just msvcr71.dll, you need an
import library for it, and you need to cause link.exe to use that import
library. VC6 will continue to link your extension modules with
msvcrt40.dll - regardless of what other DLLs you have on your system.

It might be that you also need the header files for msvcr71.dll,
although I believe you could get away with using the "wrong" (i.e.
VC6) header files.

Regards,
Martin
Jul 18 '05 #18

"Martin v. Löwis" <ma****@v.loewi s.de> wrote in message
news:41******** *************** @news.freenet.d e...
Jive wrote:
Either VS.NET 2003 or VC++ .NET 2003 should do (although I don't know
anybody who owns the latter to be sure). The core issue is that it needs
a "native" C++ compiler (ie. not just managed C++), and that it needs
mscvcr71.dl l.
Sorry if I'm being dense. If I had that DLL, why couldn't I use VC++

6.0?
Sorry for being imprecise. You don't need just msvcr71.dll, you need an
import library for it, and you need to cause link.exe to use that import
library. VC6 will continue to link your extension modules with
msvcrt40.dll - regardless of what other DLLs you have on your system.

It might be that you also need the header files for msvcr71.dll,
although I believe you could get away with using the "wrong" (i.e.
VC6) header files.

Regards,
Martin


Well, ain't that enough to gag a maggot? I was aware that DLL's don't
really link dynamically. I was not aware that the crt dll file name was
hard-coded into the linker. But I looked on the link line and, sure enough,
that particular dll was not listed among the others.

Malice or incompetence? You be the judge.
Jul 18 '05 #19
Jive wrote:
Well, ain't that enough to gag a maggot? I was aware that DLL's don't
really link dynamically. I was not aware that the crt dll file name was
hard-coded into the linker. But I looked on the link line and, sure enough,
that particular dll was not listed among the others.


It's not hard-coded in the linker, but hard-coded in the import library.
So if you link with msvcrt.lib (which might not be the precise name
of the import library - I cannot look up the precise name right now),
msvcrt.lib will in turn refer to msvcr71.dll.

In addition, through #pragma comment(lib, foo.lib), the Microsoft C
*header* files force references to import libraries into the object
files, so that the import libraries don't even appear on the linker
line - instead, the linker gets additional command line options from
the object files; use dumpbin to find out what those are.

On the plus side, I believe that the name of the import library for
the CRT was always the same (msvcrt.lib), so different versions of
that file refer to different actual CRTs (msvcrt.dll, msvcrt40.dll,
msvcr70.dll, msvcr71.dll). So just replacing your msvcrt.lib file
of VC6 with the VC71 one might be enough - but then, perhaps there
also where changes to the header files which you need to get.

Regards,
Martin
Jul 18 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

46
6286
by: Jon Perez | last post by:
Can one run a 1.5 .pyc file with the 2.x version interpreters and vice versa? How about running a 2.x .pyc using a 2.y interpreter?
7
1692
by: onauc | last post by:
Hi, There are many versions of C and C++ built by many differen companies. So, which version : 1. more easier to learn 2. more easier to remember 3. more easier to debug 4. helps me find errors fast and professionally
2
1061
by: charles | last post by:
I ship a C# asp.net app in .dll form which is targeted at ASP.Net v1.1. If a user loads is on a machine with ASP.Net v1.0, it crashes--no reasonable message--just a null-pointer exception before any of my code is reached.. Is there a standard practice to detect and/or prevent this situation. I haven't found an option in the installer to detect the asp.net version. thanks charles
5
2688
by: Lyle Fairfield | last post by:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callnetfrcom.asp The Joy of Interoperability Sometimes a revolution in programming forces you to abandon all that's come before. To take an extreme example, suppose you have been writing Visual Basic applications for years now. If you're like many developers, you will have built up a substantial inventory of code in that time. And if you've been following...
8
2744
by: AppleBag | last post by:
I just looked in the folder that contains my .NET framework installations, and I have versions 1.0,1.1 and 2.0. Do I need the 1 series since I have version 2.0? Seems like it might just be a waste of space. TIA
0
1267
by: jpegny | last post by:
Hello all, I'm in the middle of setting up a windows 2003 server for asp.net (with vb.net 2003) remote development/deployment. The problem is that as soon as I install service pack 1 on windows 2003 I can no longer remotely develop asp.net apps with vs.net 2003. I have set-up servers with all the patches except service pack 1 and they work fine but as soon as I install service pack 1 it breaks the remote development of asp.net.
28
2055
by: larpup | last post by:
I have computers setup with A97 runtime with mde's. Work perfectly. I've written an app in 2003 and purchased the Developer extensions. When I load A2003 runtime with my app on a computer that has A97 runtime, I cannot open the A 97 mde's. I was under the impression that the developer extensionsl allow for having both runtimes on a computer. 1. A97 Runtime loaded first
1
1816
by: M.-A. Lemburg | last post by:
On 2008-07-25 08:13, python@bdurham.com wrote: Yes. But then Intel Itanium is being phased out anyway and the AMD64 build works on both Intel and AMD processors. True.
13
1542
by: Bob Altman | last post by:
Hi all, I have authored several native DLLs (call them A, B, and C). These libraries have references between each other (A calls B which calls C). These libraries are built and made available to callers both in "debug" and "release" versions. The release versions of the libraries are A, B, and C (.lib and .dll), while the debug versions are A_debug, B_debug, and C_debug (.lib and .dll). Now, because these libraries maintain internal...
0
8828
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9537
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9367
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9319
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9243
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6795
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4599
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.