[ python-Bugs-986795 ] New mandatory 2nd argument to site.addsitedir breaks compat

SourceForge.net noreply at sourceforge.net
Fri Jul 16 02:50:05 CEST 2004


Bugs item #986795, was opened at 2004-07-07 14:56
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=986795&group_id=5470

Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Jp Calderone (kuran)
Assigned to: Brett Cannon (bcannon)
Summary: New mandatory 2nd argument to site.addsitedir breaks compat

Initial Comment:

  Old .pth files now raise a TypeError, which site.py
does not catch, which causes the import of site.py to fail.

  The new required parameter is also undocumented and,
on a cursory inspection, it is unclear to me what its
purpose is.

  This comes up because Debian allows for a version
neutral site-packages directory, /usr/lib/site-python/,
into which .pth files can be placed.


----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2004-07-15 20:50

Message:
Logged In: YES 
user_id=33168

Brett, didn't you fix this?  Can it be closed?

----------------------------------------------------------------------

Comment By: Brett Cannon (bcannon)
Date: 2004-07-09 19:35

Message:
Logged In: YES 
user_id=357491

Yes, it is my change, but the one call to the function has the argument 
and the function is undocumented so I didn't worry about it.  As for its 
use, it allowed me to get rid of the nasty global variable that every 
function assumed was there for basic sys.path duplication checks.

I have gone ahead and made it optional.

As for the .pth errors, the test suite tests .pth files and the test passes.  
Do you have an example .pth file, JP, that I can test against?  How about 
the traceback of the exception?

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2004-07-07 21:30

Message:
Logged In: YES 
user_id=33168

Brett, did this happen from your changes?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=986795&group_id=5470


More information about the Python-bugs-list mailing list