473,699 Members | 2,087 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python does not play well with others

The major complaint I have about Python is that the packages
which connect it to other software components all seem to have
serious problems. As long as you don't need to talk to anything
outside the Python world, you're fine. But once you do, things
go downhill. MySQLdb has version and platform compatibility
problems. So does M2Crypto. The built-in SSL support is weak.
Even basic sockets don't quite work right; the socket module
encapsulates the timeout mechanism but doesn't get it right.

In the Perl, Java, PHP, and C/C++ worlds, the equivalent
functions just work. That's because, in those worlds, either the
development team for the language or the development team
for the subsystem takes responsibility for making them work.
Only Python doesn't do that.

Python has been around long enough that this should have
been fixed by now.

John Nagle
Jan 24 '07 #1
113 5275

JohnMySQLdb has version and platform compatibility problems.

Got specific examples? I've successfully used MySQLdb on Linux, Mac and
Solaris with no compatibility problems at all.

JohnEven basic sockets don't quite work right; the socket module
Johnencapsulate s the timeout mechanism but doesn't get it right.

As has been reported here a number of times, this simply awaits someone with
the time and inclination to do the work. If it itches you then scratch the
itch.

JohnIn the Perl, Java, PHP, and C/C++ worlds, the equivalent functions
Johnjust work. That's because, in those worlds, either the
Johndevelopment team for the language or the development team for the
Johnsubsystem takes responsibility for making them work. Only Python
Johndoesn't do that.

You seem to be expecting something for free from the volunteer development
team. If these things are important enough you can always pay someone to do
the work and contribute it back to the community. The work didn't happen
for free in any of the communities you mentioned. Someone (Sun, AT&T,
whoever) paid for it in either time or money.

Skip
Jan 24 '07 #2
At Tuesday 23/1/2007 22:50, John Nagle wrote:
The major complaint I have about Python is that the packages
which connect it to other software components all seem to have
serious problems. As long as you don't need to talk to anything
outside the Python world, you're fine. But once you do, things
go downhill.
That appears to be your situation.
>MySQLdb has version and platform compatibility
problems.
Which, specifically?
>So does M2Crypto.
Both of them are third-party libraries maintained by volunteer people
(and I could ask why do you menction M2Crypto specifically?)
>The built-in SSL support is weak.
Even basic sockets don't quite work right; the socket module
encapsulates the timeout mechanism but doesn't get it right.
I use several packages connecting to the "outside Python" world
without problems. If you have these specific problems, perhaps you
could try to fix them? Get funding to make them fixed? Do the funding yourself?
In the Perl, Java, PHP, and C/C++ worlds, the equivalent
functions just work. That's because, in those worlds, either the
development team for the language or the development team
for the subsystem takes responsibility for making them work.
Only Python doesn't do that.
I think that it was done because *someone* was sponsoring the
development (like IBM, Sun, and others).
--
Gabriel Genellina
Softlab SRL


_______________ _______________ _______________ _____
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas

Jan 24 '07 #3
John Nagle <na***@animats. comwrites:
The major complaint I have about Python is that the packages
which connect it to other software components all seem to have
serious problems. As long as you don't need to talk to anything
outside the Python world, you're fine. But once you do, things
go downhill. MySQLdb has version and platform compatibility
problems. So does M2Crypto. The built-in SSL support is weak.
Even basic sockets don't quite work right; the socket module
encapsulates the timeout mechanism but doesn't get it right.

In the Perl, Java, PHP, and C/C++ worlds, the equivalent
functions just work. That's because, in those worlds, either the
development team for the language or the development team
for the subsystem takes responsibility for making them work.
Only Python doesn't do that.

Python has been around long enough that this should have
been fixed by now.

John Nagle
You experience isn't shared by everyone. Some of us find Python the
most functional and portable of the candidates you mention.

Perl - excellent modules and bindings for just about everything you
can think of, but the whole thing is painful to watch. Once you've
done a few code reviews on 10,000 line perl packages where even the
authors have no idea what the code is doing, you tend to look
elesewhere.

Java - a world of its own. They reinvent the wheel instead of linking
to existing libraries. In the process you get libraries upon
libraries upon libraries. Even if there isn't a performance hit, you
(as a human) can get lost. And the language is just too verbose to
live with.

PHP - are we talking web scripts or serious programs? Are you doing
numerical analysis, NLP, computational chemistry, or bit twiddling in
PHP?

C - the portable assembler. Solid, trusted, tunable performance,
bindings for everything. Of course memory bugs can stop your project
in its tracks for indeterminant periods.

C++ - objects tacked onto C; but that didn't work so invent a whole
world of templates and rewrite everything again, but now trickier than
C to bind to other languages. Good work can be done in C++, but that
is a testimony to the programmers and not to the language.

