473,698 Members | 2,676 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 #1
30 2022
VS7 is a really a vastly different beastie than VS6.
On 12/10/04 9:31 PM, in article YZ************* *******@news.ea synews.com,
"Jive" <so*****@micros oft.com> wrote:
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....time_librarie
s.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 #2
Hi !

But, if Python is as much sensitive to the passage of an external software,
version 6 (obsolete) with a version 7 (obsolete also), it is worrying.

Michel Claveau
Jul 18 '05 #3
Jive wrote:
Can someone explain to me why Python 2.4 on MS Windows has these backward
compatibility problems? What am I missing?


The problem is the Python C/API. At the moment, it exposes things directly (like
data structures) that may change size between major version releases. The other
issue is that the interpreter and the extensions may be linked to different
versions of the Microsoft runtime.

This is a solvable problem, but it would require:
1. Major additions to the C/API - a "Python Major Version Agnostic" API that
hides all data structures behind opaque pointers, never passes file descriptors
between the interpreter and the extension and never gets Python to delete memory
allocated by the extension (or vice-versa)
2. Rewriting extensions to use the new API functions instead of the current
major version specific ones.

Such an API is likely to be both harder to work with and slower, simply due to
the limitations of C.

To this date, no-one has cared enough about the problem to put in the effort
required to make the C API version agnostic. Given that the API almost always
remains *source* compatible, within a month or two of a new Python release, the
extension developers have generally tweaked their build environments to also
produce binaries for the new release.

In the current case (Python 2.4), the transition from msvcrt to msvcrt71, and
the poor quality of the free development tools offered by Microsoft has
exacerbated the problem on Windows. The Python developers are looking at
improving the documentation and support for building extensions with Windows
compilers other than Visual Studio .Net 2003 (mainly MinGW and the free MS tools).

Although key extension developers could always try asking the PSF to buy them a
Visual Studio license ;)

Cheers,
Nick.

--
Nick Coghlan | nc******@email. com | Brisbane, Australia
---------------------------------------------------------------
http://boredomandlaziness.skystorm.net
Jul 18 '05 #4

"Nick Coghlan" <nc******@iinet .net.au> wrote in message
news:ma******** *************** *************** @python.org...
Jive wrote:
Can someone explain to me why Python 2.4 on MS Windows has these backward compatibility problems? What am I missing?
The problem is the Python C/API. At the moment, it exposes things directly

(like data structures) that may change size between major version releases.
Okay. That could be fixed.
The other
issue is that the interpreter and the extensions may be linked to different versions of the Microsoft runtime.
Doesn't Microsoft have an answer for that? There are (at last count) nine
skillion ActiveX
components in the wild. Surely Microsoft didn't blast them into oblivion
with dot-net -- did it?

This is a solvable problem, but it would require:
1. Major additions to the C/API - a "Python Major Version Agnostic" API that hides all data structures behind opaque pointers, never passes file descriptors between the interpreter and the extension and never gets Python to delete memory allocated by the extension (or vice-versa)
I remember having trouble with that last bit once. But I seem to recall
there was an easy
answer. Something to do with the main ap and the DLL using the same heap or
some
such thing.
2. Rewriting extensions to use the new API functions instead of the current major version specific ones.
That's a one-time thing, for those who choose to do it. Certainly the old
API
would still be available.

Such an API is likely to be both harder to work with and slower, simply due to the limitations of C.

To this date, no-one has cared enough about the problem to put in the effort required to make the C API version agnostic. Given that the API almost always remains *source* compatible, within a month or two of a new Python release, the extension developers have generally tweaked their build environments to also produce binaries for the new release.
It would be a Good Thing to put a stop to that requirement, no?

In the current case (Python 2.4), the transition from msvcrt to msvcrt71, and the poor quality of the free development tools offered by Microsoft has
exacerbated the problem on Windows.
No doubt. I don't understand what the deal is with msvcr71 and all that,
but I have
figured out that it's a dirty rotten shame. If you google for msvcr71, you
will
get pages and pages of links to plaintive cries for help. We are not alone.
The Python developers are looking at
improving the documentation and support for building extensions with Windows compilers other than Visual Studio .Net 2003 (mainly MinGW and the free MS tools).


That would be good. But is using VC++ 6.0 right out? As it stands, I can
no longer
build extensions that will run with a standard dot-net Python 2.4 release.
Or at least I don't
know how. And if I build 2.4 under VC++ 6.0 and distribute that around the
company, it's not
clear to me if we can then use new third party extensions. Some
documentation
clearing it all up would be very helpful. Maybe it exists somewhere
already. This is
a Microsoft problem, not a Python problem.

Like I said, dirty rotten shame.

Thinking it over, I'm wondering why the Python crowd went with dot-NET in
the first place.
Surely the world would be a better, happier place without MS jerking
everyone around.
We work our fingerprints to the bone writing code to make their stinking
little OS do something
useful, and what have they ever given us in return? -- Besides the
aquaducts?

