Issue 986795: New mandatory 2nd argument to site.addsitedir breaks compat (original) (raw)

Created on 2004-07-07 18:56 by exarkun, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
userlib.pth exarkun,2004-07-19 16:08
Messages (7)
msg21434 - (view) Author: Jean-Paul Calderone (exarkun) * (Python committer) Date: 2004-07-07 18:56
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.
msg21435 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2004-07-08 01:30
Logged In: YES user_id=33168 Brett, did this happen from your changes?
msg21436 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-07-09 23:35
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?
msg21437 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2004-07-16 00:50
Logged In: YES user_id=33168 Brett, didn't you fix this? Can it be closed?
msg21438 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-07-16 05:49
Logged In: YES user_id=357491 I fixed the argument requirement, but I was waiting to here from JP about the TypeError issue since I have no clue where that is coming from (tests I have in test_site haven't shown any issue). If you could double-check my test for .pth files in test_site and say they look good I will go ahead and close this. Otherwise I want to wait a little while to give JP a chance to upload a .pth file that is causing trouble.
msg21439 - (view) Author: Jean-Paul Calderone (exarkun) * (Python committer) Date: 2004-07-19 16:08
Logged In: YES user_id=366566 userlib.pth attached.
msg21440 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-07-20 02:29
Logged In: YES user_id=357491 OK, fixed in rev. 1.64. Hopefully no one else is using undocumented functions in site.py . =)
History
Date User Action Args
2022-04-11 14:56:05 admin set github: 40518
2004-07-07 18:56:56 exarkun create