Python - it just works. Same scripts run on every platform. Bindings
available to every C/C++/FORTRAN library I've needed so far. Often
the bindings are not complete, but oddly enough the binding developers
have chosen to do just the functions I need, so who cares. A clean
architecture for adding more function bindings if I'm so inclined.

--
Harry George
PLM Engineering Architecture
Jan 24 '07 #4
Harry George wrote:
John Nagle <na***@animats. comwrites:
You experience isn't shared by everyone. Some of us find Python the
most functional and portable of the candidates you mention.
The language is fine. It's the bindings to other packages that
are the problem. There are three different packages for talking
to OpenSSL, and they're all broken in some important way.

What's actually needed on the SSL side, I think, is to
add bindings to the built-in SSL to export the functionality
the M2Crypto C binding module has. Preferably with better
attention to reference count problems, and without using SWIG.
Then move over the Python portions of M2Crypto.

Some problems, all of which are known and logged bugs:

- The built in SSL package doesn't actually validate anything,
and will happily accept bogus SSL certificates.
- The built in SSL package doesn't allow access to most of the
fields of an SSL certificate, and the ones you can get
are returned in a debug format that's not parseable.
- M2Crypto has OpenSSL and SWIG version dependencies beyond
what is documented. The latest version of SWIG has
a problem which breaks builds with older versions of
OpenSSL.
- M2Crypto may still have a memory leak associated with contexts.
(Check out "close" in "Context".)
- M2Crypto doesn't understand SSL certificates which support
a list of sites.
- M2Crypto and the socket library don't play nice about timeouts.

Most of these problems have been known for years. The last person to
try to fix this was treated so badly he stopped contributing. Read
the bug history for "[1114345] Add SSL certificate validation".
It's sad.

John Nagle
Jan 24 '07 #5
On 1/23/07, John Nagle <na***@animats. comwrote:
The major complaint I have about Python is that the packages
which connect it to other software components all seem to have
serious problems. As long as you don't need to talk to anything
outside the Python world, you're fine. But once you do, things
go downhill. MySQLdb has version and platform compatibility
problems. So does M2Crypto. The built-in SSL support is weak.
Even basic sockets don't quite work right; the socket module
encapsulates the timeout mechanism but doesn't get it right.

In the Perl, Java, PHP, and C/C++ worlds, the equivalent
functions just work. That's because, in those worlds, either the
development team for the language or the development team
for the subsystem takes responsibility for making them work.
Only Python doesn't do that.

Python has been around long enough that this should have
been fixed by now.

John Nagle
This just isn't correct. You think that socket libraries don't have
incompatibiliti es in C and that C++ libraries don't have versioning
problems? You think that SSL works right from Java in all cases, or
that changing your mysql client libraries underneath PHP won't affect
it?
Jan 24 '07 #6
On 1/24/07, John Nagle <na***@animats. comwrote:
Harry George wrote:
John Nagle <na***@animats. comwrites:
You experience isn't shared by everyone. Some of us find Python the
most functional and portable of the candidates you mention.

The language is fine. It's the bindings to other packages that
are the problem. There are three different packages for talking
to OpenSSL, and they're all broken in some important way.

What's actually needed on the SSL side, I think, is to
add bindings to the built-in SSL to export the functionality
the M2Crypto C binding module has. Preferably with better
attention to reference count problems, and without using SWIG.
Then move over the Python portions of M2Crypto.

Some problems, all of which are known and logged bugs:

- The built in SSL package doesn't actually validate anything,
and will happily accept bogus SSL certificates.
- The built in SSL package doesn't allow access to most of the
fields of an SSL certificate, and the ones you can get
are returned in a debug format that's not parseable.
- M2Crypto has OpenSSL and SWIG version dependencies beyond
what is documented. The latest version of SWIG has
a problem which breaks builds with older versions of
OpenSSL.
- M2Crypto may still have a memory leak associated with contexts.
(Check out "close" in "Context".)
- M2Crypto doesn't understand SSL certificates which support
a list of sites.
- M2Crypto and the socket library don't play nice about timeouts.

Most of these problems have been known for years. The last person to
try to fix this was treated so badly he stopped contributing. Read
the bug history for "[1114345] Add SSL certificate validation".
It's sad.
Just to be clear: The problem here is "my personal itch is not being
scratched by other people for me", not "Python doesn't play well with
others". You are not any more important than anyone else and assuming
that anyone cares about your problems is a major fallacy. You have a
specific library that doesn't meet your needs, and that you are not
interested in maintaining yourself, so you are attempting to leverage
some sort of community guilt trip to get other people to do it for
you. That's dishonest and off-putting.