Jive

Jul 18 '05 #5
P.s. Does anyone know how to make Outlook Express leave my damned line-ends
alone? If I want line-ends. I know where to find the ENTER key.

Jul 18 '05 #6
Jive schreef:
P.s. Does anyone know how to make Outlook Express leave my damned
line-ends alone? If I want line-ends. I know where to find the ENTER
key.


Google for "oe-quotefix", but the best solution is to use a proper
newsreader. ;-)
--
JanC

"Be strict when sending and tolerant when receiving."
RFC 1958 - Architectural Principles of the Internet - section 3.9
Jul 18 '05 #7
"Jive" <so*****@micros oft.com> writes:
"Nick Coghlan" <nc******@iinet .net.au> wrote in message
news:ma******** *************** *************** @python.org...
To this date, no-one has cared enough about the problem to put in the

effort
required to make the C API version agnostic. Given that the API almost

always
remains *source* compatible, within a month or two of a new Python

release, the
extension developers have generally tweaked their build environments to

also
produce binaries for the new release.


It would be a Good Thing to put a stop to that requirement, no?


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.

Now, installed packages and extensions go in
<PREFIX>/lib/python<version>/site-packages. This means that you can't
use *any* of the previously installed packages in the new
version, even if they were pure python. Since I use TMDA, my mail
stopped working when I installed python 2.4.

The real solution is a database of installed packages (which may well
be needed for the apt-get/CPAN functionality that people want) so that
a single python script can fetch and install all the installed
packages.

<mike
--
Mike Meyer <mw*@mired.or g> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Jul 18 '05 #8
Jive wrote:
Why won't extensions compiled to run with 2.3 also work with 2.4?


I believe nobody has answered *this* question, yet:

Python extensions built for 2.3 link with python23.dll, Python
extensions build for 2.4 link with python24.dll.

pythonxy.dll has global variables, e.g. the pointers to True,
False, None, or the dict type object. If you have two copies
of the Python runtime, you get two copies of each local object.
This cannot work: we really need to rely on having only one
dict type, or else "is" comparisons with the dict type fail.

Regards,
Martin
Jul 18 '05 #9
Jive wrote:
The other
issue is that the interpreter and the extensions may be linked to
different versions of the Microsoft runtime.

Doesn't Microsoft have an answer for that?


Microsoft's answer to this question is: don't do that. Never
mix different versions of the CRT in a single application.
There are (at last count) nine skillion ActiveX
components in the wild. Surely Microsoft didn't blast them into oblivion
with dot-net -- did it?
No, it didn't - but so what? The point is that ActiveX controls normally
don't use the CRT in dangerous ways, since they are constrained to use
Co* function calls only.
I remember having trouble with that last bit once. But I seem to recall
there was an easy
answer. Something to do with the main ap and the DLL using the same heap or
some
such thing.
Something like that, for sure.

[require that extensions be recompiled] It would be a Good Thing to put a stop to that requirement, no?
No. The maintenance cost of such a new API would be significantly
higher, and Python would lose some of its attractiveness for C
developers.
No doubt. I don't understand what the deal is with msvcr71 and all that,
You probably either need to learn what the deal is, or else you have to
trust others that there is no better way.
That would be good. But is using VC++ 6.0 right out? As it stands, I can
no longer build extensions that will run with a standard dot-net Python
2.4 release. Or at least I don't know how.
The most easy way to do this is to use VC7.1 (VS.NET 2003). That will
work out of the box (you need to box first, of course).
Thinking it over, I'm wondering why the Python crowd went with dot-NET in
the first place.
We did not go to .NET. Python 2.4 has nothing to do with .NET. It just
happens that the C compiler we use ships as part of a product that has
..NET in its name - the C compiler itself is Microsoft Visual C 7.1,
aka Microsoft C 13.10.

That compiler is now used because it has a number of improvements over
Microsoft C 12.00, and because VC6 is no longer commercially available.
Many developers have only VS .NET 2003 available, so if Python would
continue to be built with VC6, those people could not build
extensions for it - they could not even buy the compiler they needed,
anymore. OTOH, people who only have VC6 just need to buy VS.NET 2003,
which is still available. Or else they find out what alternative
compiler arrangements can be made.
Surely the world would be a better, happier place without MS jerking
everyone around.


It would surely be better if the operating system shipped with a
compiler, so anybody could rebuild things, and you wouldn't need
binary distributions in the first place :-)

Regards,
Martin
Jul 18 '05 #10

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

Similar topics

46
6275
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
1689
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
1058
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
2687
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
2740
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
1263
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
2052
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
1814
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
1538
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
9171
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
9032
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
8905
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
8880
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...
0
7743
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5869
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
4373
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...
1
3053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.