
I thought 2.0.5 was safe under python 2.1? I just copied my mailman installation over to a new machine, which had 2.1 installed on it. Most stuff works, although cron is giving me a slew of warnings about deprecated things and syntax warnings. But admin passwords are failing entirely.. I'm getting:
admin(25762): if not self.ValidAdminPassword(pw):
admin(25762): File "/home/mailman/Mailman/SecurityManager.py", line 47, in ValidAdminPassword
admin(25762): return type(pw) == StringType and
admin(25762): TypeError: argument 2 must be string without null bytes, not string
admin(25762): [----- Python Information -----]
admin(25762): sys.version = 2.1 (#1, Jun 12 2001, 07:59:49)
[GCC 2.95.2 19991024 (release)]

"RJ" == Ron Jarrell <jarrell@vt.edu> writes:
RJ> I thought 2.0.5 was safe under python 2.1? I just copied my
RJ> mailman installation over to a new machine, which had 2.1
RJ> installed on it. Most stuff works, although cron is giving me
RJ> a slew of warnings about deprecated things and syntax
RJ> warnings. But admin passwords are failing entirely.. I'm
RJ> getting:
Be sure you re-run configure; make install and that Python 2.1 is first on your path, or that you use --with-python. I run MM2.0.5 under Py2.1 so I know it works.
-Barry

"RJ" == Ron Jarrell <jarrell@vt.edu> writes:
RJ> Python Information -----] admin(25762): sys.version = 2.1 (#1,
Oops, should have looked closer at your output. I bet something's messed up with your crypt library. Like, your older Python installation didn't have crypt, but your new installation does?
Try setting USE_CRYPT. -Barry

At 10:38 AM 6/26/01 -0400, Barry A. Warsaw wrote:
Ok, my USE_CRYPT has always been set to 1 (as advised in the comments, I just let configure set it.)
My old machine was running 1.5.2, and I thought I'd turned everything on, but given the module config file has about 174,000 poorly documented bits to flip on or off, apparently I didn't. I just went back to that machine and did a "from crypt import crypt", and sure enough, got an ImportError. However, on my new machine, which also has the USE_CRYPT set to 1, it turns out that yes, I can import crypt. So I guess I got screwed by the fact that python actually has half a clue now as to what it's doing when it builds itself.
However, I suspect the comments are wrong. I ignored it back then because I didn't know, and the comment suggested that configure would do the right thing. Obviously it didn't. In fact, looking at the Defaults.py.in, it's just hard coded to *1*.
From looking at the code, what's doing the right thing is the Crypt.py module, which, if mm_cfg.USE_CRYPT is set, tries to import it, traps the error, and resets it on the fly.
The comment in Defaults should probably be changed to "If you don't know, leave it at 1, and Crypt.py will do the right thing. But if you don't have crypt, then upgrade python to include crypt, admin.py will start blowing up in strange and mysterious ways until you change this back to 0"...

"RJ" == Ron Jarrell <jarrell@vt.edu> writes:
RJ> My old machine was running 1.5.2, and I thought I'd turned
RJ> everything on, but given the module config file has about
RJ> 174,000 poorly documented bits to flip on or off, apparently I
RJ> didn't. I just went back to that machine and did a "from
RJ> crypt import crypt", and sure enough, got an ImportError.
RJ> However, on my new machine, which also has the USE_CRYPT set
RJ> to 1, it turns out that yes, I can import crypt. So I guess I
RJ> got screwed by the fact that python actually has half a clue
RJ> now as to what it's doing when it builds itself.
Yes. By default, Python 2.1 will compile in everything it can find. This wasn't the case for 1.5.2.
RJ> However, I suspect the comments are wrong. I ignored it back
RJ> then because I didn't know, and the comment suggested that
RJ> configure would do the right thing. Obviously it didn't. In
RJ> fact, looking at the Defaults.py.in, it's just hard coded to
RJ> *1*.
RJ> From looking at the code, what's doing the right thing is the
RJ> Crypt.py module, which, if mm_cfg.USE_CRYPT is set, tries to
RJ> import it, traps the error, and resets it on the fly.
RJ> The comment in Defaults should probably be changed to "If you
RJ> don't know, leave it at 1, and Crypt.py will do the right
RJ> thing. But if you don't have crypt, then upgrade python to
RJ> include crypt, admin.py will start blowing up in strange and
RJ> mysterious ways until you change this back to 0"...
A good explanation for why MM2.1 doesn't use crypt at all. I'd add this to the FAQ but I don't think there will be a MM 2.0.6 release.
-Barry

"RJ" == Ron Jarrell <jarrell@vt.edu> writes:
RJ> I thought 2.0.5 was safe under python 2.1? I just copied my
RJ> mailman installation over to a new machine, which had 2.1
RJ> installed on it. Most stuff works, although cron is giving me
RJ> a slew of warnings about deprecated things and syntax
RJ> warnings. But admin passwords are failing entirely.. I'm
RJ> getting:
Be sure you re-run configure; make install and that Python 2.1 is first on your path, or that you use --with-python. I run MM2.0.5 under Py2.1 so I know it works.
-Barry

"RJ" == Ron Jarrell <jarrell@vt.edu> writes:
RJ> Python Information -----] admin(25762): sys.version = 2.1 (#1,
Oops, should have looked closer at your output. I bet something's messed up with your crypt library. Like, your older Python installation didn't have crypt, but your new installation does?
Try setting USE_CRYPT. -Barry

At 10:38 AM 6/26/01 -0400, Barry A. Warsaw wrote:
Ok, my USE_CRYPT has always been set to 1 (as advised in the comments, I just let configure set it.)
My old machine was running 1.5.2, and I thought I'd turned everything on, but given the module config file has about 174,000 poorly documented bits to flip on or off, apparently I didn't. I just went back to that machine and did a "from crypt import crypt", and sure enough, got an ImportError. However, on my new machine, which also has the USE_CRYPT set to 1, it turns out that yes, I can import crypt. So I guess I got screwed by the fact that python actually has half a clue now as to what it's doing when it builds itself.
However, I suspect the comments are wrong. I ignored it back then because I didn't know, and the comment suggested that configure would do the right thing. Obviously it didn't. In fact, looking at the Defaults.py.in, it's just hard coded to *1*.
From looking at the code, what's doing the right thing is the Crypt.py module, which, if mm_cfg.USE_CRYPT is set, tries to import it, traps the error, and resets it on the fly.
The comment in Defaults should probably be changed to "If you don't know, leave it at 1, and Crypt.py will do the right thing. But if you don't have crypt, then upgrade python to include crypt, admin.py will start blowing up in strange and mysterious ways until you change this back to 0"...

"RJ" == Ron Jarrell <jarrell@vt.edu> writes:
RJ> My old machine was running 1.5.2, and I thought I'd turned
RJ> everything on, but given the module config file has about
RJ> 174,000 poorly documented bits to flip on or off, apparently I
RJ> didn't. I just went back to that machine and did a "from
RJ> crypt import crypt", and sure enough, got an ImportError.
RJ> However, on my new machine, which also has the USE_CRYPT set
RJ> to 1, it turns out that yes, I can import crypt. So I guess I
RJ> got screwed by the fact that python actually has half a clue
RJ> now as to what it's doing when it builds itself.
Yes. By default, Python 2.1 will compile in everything it can find. This wasn't the case for 1.5.2.
RJ> However, I suspect the comments are wrong. I ignored it back
RJ> then because I didn't know, and the comment suggested that
RJ> configure would do the right thing. Obviously it didn't. In
RJ> fact, looking at the Defaults.py.in, it's just hard coded to
RJ> *1*.
RJ> From looking at the code, what's doing the right thing is the
RJ> Crypt.py module, which, if mm_cfg.USE_CRYPT is set, tries to
RJ> import it, traps the error, and resets it on the fly.
RJ> The comment in Defaults should probably be changed to "If you
RJ> don't know, leave it at 1, and Crypt.py will do the right
RJ> thing. But if you don't have crypt, then upgrade python to
RJ> include crypt, admin.py will start blowing up in strange and
RJ> mysterious ways until you change this back to 0"...
A good explanation for why MM2.1 doesn't use crypt at all. I'd add this to the FAQ but I don't think there will be a MM 2.0.6 release.
-Barry
participants (2)
-
barry@digicool.com
-
Ron Jarrell