Not everyone has the ability or desire to contribute. That is fine.
They might even ask if anyone is interested in doing it for them,
which is also fine - there are many people who enjoy working on
something that is of use to others, even if it's not important to them
personally. But stop acting like you're entitled to special
consideration, or that the "Python community" is failing some sort of
duty by not catering to you specifically.
Jan 24 '07 #7
On 24 Jan, 02:50, John Nagle <n...@animats.c omwrote:
The major complaint I have about Python is that the packages
which connect it to other software components all seem to have
serious problems. As long as you don't need to talk to anything
outside the Python world, you're fine.
I think you're overstating your case here, since there is a lot of
Python code out there (much of it under the radar of many readers of
this newsgroup/list) whose purpose is precisely that of integration
with other software components. Having read what you've written
elsewhere with regard to SSL integration with Python, though, the
causes of the symptoms you're seeing are mostly correctly identified in
your own analysis.
In the Perl, Java, PHP, and C/C++ worlds, the equivalent functions just work.
We may have differing experiences here. Java stuff, in my experience,
usually needs lots of precisely versioned .jar files and then
frequently doesn't "just work". C and C++ aren't complete environments,
but there are admittedly some libraries/frameworks/environments based
on those languages which might provide solutions which often work
satisfactorily. I don't really want to think of the cocktail of
solutions available for Perl to solve any given problem, but people
often report that the quality varies somewhat between them.
That's because, in those worlds, either the
development team for the language or the development team
for the subsystem takes responsibility for making them work.
Only Python doesn't do that.
And this is where I'd almost reach agreement with you. It's not enough
for the language to keep growing new features if the libraries are
broken or appear archaic, and this task seems to be outside the "core
developers" area of interest. Of course, people like you and I could
help update the libraries, although finding the time for making more
than just suggestions can be quite difficult, but the core developers
merely signalling that the libraries are a priority area for
development would probably lead to fewer people pushing their own
favourite syntax brush-ups or esoteric constructs, hopefully leading
some people (with enough time) to update, document and improve what's
already there.

Paul

Jan 24 '07 #8
On Wed, Jan 24, 2007 at 06:24:37AM +0000, Harry George wrote:
>
Perl - excellent modules and bindings for just about everything ...
Java - a world of its own. They reinvent the wheel instead of ...
PHP - are we talking web scripts or serious programs? Are you ...
C - the portable assembler. Solid, trusted, tunable ...
C++ - objects tacked onto C; but that didn't work so invent ...
Python - it just works. Same scripts run on every platform ...
What about C# ?
e
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
=============== =============== =============== =============== ============
Jan 24 '07 #9
Chris Mellon wrote:
On 1/24/07, John Nagle <na***@animats. comwrote:
>Harry George wrote:
John Nagle <na***@animats. comwrites:
Just to be clear: The problem here is "my personal itch is not being
scratched by other people for me", not "Python doesn't play well with
others". You are not any more important than anyone else and assuming
that anyone cares about your problems is a major fallacy. You have a
specific library that doesn't meet your needs, and that you are not
interested in maintaining yourself, so you are attempting to leverage
some sort of community guilt trip to get other people to do it for
you. That's dishonest and off-putting.
No, the problem is that these things are broken.

Python is the only major open source project I've encountered where
there's so much hostility to bug reports.

For a while, I tried submitting long, detailed bug reports showing
where in the C code a problem lies, and pointing out ways to fix it.
But I don't want to take over maintenance on the SSL package;
it's too delicate.

John Nagle
Jan 24 '07 #10

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

Similar topics

220
19039
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have any preconceived ideas about it. I have noticed, however, that every programmer I talk to who's aware of Python is also talking about Ruby. So it seems that Ruby has the potential to compete with and displace Python. I'm curious on what basis it...
54
6553
by: Brandon J. Van Every | last post by:
I'm realizing I didn't frame my question well. What's ***TOTALLY COMPELLING*** about Ruby over Python? What makes you jump up in your chair and scream "Wow! Ruby has *that*? That is SO FRICKIN' COOL!!! ***MAN*** that would save me a buttload of work and make my life sooooo much easier!" As opposed to minor differences of this feature here, that feature there. Variations on style are of no interest to me. I'm coming at this from a...
699
33942
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro capabilities, unfortunately. I'd like to know if it may be possible to add a powerful macro system to Python, while keeping its amazing syntax, and if it could be possible to add Pythonistic syntax to Lisp or Scheme, while keeping all of the...
20
2333
by: Ilias Lazaridis | last post by:
" A cooperation between Sun Microsystems and IBM&Co. in conjunction with liberal & high evolutive communities would result in an nearly unbeatable programming platform. My evaluation has shown: this is a non achievable goal, as stubborness and egoism rules - instead of reason and cooperation. Thus I leave all those ridiculous folks behind, which will continue to do an excellent job in keeping the very promising JAVA platform far
30
2719
by: Ivan Reborin | last post by:
Hello everyone, I was wondering if anyone here has a moment of time to help me with 2 things that have been bugging me. 1. Multi dimensional arrays - how do you load them in python For example, if I had: ------- 1 2 3 4 5 6
0
8697
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9184
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
9042
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
8929
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
7759
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
5878
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
4634
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2357
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2013
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.