新版本打破扩展等 [英] New versions breaking extensions, etc.

查看:75
本文介绍了新版本打破扩展等的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以向我解释为什么MS Windows上的Python 2.4有这些向后的

兼容性问题吗?我错过了什么?为什么不用扩展编译

与2.3一起运行也适用于2.4?为什么使用VC ++ 6.0或7.1编译组件

是否重要?我已经使用MS的东西6年了。

在我开始使用Python之前,我不记得曾经有过程序告诉

我必须使用一个OLDER版本的东西,使程序工作。

更新,也许,但更老,从来没有。我不得不恢复到Python 2.3,因为我的
的应用程序不能在Python 2.4下运行。


虽然我从那时起就是一名全职软件开发人员70年代后期,我对b $ b不太了解微软的东西。 (令人惊讶的伎俩,嗯?)但是我已经在MS网页上阅读了一些关于dot-NET的内容,而所有这些都不应该破坏现有的这些东西。
http://msdn.microsoft.com/library/en..._libraries.asp 我不想假装理解这一切,但肯定不会指望MS到

故意把事情弄得太糟糕了。 MS Windows的价值在于它可以运行的

应用程序。那是邪恶天才天才的一部分。

当其他地方的Joe Blow在他的地下室里开发出来的时候,他知道其他人并不是那样的。
a计划在MS下运行Windows,Joe Blow正在为EG赚钱,

并且它不会花费EG一分钱。


在我自己的小域名中,我甚至不能考虑推出新版本

,这些都不是以前的替代品。客户不会为此获得
。这是一个绝对的交易破坏者。


让我感到困惑的是,显然,Python 2.4和

为2.3构建的扩展不兼容来一个令人讨厌的惊喜。我得到了预期的

印象。有人可以向我解释一下吗?


我希望这听起来不像是在抱怨。我觉得Python很棒。

价格不可能超过!

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!

推荐答案

VS7真是一个与VS6完全不同的野兽。

在12/10/04 9:31 PM,在文章YZ ******************** @ news .easynews.com,

" Jive" <所以***** @ microsoft.com>写道:
VS7 is a really a vastly different beastie than VS6.
On 12/10/04 9:31 PM, in article YZ********************@news.easynews.com,
"Jive" <so*****@microsoft.com> wrote:
有人可以向我解释为什么MS Windows上的Python 2.4有这些后向的兼容性问题吗?我错过了什么?为什么不用扩展编译运行2.3也可以使用2.4?为什么组件
是用VC ++ 6.0还是7.1编译的?我已经使用MS的东西已有6年了。
在我开始使用Python之前,我不记得有过一个程序告诉我/我必须使用一个OLDER版本的东西来制作程序工作。
更新,也许,但更老,永远不会。我不得不恢复到Python 2.3,因为我的应用程序不能在Python 2.4下运行。

虽然自70年代末以来我一直是一名全职软件开发人员,但我
对微软的东西不太了解。 (令人惊讶的伎俩,嗯?)但是我已经在MS网页上阅读了一些说net-NET的东西,所有这些都不应该破坏现有的东西。
http://msdn.microsoft.com/ library / en .... time_librarie
s.asp我不会假装理解这一切,但肯定不会指望MS也会把事情搞砸了严重故意。 MS Windows的价值在于它可以运行的应用程序。这是邪恶天才的天才的一部分。
他知道当其他人不是那样的时候Joe Blow在他的地下室开发了一个在MS Windows下运行的程序,Joe Blow正在挣钱对于EG,
并没有花费EG一分钱。

在我自己的小域名中,我甚至不能考虑推出新版本
这些不是以前的替代品。客户不会为此而去。这是一个绝对的交易破坏者。

令我感到困惑的是,显然,为Python 2.3而构建的Python 2.4和
扩展的不兼容并不是一个令人讨厌的惊喜。我得到了预期的印象。有人可以向我解释一下吗?

我希望这听起来不像是在抱怨。我觉得Python很棒。
价格不可能超过!
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!






嗨!


但是,如果Python对外部软件的通过同样敏感,那么带有版本7(已过时)的
版本6(已过时),它令人担忧。


Michel Claveau
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


Jive写道:
有人可以向我解释为什么Python 2.4关于MS Windows有这些后向兼容性问题吗?我缺少什么?
Can someone explain to me why Python 2.4 on MS Windows has these backward
compatibility problems? What am I missing?




问题是Python C / API。目前,它直接暴露事物(如

数据结构),这可能会改变主要版本之间的大小。另一个问题是解释器和扩展可以链接到Microsoft运行时的不同版本。


这个问题是一个可解决的问题,但它需要:

1. C / API的主要补充 - Python主要版本不可知

的API隐藏了不透明指针后面的所有数据结构,从不传递解释器和扩展之间的文件描述符

,永远不会让Python删除内存

由扩展分配(或反之亦然)

2.重写扩展以使用新的API函数而不是当前特定的主要版本的




这样的API可能更难以使用和更慢,仅仅是因为B的限制。


到目前为止,没有人关心这个问题,需要付出努力才能使C API版本不可知。鉴于API几乎总是保持*源*兼容,在新的Python版本的一个月或两个月内,

扩展开发人员通常也将其构建环境调整为

为新版本生成二进制文件。


在当前情况下(Python 2.4),从msvcrt到msvcrt71的转换,以及

微软提供的免费开发工具质量差,b / b $ b加剧了Windows上的问题。 Python开发人员正在寻找

改进文档和支持使用Visual Studio .Net 2003(主要是MinGW和免费的MS工具)之外的Windows

编译器构建扩展。


虽然主要的扩展程序开发人员总是可以尝试让PSF购买一个

Visual Studio许可证;)


干杯,

尼克。


-

Nick Coghlan | nc******@email.com |澳大利亚布里斯班

--------------------------------------- ------------------------
http://boredomandlaziness.skystorm.net



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


这篇关于新版本打破扩展等的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